import { ReportParam, EsTableColumnsDefinition } from '@esfaenza/es-table';
import { InjectionToken, Type } from '@angular/core';
import { LocalizationService } from '@esfaenza/localizations';

declare class ApplicationMenu {
    title: string;
    link?: string;
    routerLink?: string;
    icon?: string;
    ac?: string;
    wip?: boolean;
    subMenu?: ApplicationMenu[];
    queryParams?: {};
    constructor(title: string, link?: string, routerLink?: string, icon?: string, ac?: string, wip?: boolean, subMenu?: ApplicationMenu[], queryParams?: {});
    static Group(title: string, icon: string, ac: string, wip: boolean, subMenu: ApplicationMenu[], queryParams?: any): ApplicationMenu;
    static TopItem(title: string, icon: string, routerLink?: string, ac?: string, queryParams?: any, wip?: boolean): ApplicationMenu;
    static Item(title: string, routerLink?: string, ac?: string, queryParams?: any, wip?: boolean): ApplicationMenu;
    static Link(title: string, link?: string): ApplicationMenu;
    static ignoreStorage: any;
}

declare class ApplicationJob {
    id: string;
    description: string;
    smalldescription: string;
    percentage: number;
    completed: boolean;
    fileid: string;
    reportid: string;
    complexreportid: string;
    reportpars: ReportParam[];
}

declare class EnvOptions {
    constructor(moduleId: string, moduleDef: number, env: string, varsion: string, description: string);
    AppData: {
        ModuleId: string;
        ModuleDefId: number;
        ComponentEnvironment: string;
        ComponentVersion: string;
        ModuleDescription: string;
    };
    AuthUrl?: string;
    Client?: string;
    JaceDashboardUrl?: string;
    TransactionTimeoutSeconds: number;
    redirectInProgress?: boolean;
}

declare class KeyValue {
    constructor(id: string, description: string);
    id: string;
    description: string;
}

/** Rappresentazione di un oggetto generico */
declare class GenericItem {
    properties: Record<string, string>;
    /**
     * Costruttore
     *
     * @param properties Dizionario Chiave - Valore delle proprietà di questo oggetto generico
     */
    constructor(properties: Record<string, string>);
}

declare const EMBEDDED_ROUTE: string;
declare const ROUTE: string;

declare class ActiveModuleView {
    name: string;
    constructor(name: string);
    idmodule: number;
    altname: string;
    category: string;
    tenant: string;
    uiurl: string;
    environment: string;
    href: string;
}

declare class CategoriesWithModules {
    constructor(module: ActiveModuleView);
    category: string;
    module_rows: ActiveModuleView[][];
}

declare class JaceModule {
    idmodule: number;
    dsname?: string;
    dscategory?: string;
    idmodulealt?: string;
    constructor(idmodule: number, dsname?: string, dscategory?: string, idmodulealt?: string);
    moduleid?: number;
}

declare class JacePermission {
    idpermission: number;
    dspermission?: string;
    idpermissionalt?: string;
    sydatains?: Date;
    syuserins?: string;
    sydataupd?: Date;
    syuserupd?: string;
    permissionidalt?: string;
}

declare class JaceRole {
    idrole: number;
    idrolealt: string;
    dsrole: string;
    constructor(idrole: number, idrolealt: string, dsrole: string);
    dsnote?: string;
    idparent?: number;
    sydatains?: Date;
    syuserins?: string;
    sydataupd?: Date;
    syuserupd?: string;
    roleidalt?: string;
}

declare class AccountScope {
    modules: JaceModule[];
    roles: JaceRole[];
    permissions: JacePermission[];
    constructor(modules?: JaceModule[], roles?: JaceRole[], permissions?: JacePermission[]);
}

declare class JaceAccount {
    idaccount: number;
    iduser: number;
    idtenant: string;
    dsusername: string;
    dspassword: string;
    dtvalidfrom: Date;
    dtvalidto: Date;
    sydatains: Date;
    sydataupd: Date;
    dtlockdown: Date;
    syuserupd: string;
    syuserins: string;
    dsreasonlockdown: string;
    cnattempts: number;
    description: string;
}

declare class JaceIdentity {
    Expired: boolean;
    IdAccount: number;
    IdUser: number;
    DsUser: string;
    FullName: string;
    Idtenant: string;
    TenantName: string;
    IdActor: number;
    IdActorRole: string;
    ExpirationTime: Date;
    constructor(scope?: AccountScope);
    Roles: string[];
    Modules: number[];
    Permissions: string[];
}

declare class JaceUser {
    iduser: number;
    dsnome: string;
    dscognome: string;
    sydatains: Date;
    syuserins: string;
    sydataupd: Date;
    syuserupd: string;
}

declare class SearchResult {
    description: string;
    columns: KeyValue[];
    items: GenericItem[];
    constructor(description: string, columns: KeyValue[], items: GenericItem[]);
    est_cols: EsTableColumnsDefinition[];
}

declare class SearchResultContainer {
    results: SearchResult[];
    constructor(results: SearchResult[]);
}

declare class UpdateAccountRecoverySettingsDto {
    accountid?: string;
    email?: string;
    constructor(accountid?: string, email?: string);
}

declare class UpdatePasswordDto {
    accountid?: string;
    oldpwd?: string;
    newpwd?: string;
    confirmpwd?: string;
    changeall: boolean;
    changeforexternals: boolean;
    constructor(accountid?: string, oldpwd?: string, newpwd?: string, confirmpwd?: string, changeall?: boolean, changeforexternals?: boolean);
}

declare class UpdateProfilePictureDto {
    accountid?: string;
    constructor(accountid?: string);
}

declare class UserAccount {
    id: string;
    tenantid: string;
    username: string;
    typeid: string;
    type: string;
    dtvalidfrom: Date;
    dtvalidto: Date;
    dtlock: Date;
    lockreason: string;
    userid: string;
    userdescription: string;
    uuid: string;
    firstname: string;
    lastname: string;
    recoveryemail: string;
    recoveryphone: string;
    dtottexpiration: Date;
    dtlastlogin: Date;
    lastloginattempts: number;
    islocked: boolean;
    isvalid: boolean;
}

declare class Feed {
    id: string;
    parentid: string;
    title: string;
    content: string;
    severityid: string;
    systemgen: boolean;
    reactions: {
        [user: string]: string;
    };
    user: string;
    pinned: boolean;
    ispublic: boolean;
    dateins: Date;
    dateupd: Date;
    childfeeds: Feed[];
    filename: string;
    filesize: string;
    fileb64: string;
    liked: boolean;
    disliked: boolean;
    likes: string[];
    dislikes: string[];
}

declare class CreateUpdateFeedDto {
    idfeed: string;
    identity: string;
    identitytype: string;
    parentid: string;
    content: string;
    filecontent: number[];
    filename: string;
    ispublic: boolean;
    updatefiledata: boolean;
}

declare class EntityFeedsWidgetConfiguration {
    GetFeedsAPI?: string;
    AllowUserTags?: boolean;
    GetUserTagsAPI?: string;
    AllowReactions?: boolean;
    ReactToFeedAPI?: string;
    AllowAttachments?: boolean;
    GetFeedAttachmentAPI?: string;
    AllowComments?: boolean;
    AllowReplies?: boolean;
    CreateFeedAPI?: string;
    UpdateFeedAPI?: string;
    DeleteFeedAPI?: string;
}

/** Token che indica i default da assegnare agli Input */
declare const REDIRECT_MAP: InjectionToken<{
    [index: string]: {
        url: string;
        params: string[];
    };
}>;
/** Token che indica il servizio di localizzazione utilizzato per i menù */
declare const MENU_LOCALIZATION: InjectionToken<Type<LocalizationService>>;
/** Token che indica i menù dell'applicazione, da quello vegano fino a quello celiaco */
declare const MENU: InjectionToken<ApplicationMenu[]>;
/** Token che indica se il servizio di autenticazione deve utilizzare un token finto */
declare const USE_FAKE_ACCESS_TOKEN: InjectionToken<boolean>;
/** Token che indica se il servizio di autenticazione deve funzionare in anonimo lato Frontend. Dev'essere utilizzato insieme al tag "Auth" in code behind */
declare const ANONYMOUS_MODE: InjectionToken<boolean>;
/** Token che indica i componenti di estensione da aggiungere alla navbar. Verranno bootstrappati in maniera dinamica */
declare const NAVBAR_EXTENSIONS: InjectionToken<Type<any>[]>;
/** 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}) */
declare const LOGIN_URL_LEGACY: InjectionToken<boolean>;

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 };
