import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { NzFormatEmitEvent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { TranslateService } from '@ngx-translate/core';
import { ACLService } from '@delon/acl';
import { DEF } from '../../../../api';
/**
 * menu permission tree
 */
export declare class IdentityRoleMenusComponent implements OnInit, OnChanges {
    private translateService;
    private aclService;
    /**
     * map a menu id to a permission code
     */
    menuPermissionMap: Map<string, string>;
    /** current role's current checked menu keys, change when user check or uncheck any menu */
    newRoleMenuKeys: Array<string>;
    nzCheckable: boolean;
    /** menu tree */
    nzData: Array<NzTreeNodeOptions>;
    nzSearchValue: string;
    nzTreeCheckedMenuKeys: Array<string>;
    /** current role's original menu keys */
    oldRoleMenuKeys: Array<string>;
    /**
     * map a permission code to multiple menu ids
     */
    permissionMenuMap: Map<string, Array<string>>;
    permissonMenuTreeFetching: boolean;
    role: DEF.Identity.RolePermissions | null;
    roleMenuUpdating: boolean;
    /**
     * map a menu id to its children's length
     */
    private menuChildrenLengthMap;
    constructor(translateService: TranslateService, aclService: ACLService);
    get isMenuKeysChanged(): boolean;
    handleRefresh(): void;
    handleTreeEvent($event: NzFormatEmitEvent): void;
    ngOnChanges(changes: SimpleChanges): void;
    ngOnInit(): void;
    updateRoleMenu(): void;
    /**
     * convert {@link DEF.Identity.PermissonsMenuTree} to {@link NzTreeNodeOptions}
     * @param menus PermissonsMenuTree
     */
    private convertPermissonsMenuTreeToNzTreeNodeOptions;
    /**
     * extract checked keys from {@link DEF.Identity.PermissonsMenuTree}
     * @param menus PermissonsMenuTree
     */
    private extractCheckedKeysFromPermissonsMenuTrees;
    /**
     * extract keys from {@link DEF.Identity.PermissonsMenuTree}
     * @param menus PermissonsMenuTree
     */
    private extractKeysFromPermissonsMenuTrees;
    /**
     * fetch all menus
     */
    private fetchAllMenus;
    /**
     * fetch menus of current role
     */
    private fetchMenusByRole;
    /**
     * whether a menu should be checked,
     * a menu should be checked only if all of its children is checked, recursively
     * @param menu PermissonsMenuTree
     */
    private shouldCheckMenu;
}
