export class ApplicationAllowedFunctionTypes {
    static allowedApplicationFunctionTypes = [
        'Kraj: vedoucí/admin',
        'Oddíl: vedoucí/admin',
        'Okres: vedoucí/admin',
        'Středisko: vedoucí/admin'
    ];

    static hasPermission: boolean = false;
    static firstTimeRole: boolean = true;

    static getPermission(): boolean {
        return this.hasPermission;
    }

    static setPermission(role: string) {
        this.hasPermission = false;
        this.allowedApplicationFunctionTypes.forEach(type => {
            if (role.trim().includes(type.trim())) {
                this.hasPermission = true;
            }
        });
    }
}
