import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
import { PageEvent } from '@angular/material/paginator';
import { 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 { DepartmentSearchResultModel, QMSDepartmentPagingModel, SelectDepartmentTreeComponent } from '../select-department-tree';
import { SelectDepartmentPopupData } from './model/select-department-popup-data.model';
import * as i0 from "@angular/core";
export declare class SelectDepartmentComponent implements OnInit, OnDestroy, AfterViewInit {
    private cdRef;
    private dialogRef;
    private data;
    trans: TranslateLibraryService;
    ngUnsubscribe: Subject<void>;
    LANG: any;
    treeDepartment: SelectDepartmentTreeComponent;
    onPagingEvent: EventEmitter<PageEvent>;
    popupData: SelectDepartmentPopupData;
    resultSelected: QMSTreeNode[];
    isPushing: boolean;
    onSearchEvent: EventEmitter<string>;
    onCheckNodeEvent: EventEmitter<QMSFlatNodeTree>;
    onExpandNodeEvent: EventEmitter<QMSFlatNodeTree>;
    onLoadMoreEvent: EventEmitter<void>;
    onCheckItemSearchEvent: EventEmitter<{
        state: boolean;
        item: DepartmentSearchResultModel;
    }>;
    onCheckAllItemSearchEvent: EventEmitter<boolean>;
    toggleIncludeChildEvent: EventEmitter<boolean>;
    onValueChange: Subject<QMSTreeNode[]>;
    resultSearch: QMSFlatNodeTree[];
    isActiveViewSearch: boolean;
    get isIncludeChild(): boolean;
    constructor(cdRef: ChangeDetectorRef, dialogRef: MatDialogRef<SelectDepartmentComponent>, data: SelectDepartmentPopupData, trans: TranslateLibraryService);
    ngAfterViewInit(): void;
    onCloseDialog(): void;
    ngOnInit(): void;
    ngOnDestroy(): void;
    get currentTreeData(): QMSTreeNode[];
    displayWhenSelectDepartmentOption($event: any): string | null;
    onScrollToNode(node: QMSTreeNode): void;
    onRemoveNode(node: QMSTreeNode): void;
    /**
   * Gets a list of the data node's subtree of descendent data nodes.
   */
    getChildrenNode(node: QMSFlatNodeTree): QMSFlatNodeTree[];
    onResultDepartmentChange(data: QMSTreeNode[]): void;
    defaultFormatTooltipNode(node: QMSTreeNode): string;
    generateTootip(node: QMSTreeNode): string;
    updateResultSearch(data: QMSDepartmentPagingModel<QMSFlatNodeTree>): void;
    private formatString;
    /**
         * This function use for lazy load children of node
         * @param node node update
         * @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 value to list children existed before.
    */
    updateChildOfNode(node: QMSFlatNodeTree, data: QMSFlatNodeTree[], mode?: 'insert' | 'update'): void;
    addRootTree(data?: QMSFlatNodeTree[]): void;
    /**
   * 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;
    /**
   * This method use for lazy mode, do some thing before init list node selected
   * @param callback
   * @returns
   */
    onBeforeInitNodeSelected(callback?: () => void | Promise<void>): Promise<void>;
    /**
     * Get node by id of node
     * @param nodeId id of node
     * @returns
     */
    findNode(nodeId: string): QMSFlatNodeTree;
    /**
   * This method use for lazy mode, do some thing before select all result search
   * @param callback
   * @returns
   */
    onBeforeCheckAllSearch(callback?: (data: any) => void | Promise<void>): Promise<void>;
    /**
  * This method use for lazy mode, do some thing before check item result
  * @param callback
  * @returns
  */
    onBeforeCheckItemSearch(item: DepartmentSearchResultModel, callback?: (item: DepartmentSearchResultModel) => void | Promise<void>): Promise<void>;
    setLoadingStateNode(isLoading: any, nodeId: string): void;
    /**
     * Select a value or an array of values.
     */
    onSelectNode(...nodeIds: string[]): void;
    /**
     * Deselects a value or an array of values.
     */
    onDeselectNode(...nodeIds: string[]): void;
    /**
    * Toggles a value between selected and deselected.
    */
    onToggleNode(nodeId: string): void;
    getNodeById(nodeId: string): QMSFlatNodeTree;
    isNodeLoading(nodeId: string): boolean;
    setLoadingMore(state: boolean): void;
    setLoading(state: boolean): void;
    setLoadingNode(nodeId: string, state: boolean): void;
    updateTreeData(data?: QMSTreeNode[]): void;
    onDestroyLoadMore(): void;
    setSelectedListData(data: any): void;
    getCheckedStatusNode(node: QMSFlatNodeTree): boolean;
    updateNodeInformation(node: QMSFlatNodeTree): void;
    updateSelectedResultData(node: QMSFlatNodeTree): void;
    getAllParentNode(node: QMSFlatNodeTree): QMSFlatNodeTree[];
    onCheckNode(node: QMSFlatNodeTree, fireEventCheckNode?: boolean): void;
    getChildrenSelected(node: QMSFlatNodeTree): QMSFlatNodeTree[];
    isPushingChildNodes(val: boolean): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<SelectDepartmentComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SelectDepartmentComponent, "qms-select-department", never, {}, { "onPagingEvent": "onPagingEvent"; "onSearchEvent": "onSearchEvent"; "onCheckNodeEvent": "onCheckNodeEvent"; "onExpandNodeEvent": "onExpandNodeEvent"; "onLoadMoreEvent": "onLoadMoreEvent"; "onCheckItemSearchEvent": "onCheckItemSearchEvent"; "onCheckAllItemSearchEvent": "onCheckAllItemSearchEvent"; "toggleIncludeChildEvent": "toggleIncludeChildEvent"; }, never, never, false, never>;
}
