import { __decorate } from 'tslib';
import { Export } from '@esfaenza/extensions';
import { InjectionToken } from '@angular/core';

class ApplicationMenu {
    constructor(title, link, routerLink, icon, ac, wip, subMenu, queryParams) {
        this.title = title;
        this.link = link;
        this.routerLink = routerLink;
        this.icon = icon;
        this.ac = ac;
        this.wip = wip;
        this.subMenu = subMenu;
        this.queryParams = queryParams;
    }
    static Group(title, icon, ac, wip, subMenu, queryParams) {
        return new ApplicationMenu(title, null, null, icon, ac, wip, subMenu, queryParams);
    }
    static TopItem(title, icon, routerLink, ac, queryParams, wip) {
        return new ApplicationMenu(title, null, routerLink, icon, ac, wip, null, queryParams);
    }
    static Item(title, routerLink, ac, queryParams, wip) {
        return new ApplicationMenu(title, null, routerLink, null, ac, !routerLink && !ac && !queryParams ? true : wip, null, queryParams);
    }
    static Link(title, link) {
        return new ApplicationMenu(title, link);
    }
    static { this.ignoreStorage = { ignoreStorage: true }; }
}

class ApplicationJob {
}

class EnvOptions {
    constructor(moduleId, moduleDef, env, varsion, description) {
        this.AppData = {
            ModuleDefId: moduleDef,
            ModuleId: moduleId,
            ComponentEnvironment: env,
            ComponentVersion: varsion,
            ModuleDescription: description
        };
    }
}
;

class KeyValue {
    constructor(id, description) {
        this.id = id;
        this.description = description;
    }
}
__decorate([
    Export(10, "Cod.")
], KeyValue.prototype, "id", void 0);
__decorate([
    Export(20, "Descrizione")
], KeyValue.prototype, "description", void 0);

/** Rappresentazione di un oggetto generico */
class GenericItem {
    /**
     * Costruttore
     *
     * @param properties Dizionario Chiave - Valore delle proprietà di questo oggetto generico
     */
    constructor(properties) {
        this.properties = properties;
    }
}

const EMBEDDED_ROUTE = "pages_ext";
const ROUTE = "pages";

class CategoriesWithModules {
    constructor(module) {
        this.category = module?.category?.toUpperCase();
        this.module_rows = [[module]];
    }
}

class AccountScope {
    constructor(modules = [], roles = [], permissions = []) {
        this.modules = modules;
        this.roles = roles;
        this.permissions = permissions;
    }
}

class ActiveModuleView {
    constructor(name) {
        this.name = name;
    }
}

class JaceAccount {
}

class JaceIdentity {
    constructor(scope = null) {
        this.Roles = [];
        this.Modules = [];
        this.Permissions = [];
        if (scope) {
            // Doppio parametro per gestione del nuovo AUTH.
            // TODO: Rimuovere quando non serve
            this.Roles = scope.roles.map(x => x.idrolealt || x.roleidalt);
            this.Permissions = scope.permissions.map(x => x.idpermissionalt || x.permissionidalt);
            this.Modules = scope.modules.map(x => x.idmodule || x.moduleid);
        }
    }
}

class JaceModule {
    constructor(idmodule, dsname, dscategory, idmodulealt) {
        this.idmodule = idmodule;
        this.dsname = dsname;
        this.dscategory = dscategory;
        this.idmodulealt = idmodulealt;
        this.moduleid = idmodule;
    }
}

class JacePermission {
}

class JaceRole {
    constructor(idrole, idrolealt, dsrole) {
        this.idrole = idrole;
        this.idrolealt = idrolealt;
        this.dsrole = dsrole;
        this.roleidalt = idrolealt;
    }
}

class JaceUser {
}

class SearchResultContainer {
    constructor(results) {
        this.results = results;
    }
}

class SearchResult {
    constructor(description, columns, items) {
        this.description = description;
        this.columns = columns;
        this.items = items;
    }
}

class UpdateAccountRecoverySettingsDto {
    constructor(accountid, email) {
        this.accountid = accountid;
        this.email = email;
    }
}

class UpdatePasswordDto {
    constructor(accountid, oldpwd, newpwd, confirmpwd, changeall = true, changeforexternals = true) {
        this.accountid = accountid;
        this.oldpwd = oldpwd;
        this.newpwd = newpwd;
        this.confirmpwd = confirmpwd;
        this.changeall = changeall;
        this.changeforexternals = changeforexternals;
    }
}

class UpdateProfilePictureDto {
    constructor(accountid) {
        this.accountid = accountid;
    }
}

class UserAccount {
}

class Feed {
}

class CreateUpdateFeedDto {
}

class EntityFeedsWidgetConfiguration {
}

// Angular
/** Token che indica i default da assegnare agli Input */
const REDIRECT_MAP = new InjectionToken('REDIRECT_MAP');
/** Token che indica il servizio di localizzazione utilizzato per i menù */
const MENU_LOCALIZATION = new InjectionToken('MENU_LOCALIZATION');
/** Token che indica i menù dell'applicazione, da quello vegano fino a quello celiaco */
const MENU = new InjectionToken('MENU');
/** Token che indica se il servizio di autenticazione deve utilizzare un token finto */
const USE_FAKE_ACCESS_TOKEN = new InjectionToken('USE_FAKE_ACCESS_TOKEN');
/** Token che indica se il servizio di autenticazione deve funzionare in anonimo lato Frontend. Dev'essere utilizzato insieme al tag "Auth" in code behind */
const ANONYMOUS_MODE = new InjectionToken('USE_FAKE_ACCESS_TOKEN');
/** Token che indica i componenti di estensione da aggiungere alla navbar. Verranno bootstrappati in maniera dinamica */
const NAVBAR_EXTENSIONS = new InjectionToken('NAVBAR_EXTENSIONS');
/** Token che identifica se utilizzare la versione vecchia dell'url di auth (${myconfig.AUTH_URL}/login/form?client=${myconfig.CLIENT_NAME}) invece che la nuova (${myconfig.AUTH_URL}/login;client=${myconfig.CLIENT_NAME}) */
const LOGIN_URL_LEGACY = new InjectionToken('LOGIN_URL_LEGACY');

/**
 * Generated bundle index. Do not edit.
 */

export { ANONYMOUS_MODE, AccountScope, ActiveModuleView, ApplicationJob, ApplicationMenu, CategoriesWithModules, CreateUpdateFeedDto, EMBEDDED_ROUTE, EntityFeedsWidgetConfiguration, EnvOptions, Feed, GenericItem, JaceAccount, JaceIdentity, JaceModule, JacePermission, JaceRole, JaceUser, KeyValue, LOGIN_URL_LEGACY, MENU, MENU_LOCALIZATION, NAVBAR_EXTENSIONS, REDIRECT_MAP, ROUTE, SearchResult, SearchResultContainer, USE_FAKE_ACCESS_TOKEN, UpdateAccountRecoverySettingsDto, UpdatePasswordDto, UpdateProfilePictureDto, UserAccount };
//# sourceMappingURL=esfaenza-core-domain.mjs.map
