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;
    role: DEF.Identity.RolePermissions | null;
    nzTreeCheckedMenuKeys: Array<string>;
    /** menu tree */
    nzData: Array<NzTreeNodeOptions>;
    nzSearchValue: string;
    nzCheckable: boolean;
    permissonMenuTreeFetching: boolean;
    roleMenuUpdating: boolean;
    /** current role's original menu keys */
    oldRoleMenuKeys: Array<string>;
    /** current role's current checked menu keys, change when user check or uncheck any menu */
    newRoleMenuKeys: Array<string>;
    /**
     * map a menu id to its children's length
     */
    private menuChildrenLengthMap;
    /**
     * map a permission code to multiple menu ids
     */
    permissionMenuMap: Map<string, Array<string>>;
    /**
     * map a menu id to a permission code
     */
    menuPermissionMap: Map<string, string>;
    get isMenuKeysChanged(): boolean;
    constructor(translateService: TranslateService, aclService: ACLService);
    ngOnInit(): void;
    ngOnChanges(changes: SimpleChanges): void;
    handleTreeEvent($event: NzFormatEmitEvent): void;
    /**
     * fetch all menus
     */
    private fetchAllMenus;
    /**
     * fetch menus of current role
     */
    private fetchMenusByRole;
    updateRoleMenu(): void;
    /**
     * convert {@link DEF.Identity.PermissonsMenuTree} to {@link NzTreeNodeOptions}
     * @param menus PermissonsMenuTree
     */
    private convertPermissonsMenuTreeToNzTreeNodeOptions;
    /**
     * extract keys from {@link DEF.Identity.PermissonsMenuTree}
     * @param menus PermissonsMenuTree
     */
    private extractKeysFromPermissonsMenuTrees;
    /**
     * extract checked keys from {@link DEF.Identity.PermissonsMenuTree}
     * @param menus PermissonsMenuTree
     */
    private extractCheckedKeysFromPermissonsMenuTrees;
    /**
     * 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;
    handleRefresh(): void;
}
