import { SelectionModel } from '@angular/cdk/collections';
import { Overlay } from '@angular/cdk/overlay';
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
import { FlatTreeControl } from '@angular/cdk/tree';
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnInit, ViewContainerRef } from '@angular/core';
import { UntypedFormControl } from '@angular/forms';
import { MatIconRegistry } from '@angular/material/icon';
import { PageEvent } from '@angular/material/paginator';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { DomSanitizer } from '@angular/platform-browser';
import { BehaviorSubject, Subject } from 'rxjs';
import { QMSFlatNodeTree } from '../../common/models/qms-flat-node.model';
import { QMSTreeNode } from '../../common/models/qms-tree-node.model';
import { TranslateLibraryService } from '../../services/translation-registry.service';
import { QMSIconRegistryService } from '../app-icon/icon-registry.service';
import { PaginationSize, QMSPaginatorComponent } from '../qms-paginator';
import { ItemIconType } from '../related/common/item-icon-type.enum';
import { DepartmentLocationBreadCrumb, DepartmentSearchResultModel, ISelectionNodeChange, ModeDepartmentTreeeViewEnum, QMSDepartmentPagingModel, QMSSelectDepartmentTreeConfig, QMSSelectDepartmentTreeGlobalService } from '../select-department-tree';
import * as i0 from "@angular/core";
export declare class SelectProcessDataTreeComponent implements OnInit, AfterViewInit, AfterContentInit {
    private cdRef;
    private domSanitizer;
    private appIconService;
    private iconRegistry;
    private eleRef;
    trans: TranslateLibraryService;
    overlay: Overlay;
    viewContainerRef: ViewContainerRef;
    private treeDepartmentService;
    LANG: any;
    readonly spinnerArr: any[];
    arrSkeleton: any[];
    set rowsSkeleton(value: number);
    height: string;
    config: QMSSelectDepartmentTreeConfig;
    isIncludeChildren: boolean;
    get departmentRoots(): QMSFlatNodeTree[];
    get isAllDepartmentSelected(): boolean;
    get isIndeterminateCheckboxAllTree(): boolean;
    onSearchEvent: EventEmitter<string>;
    onPagingSearchEvent: EventEmitter<PageEvent>;
    onValueChangeEvent: EventEmitter<QMSTreeNode[]>;
    selectionNodeChangeEvent: EventEmitter<ISelectionNodeChange<QMSTreeNode>>;
    onCheckNodeEvent: EventEmitter<QMSFlatNodeTree>;
    onExpandNodeEvent: EventEmitter<QMSFlatNodeTree>;
    onLoadMoreEvent: EventEmitter<void>;
    onCheckItemSearchEvent: EventEmitter<{
        state: boolean;
        item: DepartmentSearchResultModel;
    }>;
    onCheckAllItemSearchEvent: EventEmitter<boolean>;
    toggleIncludeChildEvent: EventEmitter<boolean>;
    cdkVirtualScrollViewport: CdkVirtualScrollViewport;
    paginatorSearch: QMSPaginatorComponent;
    readonly MODE_VIEW_ENUM: typeof ModeDepartmentTreeeViewEnum;
    ITEM_SIZE: number;
    readonly ngUnsubscribe: Subject<void>;
    resultSearchSelected: QMSTreeNode[];
    resultSelected: QMSTreeNode[];
    readonly getDataTree$: BehaviorSubject<QMSTreeNode[]>;
    readonly searchDepartment$: BehaviorSubject<QMSDepartmentPagingModel<QMSFlatNodeTree>>;
    resultSearch: DepartmentSearchResultModel[];
    get currentTreeData(): QMSTreeNode[];
    get isSelectAllResultSearch(): boolean;
    get indeterminateSearchResult(): boolean;
    readonly getIndexView$: BehaviorSubject<number>;
    readonly scrollToNodeEvent$: Subject<string>;
    readonly getActiveNodeEvent$: Subject<string>;
    activeNode: string;
    readonly PAGINATION_SIZE: typeof PaginationSize;
    PAGE_SIZE_OPTION: number[];
    CURRENT_PAGESIZE: number;
    readonly nestedTreeNodeMap: Map<QMSTreeNode, QMSFlatNodeTree>;
    readonly flatTreeNodeMap: Map<QMSFlatNodeTree, QMSTreeNode>;
    readonly checkListSelection: SelectionModel<QMSFlatNodeTree>;
    readonly checkListSelectionSearch: SelectionModel<DepartmentSearchResultModel>;
    treeControl: FlatTreeControl<QMSFlatNodeTree>;
    treeFlattener: MatTreeFlattener<QMSTreeNode, QMSFlatNodeTree>;
    dataSource: MatTreeFlatDataSource<QMSTreeNode, QMSFlatNodeTree>;
    dataSourceTreeSearch: MatTreeFlatDataSource<QMSTreeNode, QMSFlatNodeTree>;
    private _selectedList;
    private readonly selectedListAfterDataNodeChange$;
    formSearchControl: UntypedFormControl;
    readonly getLoading$: BehaviorSubject<boolean>;
    readonly getLoadingMore$: BehaviorSubject<boolean>;
    readonly untilDestroyLoadMore$: Subject<void>;
    readonly onBeforeInitNodeSelected$: Subject<void>;
    readonly textSearchSubject$: BehaviorSubject<string>;
    itemIconType: typeof ItemIconType;
    private readonly _transformer;
    private readonly getLevel;
    private readonly _getChild;
    private readonly isExpandable;
    hasChild: (_: number, node: QMSFlatNodeTree) => boolean;
    private readonly _handlingLazyObject;
    constructor(cdRef: ChangeDetectorRef, domSanitizer: DomSanitizer, appIconService: QMSIconRegistryService, iconRegistry: MatIconRegistry, eleRef: ElementRef, trans: TranslateLibraryService, overlay: Overlay, viewContainerRef: ViewContainerRef, treeDepartmentService: QMSSelectDepartmentTreeGlobalService);
    ngAfterContentInit(): void;
    ngAfterViewInit(): void;
    ngOnInit(): void;
    ngOnDestroy(): void;
    onDestroyLoadMore(): void;
    private _initTreeData;
    private _handleListSelected;
    private _initListSelected;
    private _handleAfterDataNodeChangeEvent;
    /**
     * This method use for lazy mode, do some thing before init list node selected
     * @param callback
     * @returns
     */
    onBeforeInitNodeSelected(callback?: () => void | Promise<void>): Promise<void>;
    private _handleItemSelectionChanged;
    private _onSelectionNodeChangeEvent;
    private _handleSearchEvent;
    private _handleActiveNodeEvent;
    updateDataTree(data: QMSTreeNode[]): void;
    setLoadingStateNode(isLoading: boolean, nodeId: string): void;
    onExpandNode(node: QMSFlatNodeTree): void;
    onOptionSearchSelected(value: QMSFlatNodeTree): void;
    onCheckAllRootTreeNode(): void;
    onCheckNode(node: QMSFlatNodeTree, fireEventCheckNode?: boolean): void;
    private _handleSelectOne;
    onExpandAllParent(node: QMSFlatNodeTree): void;
    onRemoveNode(nodeId: string): void;
    onSelectNode(...nodeIds: string[]): void;
    onDeselectNode(...nodeIds: string[]): void;
    /**
     * Toggles a value between selected and deselected.
     * @param nodeId :id of node
     */
    onToggleNode(nodeId: string): void;
    isIndeterminate(node: QMSFlatNodeTree): boolean;
    isCheckAll(node: QMSFlatNodeTree): boolean;
    /**
     * This function handle check node of tree
     * @param node node of tree
     * @param callback do something before handle check node
     * @returns
     */
    onBeforeCheckNode(node: QMSFlatNodeTree, callback?: (node: QMSFlatNodeTree) => void | Promise<void>): Promise<void>;
    handleCheckNode(node: QMSFlatNodeTree): void;
    private resetNode;
    isSelectedNode(node: QMSFlatNodeTree): boolean;
    getChildrenSelected(node: QMSFlatNodeTree): QMSFlatNodeTree[];
    /**
     * Gets a list of the data node's subtree of descendent data nodes.
     * @param node
     * @returns
     */
    getListChildrenOfNode(node: QMSFlatNodeTree): QMSFlatNodeTree[];
    private _mapToNestedListNode;
    convertToNestedNode(node: QMSFlatNodeTree): QMSTreeNode;
    convertToFlatNode(node: QMSTreeNode): QMSFlatNodeTree;
    getAllParentNode(node: QMSFlatNodeTree): QMSFlatNodeTree[];
    getParentNode(node: QMSFlatNodeTree): QMSFlatNodeTree | undefined;
    getItemIconType(item: QMSFlatNodeTree): ItemIconType.name | ItemIconType.path | ItemIconType.svg;
    private onScrollIntoNode;
    onSearch(): void;
    setResultSearch(data: QMSDepartmentPagingModel<QMSFlatNodeTree>): void;
    onClickResultItem(item: DepartmentSearchResultModel): void;
    onBreadCrumbItemClick(item: DepartmentLocationBreadCrumb): void;
    onCheckItemSearchResult(item: DepartmentSearchResultModel): void;
    onBeforeCheckItemSearch(item: DepartmentSearchResultModel, callback?: (item: DepartmentSearchResultModel) => void | Promise<void>): Promise<void>;
    onBeforeCheckAllSearch(callback?: (data: any) => void | Promise<void>): Promise<void>;
    canHandleItemSearchResult(item: DepartmentSearchResultModel): boolean;
    private _mapToResultSearch;
    private _handleCheckResutlSearch;
    isSelectItemSearch(id: string): boolean;
    private _updateSelectedList;
    onSelectAllSearchResult(checked: any): void;
    isDisableChecboxAllSearch(): boolean;
    onPagingSearchResult(val: PageEvent): void;
    scrollToNode(nodeId: string): void;
    setIndexView(index: number): void;
    canActiveNodeExternal(node: QMSFlatNodeTree): boolean;
    getHeightStyleRefNode(nodeId: string): string;
    private getSelectedNodeStorage;
    private setSelectedNodeStorage;
    setDefaultPaginatorSize(options: number[]): void;
    trackBy(index: number, item: QMSFlatNodeTree): QMSFlatNodeTree;
    /**
         * This function use for lazy load children of node
         * @param node node update. if node is null data auto insert as roots
         * @param data list children to update node.
         * @param mode default is update that replace current list children by new list children , if mode = 'insert' will insert new values to list children existed before.
    */
    updateChildOfNode(node: QMSFlatNodeTree, data?: QMSFlatNodeTree[], mode?: 'insert' | 'update'): void;
    private _reUpdateSelectionNode;
    checkLoadingOfParent(node: QMSFlatNodeTree): void;
    getNodeById(id: string): QMSFlatNodeTree | undefined;
    getRootOfNode(node: QMSFlatNodeTree): QMSFlatNodeTree | undefined;
    addRootTree(data?: QMSFlatNodeTree[]): void;
    getCheckedStatusNode(node: QMSFlatNodeTree): boolean;
    updateNodeInformation(node: QMSFlatNodeTree): void;
    updateSelectedResultData(node: QMSFlatNodeTree): void;
    callCheckNodeOutside(node: QMSFlatNodeTree): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<SelectProcessDataTreeComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SelectProcessDataTreeComponent, "qms-select-process-data-tree", never, { "rowsSkeleton": { "alias": "rowsSkeleton"; "required": false; }; "height": { "alias": "height"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "onSearchEvent": "onSearchEvent"; "onPagingSearchEvent": "onPagingSearchEvent"; "onValueChangeEvent": "onValueChangeEvent"; "selectionNodeChangeEvent": "selectionNodeChangeEvent"; "onCheckNodeEvent": "onCheckNodeEvent"; "onExpandNodeEvent": "onExpandNodeEvent"; "onLoadMoreEvent": "onLoadMoreEvent"; "onCheckItemSearchEvent": "onCheckItemSearchEvent"; "onCheckAllItemSearchEvent": "onCheckAllItemSearchEvent"; "toggleIncludeChildEvent": "toggleIncludeChildEvent"; }, never, never, false, never>;
}
