import { AfterContentChecked, AfterContentInit, AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog';
import { PageEvent } from '@angular/material/paginator';
import { MatSelectChange } from '@angular/material/select';
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 { PaginationSize, QMSPaginatorComponent } from '../qms-paginator';
import { ISelectionNodeChange } from '../select-department-tree';
import { SelectDepartmentTreeComponent } from '../select-department-tree/select-department-tree.component';
import { OptionSelectAccessEnum } from './common/option-select-access.enum';
import { QMSAccessItem } from './model/access-item.model';
import { QMSAccessPagingChangeModel, QMSAccessPagingModel } from './model/access-paging.model';
import { FilterPersonModel } from './model/filter-person.model';
import { OptionSelectAccessModel } from './model/option-select-access.model';
import { QMSSelectAccessDialog } from './model/select-access-config.model';
import { QMSSelectAccessResult } from './model/select-access-data';
import * as i0 from "@angular/core";
export declare class QMSSelectAccessDialogComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentInit, AfterContentChecked {
    private dialogRef;
    dialogData: QMSSelectAccessDialog;
    translate: TranslateLibraryService;
    private _fb;
    private cdRef;
    ngUnsubcribe: Subject<void>;
    LANG: any;
    optionSelect: UntypedFormControl;
    OPTION_ENUM: typeof OptionSelectAccessEnum;
    options: OptionSelectAccessModel[];
    private _departmentSelected;
    get selectedDepartments(): QMSFlatNodeTree[];
    personForm: UntypedFormGroup;
    userGroupForm: UntypedFormControl;
    getLoading$: BehaviorSubject<boolean>;
    onSearchPersonEvent: EventEmitter<FilterPersonModel>;
    onSearchPersonFreeTextEvent: EventEmitter<any>;
    onSearchUserGroupEvent: EventEmitter<string>;
    onSearchDepartmentEvent: EventEmitter<any>;
    onSearchDepartmentPagingEvent: EventEmitter<string>;
    departmentSearchForm: UntypedFormControl;
    onPagingEvent: EventEmitter<QMSAccessPagingChangeModel>;
    onSelectOptionChange$: Subject<MatSelectChange>;
    treeDepartment: SelectDepartmentTreeComponent;
    set tree(data: SelectDepartmentTreeComponent);
    pagingPerson: QMSPaginatorComponent;
    pagingUserGroup: QMSPaginatorComponent;
    pagingDepartment: QMSPaginatorComponent;
    /** list filtered by search keyword */
    optionFilterPersonDataGlobal: {
        departments: QMSFlatNodeTree[];
        userGroups: QMSAccessItem[];
    };
    filteredSearchTextBox: {
        department: BehaviorSubject<QMSFlatNodeTree[]>;
        userGroup: BehaviorSubject<QMSAccessItem[]>;
    };
    getPerson$: BehaviorSubject<QMSAccessPagingModel<QMSAccessItem>>;
    get personFiltered(): QMSAccessItem[];
    getUserGroup$: BehaviorSubject<QMSAccessPagingModel<QMSAccessItem>>;
    get userGroupFiltered(): QMSAccessItem[];
    getDepartment$: BehaviorSubject<QMSAccessPagingModel<QMSAccessItem>>;
    get departmentFiltered(): QMSAccessItem[];
    PAGINATION_SIZE: typeof PaginationSize;
    PAGE_SIZE_OPTION: number[];
    resultAccess: QMSSelectAccessResult;
    arrSkeleton: any[];
    getSearching$: BehaviorSubject<boolean>;
    constructor(dialogRef: MatDialogRef<QMSSelectAccessDialogComponent>, dialogData: QMSSelectAccessDialog, translate: TranslateLibraryService, _fb: UntypedFormBuilder, cdRef: ChangeDetectorRef);
    ngAfterContentChecked(): void;
    ngAfterContentInit(): void;
    ngAfterViewInit(): void;
    ngOnInit(): void;
    ngOnDestroy(): void;
    private _buildOptionSelect;
    private _initResultAccess;
    private _filterOptionPersonChange;
    getResultTabActive(): any;
    checkExistOptionSelect(option: OptionSelectAccessEnum): boolean;
    private buildPersonForm;
    onFilterPerson(): void;
    private _resetPaginator;
    onSearchPersonFreeText(): void;
    onFilterUserGroup(): void;
    onFilterDepartment(): void;
    onSelectItem(type: OptionSelectAccessEnum, item: QMSAccessItem): void;
    onRemoveChip(type: OptionSelectAccessEnum, item: any, index: any): void;
    onSelectionTypeChange(event: MatSelectChange): void;
    setFormControlValue(formControlNames: string[], values: any): void;
    isCheckAll(type: OptionSelectAccessEnum): boolean;
    isDisabledSelectAll(type: OptionSelectAccessEnum): boolean;
    isIndeterminate(type: OptionSelectAccessEnum): boolean;
    onCheckAll(type: OptionSelectAccessEnum, $event: any): void;
    onSelectionNodeDepartmentChange({ added, removed, updated }: ISelectionNodeChange<QMSTreeNode>): void;
    onScollToNodeTreeDepartment(node: QMSTreeNode): void;
    trackByFn(index: any, item: any): any;
    updatePersonFilter(data: QMSAccessPagingModel<QMSAccessItem>): void;
    updateUserGroupFilter(data: QMSAccessPagingModel<QMSAccessItem>): void;
    onPaginatorEvent(val: PageEvent, type: OptionSelectAccessEnum): void;
    onResultDepartmentChange(event: QMSTreeNode[]): void;
    updateResultSearchDepartment(data?: QMSAccessPagingModel<QMSFlatNodeTree>): void;
    updateDepartmentFilter(data: QMSAccessPagingModel<QMSAccessItem>): void;
    generateTooltip(node: any): string;
    private formatString;
    hasItemSelected(): boolean;
    updateDepartment(data?: QMSTreeNode[]): void;
    updateOptionPersonFilter(departmentFilter?: QMSFlatNodeTree[], userGroupFilter?: QMSAccessItem[]): void;
    setDefaultPageSizeOption(data: number[]): void;
    allowRemove: (type: OptionSelectAccessEnum, item: any) => boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<QMSSelectAccessDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<QMSSelectAccessDialogComponent, "qms-select-access-dialog", never, {}, {}, never, never, false, never>;
}
