import { Component, EventEmitter, Inject, Output, ViewChild } from '@angular/core';
import { MAT_CHECKBOX_DEFAULT_OPTIONS } from '@angular/material/checkbox';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import * as _ from 'lodash';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { SelectDepartmentAnimationTrigger } from './common/animation';
import { SelectDepartmentPopupData } from './model/select-department-popup-data.model';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "../../services/translation-registry.service";
import * as i3 from "@angular/common";
import * as i4 from "../../directives/chips/chip.directive";
import * as i5 from "../../directives/chips/chip-body.directive";
import * as i6 from "../../directives/tooltip/tooltip-renderer.directive";
import * as i7 from "../../directives/content-changes.directive";
import * as i8 from "@angular/material/icon";
import * as i9 from "../button/button";
import * as i10 from "@angular/material/progress-spinner";
import * as i11 from "@angular/material/chips";
import * as i12 from "../select-department-tree/select-department-tree.component";
import * as i13 from "@angular/material/divider";
import * as i14 from "./model/select-department-popup-data.model";
export class SelectDepartmentComponent {
    get isIncludeChild() {
        return !!this.treeDepartment && this.treeDepartment.isIncludeChildren;
    }
    constructor(cdRef, dialogRef, data, trans) {
        this.cdRef = cdRef;
        this.dialogRef = dialogRef;
        this.data = data;
        this.trans = trans;
        this.ngUnsubscribe = new Subject();
        this.onPagingEvent = new EventEmitter();
        this.popupData = new SelectDepartmentPopupData();
        this.resultSelected = [];
        this.onSearchEvent = new EventEmitter();
        this.onCheckNodeEvent = new EventEmitter();
        this.onExpandNodeEvent = new EventEmitter();
        this.onLoadMoreEvent = new EventEmitter();
        this.onCheckItemSearchEvent = new EventEmitter();
        this.onCheckAllItemSearchEvent = new EventEmitter();
        this.toggleIncludeChildEvent = new EventEmitter();
        this.onValueChange = new Subject();
        this.resultSearch = [];
        this.isActiveViewSearch = false;
        this.trans.getLanguageSubject$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((res) => {
            if (res) {
                this.LANG = this.trans.getObjectLang(res);
            }
        });
        // Init popup data
        this.popupData = _.cloneDeep(this.data);
    }
    ngAfterViewInit() {
        this.cdRef.detectChanges();
    }
    onCloseDialog() {
        this.dialogRef.close(this.treeDepartment.resultSelected);
    }
    ngOnInit() {
    }
    ngOnDestroy() {
        this.ngUnsubscribe.next();
        this.ngUnsubscribe.complete();
    }
    get currentTreeData() {
        return this.treeDepartment ? this.treeDepartment.currentTreeData : [];
    }
    displayWhenSelectDepartmentOption($event) {
        return '';
    }
    onScrollToNode(node) {
        // this.treeDepartment.scrollToNode(node.id);
    }
    onRemoveNode(node) {
        this.treeDepartment.onRemoveNode(node.id);
    }
    /**
   * Gets a list of the data node's subtree of descendent data nodes.
   */
    getChildrenNode(node) {
        return this.treeDepartment.getListChildrenOfNode(node);
    }
    onResultDepartmentChange(data) {
        this.resultSelected = data.map(item => {
            return {
                ...item,
                tooltip: this.generateTootip(item)
            };
        });
        this.onValueChange.next(this.resultSelected);
    }
    defaultFormatTooltipNode(node) {
        return node.isGroup ? this.formatString(this.popupData.config.tooltipIncludeLabel ? this.popupData.config.tooltipIncludeLabel : this.LANG.TOOLTIP_INCLUDE_SUB_DEPARTMENT, node.name, node.children.length.toString()) : node.name;
    }
    generateTootip(node) {
        return !!this.popupData.formatTooltipItemResult ? this.popupData.formatTooltipItemResult(node) : this.defaultFormatTooltipNode(node);
    }
    updateResultSearch(data) {
        if (!this.treeDepartment)
            return;
        this.treeDepartment.setResultSearch(data);
    }
    formatString(...replacements) {
        let result = arguments[0];
        for (let i = 0; i < arguments.length - 1; i++) {
            const reg = new RegExp(`\\{${i}\\}`, 'gm');
            result = result.replace(reg, arguments[i + 1]);
        }
        return result;
    }
    /**
         * 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, data, mode = 'update') {
        this.treeDepartment.updateChildOfNode(node, data, mode);
    }
    addRootTree(data = []) {
        this.treeDepartment.addRootTree(data);
    }
    /**
   * This function handle check node of tree
   * @param node node of tree
   * @param callback do something before handle check node
   * @returns
   */
    onBeforeCheckNode(node, callback) {
        return this.treeDepartment.onBeforeCheckNode(node, callback);
    }
    handleCheckNode(node) {
        if (!this.treeDepartment)
            return;
        this.treeDepartment.handleCheckNode(node);
    }
    /**
   * This method use for lazy mode, do some thing before init list node selected
   * @param callback
   * @returns
   */
    async onBeforeInitNodeSelected(callback) {
        if (!this.treeDepartment)
            return;
        if (!!callback)
            await this.treeDepartment.onBeforeInitNodeSelected(callback);
    }
    /**
     * Get node by id of node
     * @param nodeId id of node
     * @returns
     */
    findNode(nodeId) {
        if (!this.treeDepartment)
            return;
        return this.treeDepartment.treeControl.dataNodes.find(node => node.id === nodeId.toString());
    }
    /**
   * This method use for lazy mode, do some thing before select all result search
   * @param callback
   * @returns
   */
    async onBeforeCheckAllSearch(callback) {
        if (!this.treeDepartment)
            return;
        await this.treeDepartment.onBeforeCheckAllSearch(callback);
    }
    /**
  * This method use for lazy mode, do some thing before check item result
  * @param callback
  * @returns
  */
    onBeforeCheckItemSearch(item, callback) {
        return this.treeDepartment.onBeforeCheckItemSearch(item, callback);
    }
    setLoadingStateNode(isLoading, nodeId) {
        !!this.treeDepartment && this.treeDepartment.setLoadingStateNode(isLoading, nodeId);
    }
    /**
     * Select a value or an array of values.
     */
    onSelectNode(...nodeIds) {
        this.treeDepartment.onSelectNode(...nodeIds);
    }
    /**
     * Deselects a value or an array of values.
     */
    onDeselectNode(...nodeIds) {
        this.treeDepartment.onDeselectNode(...nodeIds);
    }
    /**
    * Toggles a value between selected and deselected.
    */
    onToggleNode(nodeId) {
        this.treeDepartment.onToggleNode(nodeId);
    }
    getNodeById(nodeId) {
        return this.treeDepartment.getNodeById(nodeId);
    }
    isNodeLoading(nodeId) {
        if (!this.treeDepartment)
            return false;
        const node = this.treeDepartment.getNodeById(nodeId);
        return !!node && node.isLoading;
    }
    setLoadingMore(state) {
        if (!this.treeDepartment)
            return;
        this.treeDepartment.getLoadingMore$.next(state);
    }
    setLoading(state) {
        if (!this.treeDepartment)
            return;
        this.treeDepartment.getLoading$.next(state);
    }
    setLoadingNode(nodeId, state) {
        if (!this.treeDepartment)
            return;
        const node = this.treeDepartment.getNodeById(nodeId);
        if (!!node)
            node.isLoading = state;
    }
    updateTreeData(data = this.currentTreeData) {
        !!this.treeDepartment && this.treeDepartment.updateDataTree(data);
    }
    onDestroyLoadMore() {
        this.treeDepartment.onDestroyLoadMore();
    }
    setSelectedListData(data) {
        this.popupData.config.selectedList = data;
    }
    getCheckedStatusNode(node) {
        return this.treeDepartment.getCheckedStatusNode(node);
    }
    updateNodeInformation(node) {
        return this.treeDepartment.updateNodeInformation(node);
    }
    updateSelectedResultData(node) {
        return this.treeDepartment.updateSelectedResultData(node);
    }
    getAllParentNode(node) {
        return this.treeDepartment.getAllParentNode(node);
    }
    onCheckNode(node, fireEventCheckNode = true) {
        return this.treeDepartment.onCheckNode(node, fireEventCheckNode);
    }
    getChildrenSelected(node) {
        return this.treeDepartment.getChildrenSelected(node);
    }
    isPushingChildNodes(val) {
        this.isPushing = val;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectDepartmentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.TranslateLibraryService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectDepartmentComponent, selector: "qms-select-department", outputs: { onPagingEvent: "onPagingEvent", onSearchEvent: "onSearchEvent", onCheckNodeEvent: "onCheckNodeEvent", onExpandNodeEvent: "onExpandNodeEvent", onLoadMoreEvent: "onLoadMoreEvent", onCheckItemSearchEvent: "onCheckItemSearchEvent", onCheckAllItemSearchEvent: "onCheckAllItemSearchEvent", toggleIncludeChildEvent: "toggleIncludeChildEvent" }, providers: [
            {
                provide: MAT_CHECKBOX_DEFAULT_OPTIONS,
                useValue: {
                    clickAction: 'noop'
                }
            }
        ], viewQueries: [{ propertyName: "treeDepartment", first: true, predicate: ["treeDepartment"], descendants: true }], ngImport: i0, template: "<h3 mat-dialog-title class=\"more-action\">\n  {{popupData.headerName}}\n  <button matDialogClose class=\"close-btn\" color=\"light\" qms-btn-icon>\n    <mat-icon>close</mat-icon>\n  </button>\n</h3>\n<mat-dialog-content>\n  <div class=\"qms-scrollbar\">\n    <div>\n      <qms-select-department-tree #treeDepartment customClass=\"custom-department-tree\"\n        [height]=\"popupData.config.isMobile ? '38vh' : '34vh'\" [rowsSkeleton]=\"9\" [config]=\"popupData.config\"\n        (onSearchEvent)=\"onSearchEvent.emit($event)\" (onValueChangeEvent)=\"onResultDepartmentChange($event)\"\n        (onPagingSearchEvent)=\"onPagingEvent.emit($event)\" (onCheckNodeEvent)=\"onCheckNodeEvent.emit($event)\"\n        (onExpandNodeEvent)=\"onExpandNodeEvent.emit($event)\" (onLoadMoreEvent)=\"onLoadMoreEvent.emit()\"\n        (onCheckAllItemSearchEvent)=\"onCheckAllItemSearchEvent.emit($event)\"\n        (onCheckItemSearchEvent)=\"onCheckItemSearchEvent.emit($event)\"\n        (toggleIncludeChildEvent)=\"toggleIncludeChildEvent.emit($event)\"\n        (isPushingChildNodes)=\"isPushingChildNodes($event)\">\n      </qms-select-department-tree>\n    </div>\n  </div>\n  <div class=\"line__divider\"></div>\n  <div [@heightAnimation]\n    *ngIf=\"treeDepartment && !!treeDepartment.resultSelected.length && !popupData.hidePanelResult && !popupData.config.moveLocationMode\"\n    class=\" pr-0 pe-0\">\n    <div class=\"header-title\">{{popupData.resultTitle || LANG.RESULT}}</div>\n    <div class=\"result-content pr-0 pe-0\">\n      <mat-chip-set class=\"panel__item qms-scrollbar\">\n        <ng-container *ngFor=\"let item of treeDepartment.resultSelected\">\n          <mat-chip [@updateItemAnimation] *qmsContentChanges=\"item.children?.length\"\n            [qms-tool-tip]=\"generateTootip(item)\" position=\"top\" mode=\"dark\" qms-chip [removable]=\"true\">\n            <span (click)=\"onScrollToNode(item)\" qms-chip-body>\n              <span class=\"related__item__content_name\" #itemName>\n                <span>{{item.name}}</span>\n                <span class=\"select__include-children__count\" *ngIf=\"!!item?.isGroup && !popupData.config.lazy\">\n                  {{item.children.length}}/{{item.childCount}}\n                </span>\n                <span class=\"select__include-children__count\" *ngIf=\"!!item?.isGroup && popupData.config.lazy\">\n                  {{item.selectedChildCount || item.children.length}}/{{item.childCount}}\n                </span>\n              </span>\n            </span>\n            <ng-container *ngIf=\"isNodeLoading(item.id)\" [ngTemplateOutlet]=\"loadingSpinner\"></ng-container>\n            <button matChipRemove (click)=\"onRemoveNode(item)\"\n              *ngIf=\"!treeDepartment.isDisabledNode(item.id) && !isNodeLoading(item.id)\">\n              <mat-icon>cancel</mat-icon>\n            </button>\n          </mat-chip>\n        </ng-container>\n      </mat-chip-set>\n    </div>\n  </div>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n  <mat-divider *ngIf=\"treeDepartment && !!treeDepartment.resultSelected.length && !popupData.hidePanelResult\"\n    class=\"w-100 mb-3\"></mat-divider>\n  <button class=\"me-2\" qms-btn-text mat-dialog-close>\n    {{LANG.CANCEL}}\n  </button>\n  <button (click)=\"onCloseDialog()\" class=\"btn-add\"\n    [disabled]=\"(!treeDepartment.resultSelected.length && !popupData.config.canAddNullResult) || isPushing\"\n    [class.qms-btn-disabled]=\"(!treeDepartment.resultSelected.length && !popupData.config.canAddNullResult) || isPushing\"\n    qms-btn>\n    <span>{{LANG.ADD}}</span>\n    <span *ngIf=\"!popupData.config.moveLocationMode\">\n      ({{treeDepartment.resultSelected.length}})\n    </span>\n  </button>\n</mat-dialog-actions>\n<!-- Loading spinner -->\n<ng-template #loadingSpinner>\n  <div class=\"qms-spinner-wrapper\">\n    <div class=\"qms-spinner center\">\n      <mat-spinner [diameter]=\"20\" [strokeWidth]=\"2\" color=\"primary\"></mat-spinner>\n    </div>\n  </div>\n</ng-template>", styles: ["@font-face{font-family:icomoon;src:url(/assets/fonts/icomoon.eot?aghldx);src:url(/assets/fonts/icomoon.eot?aghldx#iefix) format(\"embedded-opentype\"),url(/assets/fonts/icomoon.ttf?aghldx) format(\"truetype\"),url(/assets/fonts/icomoon.woff?aghldx) format(\"woff\"),url(/assets/fonts/icomoon.svg?aghldx#icomoon) format(\"svg\");font-weight:400;font-style:normal;font-display:block}[class^=icon-],[class*=\" icon-\"]{font-family:icomoon!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-acutely-toxic .path1:before{content:\"\\e91b\";color:#e32730}.icon-acutely-toxic .path2:before{content:\"\\e922\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path3:before{content:\"\\e923\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path4:before{content:\"\\e924\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path5:before{content:\"\\e925\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path6:before{content:\"\\e926\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path7:before{content:\"\\e927\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path8:before{content:\"\\e928\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path9:before{content:\"\\e929\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path10:before{content:\"\\e92a\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path11:before{content:\"\\e92b\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path12:before{content:\"\\e92c\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path13:before{content:\"\\e92d\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path14:before{content:\"\\e92e\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path15:before{content:\"\\e92f\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path16:before{content:\"\\e930\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path17:before{content:\"\\e931\";margin-left:-1em;color:#323232}.icon-add-column:before{content:\"\\e932\"}.icon-add-tooltip:before{content:\"\\e933\"}.icon-admin:before{content:\"\\e934\"}.icon-annual-cycle:before{content:\"\\e935\"}.icon-assignment-repete:before{content:\"\\e936\"}.icon-barrier-add:before{content:\"\\e937\"}.icon-barrier-edit:before{content:\"\\e938\"}.icon-barrier-view:before{content:\"\\e939\"}.icon-button-group:before{content:\"\\e93a\"}.icon-chemical-manager:before{content:\"\\e93b\"}.icon-chronic-health-hazard .path1:before{content:\"\\e93c\";color:#e32730}.icon-chronic-health-hazard .path2:before{content:\"\\e93d\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path3:before{content:\"\\e93e\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path4:before{content:\"\\e93f\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path5:before{content:\"\\e940\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path6:before{content:\"\\e941\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path7:before{content:\"\\e942\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path8:before{content:\"\\e943\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path9:before{content:\"\\e944\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path10:before{content:\"\\e945\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path11:before{content:\"\\e946\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path12:before{content:\"\\e947\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path13:before{content:\"\\e948\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path14:before{content:\"\\e949\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path15:before{content:\"\\e94a\";margin-left:-1em;color:#323232}.icon-contingency:before{content:\"\\e94b\"}.icon-corrosive .path1:before{content:\"\\e94c\";color:#323232}.icon-corrosive .path2:before{content:\"\\e94d\";margin-left:-1em;color:#323232}.icon-corrosive .path3:before{content:\"\\e94e\";margin-left:-1em;color:#323232}.icon-corrosive .path4:before{content:\"\\e94f\";margin-left:-1em;color:#323232}.icon-corrosive .path5:before{content:\"\\e950\";margin-left:-1em;color:#323232}.icon-corrosive .path6:before{content:\"\\e951\";margin-left:-1em;color:#323232}.icon-corrosive .path7:before{content:\"\\e952\";margin-left:-1em;color:#323232}.icon-corrosive .path8:before{content:\"\\e953\";margin-left:-1em;color:#323232}.icon-corrosive .path9:before{content:\"\\e954\";margin-left:-1em;color:#323232}.icon-corrosive .path10:before{content:\"\\e955\";margin-left:-1em;color:#323232}.icon-corrosive .path11:before{content:\"\\e956\";margin-left:-1em;color:#323232}.icon-corrosive .path12:before{content:\"\\e957\";margin-left:-1em;color:#323232}.icon-corrosive .path13:before{content:\"\\e958\";margin-left:-1em;color:#323232}.icon-corrosive .path14:before{content:\"\\e959\";margin-left:-1em;color:#323232}.icon-corrosive .path15:before{content:\"\\e95a\";margin-left:-1em;color:#323232}.icon-corrosive .path16:before{content:\"\\e95b\";margin-left:-1em;color:#323232}.icon-corrosive .path17:before{content:\"\\e95c\";margin-left:-1em;color:#323232}.icon-corrosive .path18:before{content:\"\\e95d\";margin-left:-1em;color:#323232}.icon-corrosive .path19:before{content:\"\\e95e\";margin-left:-1em;color:#323232}.icon-corrosive .path20:before{content:\"\\e95f\";margin-left:-1em;color:#323232}.icon-corrosive .path21:before{content:\"\\e960\";margin-left:-1em;color:#e32730}.icon-dashboard:before{content:\"\\e961\"}.icon-database-sds:before{content:\"\\e962\"}.icon-description-add:before{content:\"\\e963\"}.icon-description-edit:before{content:\"\\e964\"}.icon-description-view:before{content:\"\\e965\";color:#666}.icon-document-read .path1:before{content:\"\\e966\";color:#000;opacity:.6}.icon-document-read .path2:before{content:\"\\e967\";margin-left:-1em;color:#fff}.icon-document-read .path3:before{content:\"\\e968\";margin-left:-1em;color:#000;opacity:.6}.icon-draft:before{content:\"\\e969\"}.icon-expired-off:before{content:\"\\e96a\"}.icon-expired-on:before{content:\"\\e96b\"}.icon-explosive .path1:before{content:\"\\e96c\";color:#e32730}.icon-explosive .path2:before{content:\"\\e96d\";margin-left:-1em;color:#323232}.icon-explosive .path3:before{content:\"\\e96e\";margin-left:-1em;color:#323232}.icon-explosive .path4:before{content:\"\\e96f\";margin-left:-1em;color:#323232}.icon-explosive .path5:before{content:\"\\e970\";margin-left:-1em;color:#323232}.icon-explosive .path6:before{content:\"\\e971\";margin-left:-1em;color:#323232}.icon-explosive .path7:before{content:\"\\e972\";margin-left:-1em;color:#323232}.icon-explosive .path8:before{content:\"\\e973\";margin-left:-1em;color:#323232}.icon-explosive .path9:before{content:\"\\e974\";margin-left:-1em;color:#323232}.icon-explosive .path10:before{content:\"\\e975\";margin-left:-1em;color:#323232}.icon-explosive .path11:before{content:\"\\e976\";margin-left:-1em;color:#323232}.icon-explosive .path12:before{content:\"\\e977\";margin-left:-1em;color:#323232}.icon-explosive .path13:before{content:\"\\e978\";margin-left:-1em;color:#323232}.icon-explosive .path14:before{content:\"\\e979\";margin-left:-1em;color:#323232}.icon-explosive .path15:before{content:\"\\e97a\";margin-left:-1em;color:#323232}.icon-explosive .path16:before{content:\"\\e97b\";margin-left:-1em;color:#323232}.icon-explosive .path17:before{content:\"\\e97c\";margin-left:-1em;color:#323232}.icon-explosive .path18:before{content:\"\\e97d\";margin-left:-1em;color:#323232}.icon-explosive .path19:before{content:\"\\e97e\";margin-left:-1em;color:#323232}.icon-explosive .path20:before{content:\"\\e97f\";margin-left:-1em;color:#323232}.icon-explosive .path21:before{content:\"\\e980\";margin-left:-1em;color:#323232}.icon-explosive .path22:before{content:\"\\e981\";margin-left:-1em;color:#323232}.icon-explosive .path23:before{content:\"\\e982\";margin-left:-1em;color:#323232}.icon-explosive .path24:before{content:\"\\e983\";margin-left:-1em;color:#323232}.icon-explosive .path25:before{content:\"\\e984\";margin-left:-1em;color:#323232}.icon-explosive .path26:before{content:\"\\e985\";margin-left:-1em;color:#323232}.icon-explosive .path27:before{content:\"\\e986\";margin-left:-1em;color:#323232}.icon-explosive .path28:before{content:\"\\e987\";margin-left:-1em;color:#323232}.icon-explosive .path29:before{content:\"\\e988\";margin-left:-1em;color:#323232}.icon-explosive .path30:before{content:\"\\e989\";margin-left:-1em;color:#323232}.icon-explosive .path31:before{content:\"\\e98a\";margin-left:-1em;color:#323232}.icon-explosive .path32:before{content:\"\\e98b\";margin-left:-1em;color:#323232}.icon-explosive .path33:before{content:\"\\e98c\";margin-left:-1em;color:#323232}.icon-explosive .path34:before{content:\"\\e98d\";margin-left:-1em;color:#323232}.icon-explosive .path35:before{content:\"\\e98e\";margin-left:-1em;color:#323232}.icon-explosive .path36:before{content:\"\\e98f\";margin-left:-1em;color:#323232}.icon-explosive .path37:before{content:\"\\e990\";margin-left:-1em;color:#323232}.icon-explosive .path38:before{content:\"\\e991\";margin-left:-1em;color:#323232}.icon-explosive .path39:before{content:\"\\e992\";margin-left:-1em;color:#323232}.icon-explosive .path40:before{content:\"\\e993\";margin-left:-1em;color:#323232}.icon-explosive .path41:before{content:\"\\e994\";margin-left:-1em;color:#323232}.icon-explosive .path42:before{content:\"\\e995\";margin-left:-1em;color:#323232}.icon-explosive .path43:before{content:\"\\e996\";margin-left:-1em;color:#323232}.icon-explosive .path44:before{content:\"\\e997\";margin-left:-1em;color:#323232}.icon-explosive .path45:before{content:\"\\e998\";margin-left:-1em;color:#323232}.icon-explosive .path46:before{content:\"\\e999\";margin-left:-1em;color:#323232}.icon-file-excel:before{content:\"\\e99a\"}.icon-file-pdf:before{content:\"\\e99b\"}.icon-file-pdf-verified .path1:before{content:\"\\e99c\";color:#000;opacity:.6}.icon-file-pdf-verified .path2:before{content:\"\\e99d\";margin-left:-1em;color:#fff}.icon-file-pdf-verified .path3:before{content:\"\\e99e\";margin-left:-1em;color:#000;opacity:.6}.icon-file-word:before{content:\"\\e99f\"}.icon-filter-alt:before{content:\"\\e9a0\"}.icon-flammable .path1:before{content:\"\\e9a1\";color:#323232}.icon-flammable .path2:before{content:\"\\e9a2\";margin-left:-1em;color:#323232}.icon-flammable .path3:before{content:\"\\e9a3\";margin-left:-1em;color:#e32730}.icon-gas-under-pressure .path1:before{content:\"\\e9a4\";color:#323232}.icon-gas-under-pressure .path2:before{content:\"\\e9a5\";margin-left:-1em;color:#e32730}.icon-health-hazard .path1:before{content:\"\\e9a6\";color:#323232}.icon-health-hazard .path2:before{content:\"\\e9a7\";margin-left:-1em;color:#e32730}.icon-line-break:before{content:\"\\e9a8\"}.icon-location:before{content:\"\\e9a9\"}.icon-measure-add:before{content:\"\\e9aa\"}.icon-measure-edit:before{content:\"\\e9ab\"}.icon-measure-view:before{content:\"\\e9ac\";color:#666}.icon-messages:before{content:\"\\e9ad\"}.icon-monitoring:before{content:\"\\e9ae\";color:#666}.icon-move:before{content:\"\\e9af\"}.icon-oxidizing .path1:before{content:\"\\e9b0\";color:#e32730}.icon-oxidizing .path2:before{content:\"\\e9b1\";margin-left:-1em;color:#323232}.icon-oxidizing .path3:before{content:\"\\e9b2\";margin-left:-1em;color:#323232}.icon-oxidizing .path4:before{content:\"\\e9b3\";margin-left:-1em;color:#323232}.icon-process-area-closed:before{content:\"\\e9b4\"}.icon-process-area-open:before{content:\"\\e9b5\"}.icon-process-linked .path1:before{content:\"\\e9b6\";color:#000;opacity:.6}.icon-process-linked .path2:before{content:\"\\e9b7\";margin-left:-1em;color:#666}.icon-risk:before{content:\"\\e9b8\"}.icon-search-in-file:before{content:\"\\e9b9\"}.icon-sort-ascending:before{content:\"\\e9ba\"}.icon-sort-descending:before{content:\"\\e9bb\"}.icon-subscript:before{content:\"\\e9bc\"}.icon-superscript:before{content:\"\\e9bd\"}.icon-syncronice-favorites:before{content:\"\\e9be\"}.icon-system-settings:before{content:\"\\e9bf\"}.icon-view-three-outlined:before{content:\"\\e9c0\"}.icon-workplace-safety:before{content:\"\\e9c1\"}.icon-checklist:before{content:\"\\e900\"}.icon-department-document .path1:before{content:\"\\e901\";color:#000;opacity:.6}.icon-department-document .path2:before{content:\"\\e902\";margin-left:-1em;color:#00804c}.icon-department-folder-closed .path1:before{content:\"\\e903\";color:#000;opacity:.6}.icon-department-folder-closed .path2:before{content:\"\\e904\";margin-left:-1em;color:#00804c}.icon-department-folder-open .path1:before{content:\"\\e905\";color:#000;opacity:.6}.icon-department-folder-open .path2:before{content:\"\\e906\";margin-left:-1em;color:#00804c}.icon-deviation:before{content:\"\\e907\"}.icon-dropdown-folder .path1:before{content:\"\\e908\";color:#00324e}.icon-dropdown-folder .path2:before{content:\"\\e909\";margin-left:-1em;color:#fff;opacity:.6}.icon-enterprise-document .path1:before{content:\"\\e90a\";color:#000;opacity:.6}.icon-enterprise-document .path2:before{content:\"\\e90b\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-closed .path1:before{content:\"\\e90c\";color:#000;opacity:.6}.icon-enterprise-folder-closed .path2:before{content:\"\\e90d\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-open .path1:before{content:\"\\e90e\";color:#000;opacity:.6}.icon-enterprise-folder-open .path2:before{content:\"\\e90f\";margin-left:-1em;color:#cf4714}.icon-folder-closed:before{content:\"\\e910\"}.icon-folder-open:before{content:\"\\e911\"}.icon-keyboard_arrow_down:before{content:\"\\e912\"}.icon-keyboard_arrow_up:before{content:\"\\e913\"}.icon-local-document .path1:before{content:\"\\e914\";color:#000;opacity:.6}.icon-local-document .path2:before{content:\"\\e915\";margin-left:-1em;color:#1954a9}.icon-local-folder-closed .path1:before{content:\"\\e916\";color:#000;opacity:.6}.icon-local-folder-closed .path2:before{content:\"\\e917\";margin-left:-1em;color:#1954a9}.icon-local-folder-open .path1:before{content:\"\\e918\";color:#000;opacity:.6}.icon-local-folder-open .path2:before{content:\"\\e919\";margin-left:-1em;color:#1954a9}.icon-process:before{content:\"\\e91a\"}.icon-regional-document .path1:before{content:\"\\e91c\";color:#000;opacity:.6}.icon-regional-document .path2:before{content:\"\\e91d\";margin-left:-1em;color:#662e0d}.icon-regional-folder-closed .path1:before{content:\"\\e91e\";color:#000;opacity:.6}.icon-regional-folder-closed .path2:before{content:\"\\e91f\";margin-left:-1em;color:#662e0d}.icon-regional-folder-open .path1:before{content:\"\\e920\";color:#000;opacity:.6}.icon-regional-folder-open .path2:before{content:\"\\e921\";margin-left:-1em;color:#662e0d}.cursor-pointer{cursor:pointer}.ml-5{margin-left:10px}.padding-5{padding:5px}.header-dialog{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:16px}.input__field{display:flex;align-items:center;position:relative}.input__field input.input-search{width:100%;padding:10px;outline:none;border:none;background:var(--background-input-text)}.input__field .btn-search{cursor:pointer;vertical-align:middle;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.line__divider{border-bottom:1px solid #ccc;height:1px;margin-top:10px;min-width:300px;max-width:100%}.mat-expansion-panel-header{height:30px;font-size:12px;letter-spacing:1px;font-family:Raleway;font-weight:600;padding:0}.mat-expansion-panel-header .mat-expansion-panel-header-title{align-items:center;margin-left:12px}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:none}.panel__item{max-height:110px;margin-top:4px;overflow-x:hidden;overflow-y:auto;padding-right:5px;width:100%;display:block}.panel__item .related__item__inline{max-width:100%}.panel__item ::ng-deep .mat-chip-list-wrapper{margin:0 -4px!important}.panel__item .select__toggle-include{width:100%}.panel__item .select__toggle-include.toggle-include-child .mat-mdc-slide-toggle.qms-group-options .mat-slide-toggle-thumb{background-color:#5a5a5a!important}.panel__item .related__item__content{height:32px;line-height:32px;background-color:var(--related-item-background);max-width:100%;margin-bottom:5px;margin-left:2.5px;margin-right:2.5px}.panel__item .related__item__content .mat-icon{color:var(--related-mat-icon-color);font-size:24px}.header-title{font-weight:600;color:#000000de}.result-content{padding-right:0!important}.result-content .mat-chip-list{min-height:40px}.result-content .mat-chip-list .mat-icon{color:#0000004d!important;cursor:pointer}.result-content .mat-chip-list .mat-icon:hover{color:#000!important}.result-content span.related__item__content_name{min-width:calc(100% - 13px);display:flex;align-items:center}.result-content span.related__item__content_name>span:nth-child(1){display:inline-block;margin-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.result-content span.related__item__content_name .select__include-children__count{font-size:.75rem;color:#00000080;font-weight:600;line-height:16px}.text-name{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;cursor:pointer;width:100%}::ng-deep .mat-mdc-checkbox.qms-group-options.flex-direction-row .mat-checkbox-layout{white-space:normal}::ng-deep .mat-mdc-checkbox.qms-group-options.flex-direction-row .mat-checkbox-label{flex-direction:row;align-items:center;position:relative;padding-bottom:2px}.confirm__button__groups .btn-add>.qms-btn-wrapper{display:flex;justify-content:center;align-items:center}::ng-deep .custom-department-tree .qms-view-search-result{height:100%!important}::ng-deep .custom-department-tree .qms-view-search-result .result{max-height:calc(100% - 80px)!important}::ng-deep .custom-department-tree .loading-container{height:calc(100% - 40px)!important}::ng-deep .btn-close-dialog.qms-btn-icon:focus:not(:hover){background-color:unset!important;color:unset!important}.qms-spinner-wrapper{display:inline-block;width:22px;height:22px}.qms-spinner-wrapper .qms-spinner{font-size:20px;width:1em;height:1em;position:absolute;right:5px;top:50%;transform:translateY(-50%)}.qms-spinner-wrapper .qms-spinner .mat-mdc-progress-spinner circle{stroke:#1b75be!important}@media screen and (max-width: 600px){::ng-deep .cdk-global-overlay-wrapper{justify-content:center!important;width:100vw}.header-title{font-size:14px}.related__item__content_name{font-size:12px!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.QMSInputChipDirective, selector: "mat-chip[qms-chip]", inputs: ["selected"] }, { kind: "directive", type: i5.QMSChipBodyDirective, selector: "[qms-chip-body]" }, { kind: "directive", type: i6.QMSToolTipRendererDirective, selector: "[qms-tool-tip]", inputs: ["showToolTip", "mode", "qms-tool-tip", "contentTemplate", "position"] }, { kind: "directive", type: i7.QMSContentChangesDirective, selector: "[qmsContentChanges]", inputs: ["qmsContentChanges"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i9.QMSButton, selector: "button[qms-btn], button[qms-btn-lg], button[qms-btn-outlined],\n               button[qms-btn-outlined-lg], button[qms-btn-text], button[qms-btn-text-lg],\n               button[qms-btn-fab],button[qms-btn-fab-sm],button[qms-btn-fab-ext],\n               button[qms-btn-fab-outlined],button[qms-btn-fab-outlined-sm],button[qms-btn-fab-outlined-ext]", inputs: ["disabled", "color"], exportAs: ["qmsButton"] }, { kind: "component", type: i9.QMSButtonIcon, selector: "button[qms-btn-icon]", inputs: ["disabled", "color", "active"], exportAs: ["qmsButtonIcon"] }, { kind: "component", type: i10.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i11.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled", "tabIndex"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i11.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i11.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "component", type: i12.SelectDepartmentTreeComponent, selector: "qms-select-department-tree", inputs: ["rowsSkeleton", "height", "config", "maxWidthNode"], outputs: ["onSearchEvent", "onPagingSearchEvent", "onValueChangeEvent", "selectionNodeChangeEvent", "onCheckNodeEvent", "onExpandNodeEvent", "onLoadMoreEvent", "onCheckItemSearchEvent", "onCheckAllItemSearchEvent", "toggleIncludeChildEvent", "isPushingChildNodes"] }, { kind: "component", type: i13.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], animations: [SelectDepartmentAnimationTrigger] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectDepartmentComponent, decorators: [{
            type: Component,
            args: [{ selector: 'qms-select-department', providers: [
                        {
                            provide: MAT_CHECKBOX_DEFAULT_OPTIONS,
                            useValue: {
                                clickAction: 'noop'
                            }
                        }
                    ], animations: [SelectDepartmentAnimationTrigger], template: "<h3 mat-dialog-title class=\"more-action\">\n  {{popupData.headerName}}\n  <button matDialogClose class=\"close-btn\" color=\"light\" qms-btn-icon>\n    <mat-icon>close</mat-icon>\n  </button>\n</h3>\n<mat-dialog-content>\n  <div class=\"qms-scrollbar\">\n    <div>\n      <qms-select-department-tree #treeDepartment customClass=\"custom-department-tree\"\n        [height]=\"popupData.config.isMobile ? '38vh' : '34vh'\" [rowsSkeleton]=\"9\" [config]=\"popupData.config\"\n        (onSearchEvent)=\"onSearchEvent.emit($event)\" (onValueChangeEvent)=\"onResultDepartmentChange($event)\"\n        (onPagingSearchEvent)=\"onPagingEvent.emit($event)\" (onCheckNodeEvent)=\"onCheckNodeEvent.emit($event)\"\n        (onExpandNodeEvent)=\"onExpandNodeEvent.emit($event)\" (onLoadMoreEvent)=\"onLoadMoreEvent.emit()\"\n        (onCheckAllItemSearchEvent)=\"onCheckAllItemSearchEvent.emit($event)\"\n        (onCheckItemSearchEvent)=\"onCheckItemSearchEvent.emit($event)\"\n        (toggleIncludeChildEvent)=\"toggleIncludeChildEvent.emit($event)\"\n        (isPushingChildNodes)=\"isPushingChildNodes($event)\">\n      </qms-select-department-tree>\n    </div>\n  </div>\n  <div class=\"line__divider\"></div>\n  <div [@heightAnimation]\n    *ngIf=\"treeDepartment && !!treeDepartment.resultSelected.length && !popupData.hidePanelResult && !popupData.config.moveLocationMode\"\n    class=\" pr-0 pe-0\">\n    <div class=\"header-title\">{{popupData.resultTitle || LANG.RESULT}}</div>\n    <div class=\"result-content pr-0 pe-0\">\n      <mat-chip-set class=\"panel__item qms-scrollbar\">\n        <ng-container *ngFor=\"let item of treeDepartment.resultSelected\">\n          <mat-chip [@updateItemAnimation] *qmsContentChanges=\"item.children?.length\"\n            [qms-tool-tip]=\"generateTootip(item)\" position=\"top\" mode=\"dark\" qms-chip [removable]=\"true\">\n            <span (click)=\"onScrollToNode(item)\" qms-chip-body>\n              <span class=\"related__item__content_name\" #itemName>\n                <span>{{item.name}}</span>\n                <span class=\"select__include-children__count\" *ngIf=\"!!item?.isGroup && !popupData.config.lazy\">\n                  {{item.children.length}}/{{item.childCount}}\n                </span>\n                <span class=\"select__include-children__count\" *ngIf=\"!!item?.isGroup && popupData.config.lazy\">\n                  {{item.selectedChildCount || item.children.length}}/{{item.childCount}}\n                </span>\n              </span>\n            </span>\n            <ng-container *ngIf=\"isNodeLoading(item.id)\" [ngTemplateOutlet]=\"loadingSpinner\"></ng-container>\n            <button matChipRemove (click)=\"onRemoveNode(item)\"\n              *ngIf=\"!treeDepartment.isDisabledNode(item.id) && !isNodeLoading(item.id)\">\n              <mat-icon>cancel</mat-icon>\n            </button>\n          </mat-chip>\n        </ng-container>\n      </mat-chip-set>\n    </div>\n  </div>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n  <mat-divider *ngIf=\"treeDepartment && !!treeDepartment.resultSelected.length && !popupData.hidePanelResult\"\n    class=\"w-100 mb-3\"></mat-divider>\n  <button class=\"me-2\" qms-btn-text mat-dialog-close>\n    {{LANG.CANCEL}}\n  </button>\n  <button (click)=\"onCloseDialog()\" class=\"btn-add\"\n    [disabled]=\"(!treeDepartment.resultSelected.length && !popupData.config.canAddNullResult) || isPushing\"\n    [class.qms-btn-disabled]=\"(!treeDepartment.resultSelected.length && !popupData.config.canAddNullResult) || isPushing\"\n    qms-btn>\n    <span>{{LANG.ADD}}</span>\n    <span *ngIf=\"!popupData.config.moveLocationMode\">\n      ({{treeDepartment.resultSelected.length}})\n    </span>\n  </button>\n</mat-dialog-actions>\n<!-- Loading spinner -->\n<ng-template #loadingSpinner>\n  <div class=\"qms-spinner-wrapper\">\n    <div class=\"qms-spinner center\">\n      <mat-spinner [diameter]=\"20\" [strokeWidth]=\"2\" color=\"primary\"></mat-spinner>\n    </div>\n  </div>\n</ng-template>", styles: ["@font-face{font-family:icomoon;src:url(/assets/fonts/icomoon.eot?aghldx);src:url(/assets/fonts/icomoon.eot?aghldx#iefix) format(\"embedded-opentype\"),url(/assets/fonts/icomoon.ttf?aghldx) format(\"truetype\"),url(/assets/fonts/icomoon.woff?aghldx) format(\"woff\"),url(/assets/fonts/icomoon.svg?aghldx#icomoon) format(\"svg\");font-weight:400;font-style:normal;font-display:block}[class^=icon-],[class*=\" icon-\"]{font-family:icomoon!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-acutely-toxic .path1:before{content:\"\\e91b\";color:#e32730}.icon-acutely-toxic .path2:before{content:\"\\e922\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path3:before{content:\"\\e923\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path4:before{content:\"\\e924\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path5:before{content:\"\\e925\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path6:before{content:\"\\e926\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path7:before{content:\"\\e927\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path8:before{content:\"\\e928\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path9:before{content:\"\\e929\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path10:before{content:\"\\e92a\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path11:before{content:\"\\e92b\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path12:before{content:\"\\e92c\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path13:before{content:\"\\e92d\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path14:before{content:\"\\e92e\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path15:before{content:\"\\e92f\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path16:before{content:\"\\e930\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path17:before{content:\"\\e931\";margin-left:-1em;color:#323232}.icon-add-column:before{content:\"\\e932\"}.icon-add-tooltip:before{content:\"\\e933\"}.icon-admin:before{content:\"\\e934\"}.icon-annual-cycle:before{content:\"\\e935\"}.icon-assignment-repete:before{content:\"\\e936\"}.icon-barrier-add:before{content:\"\\e937\"}.icon-barrier-edit:before{content:\"\\e938\"}.icon-barrier-view:before{content:\"\\e939\"}.icon-button-group:before{content:\"\\e93a\"}.icon-chemical-manager:before{content:\"\\e93b\"}.icon-chronic-health-hazard .path1:before{content:\"\\e93c\";color:#e32730}.icon-chronic-health-hazard .path2:before{content:\"\\e93d\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path3:before{content:\"\\e93e\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path4:before{content:\"\\e93f\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path5:before{content:\"\\e940\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path6:before{content:\"\\e941\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path7:before{content:\"\\e942\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path8:before{content:\"\\e943\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path9:before{content:\"\\e944\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path10:before{content:\"\\e945\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path11:before{content:\"\\e946\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path12:before{content:\"\\e947\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path13:before{content:\"\\e948\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path14:before{content:\"\\e949\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path15:before{content:\"\\e94a\";margin-left:-1em;color:#323232}.icon-contingency:before{content:\"\\e94b\"}.icon-corrosive .path1:before{content:\"\\e94c\";color:#323232}.icon-corrosive .path2:before{content:\"\\e94d\";margin-left:-1em;color:#323232}.icon-corrosive .path3:before{content:\"\\e94e\";margin-left:-1em;color:#323232}.icon-corrosive .path4:before{content:\"\\e94f\";margin-left:-1em;color:#323232}.icon-corrosive .path5:before{content:\"\\e950\";margin-left:-1em;color:#323232}.icon-corrosive .path6:before{content:\"\\e951\";margin-left:-1em;color:#323232}.icon-corrosive .path7:before{content:\"\\e952\";margin-left:-1em;color:#323232}.icon-corrosive .path8:before{content:\"\\e953\";margin-left:-1em;color:#323232}.icon-corrosive .path9:before{content:\"\\e954\";margin-left:-1em;color:#323232}.icon-corrosive .path10:before{content:\"\\e955\";margin-left:-1em;color:#323232}.icon-corrosive .path11:before{content:\"\\e956\";margin-left:-1em;color:#323232}.icon-corrosive .path12:before{content:\"\\e957\";margin-left:-1em;color:#323232}.icon-corrosive .path13:before{content:\"\\e958\";margin-left:-1em;color:#323232}.icon-corrosive .path14:before{content:\"\\e959\";margin-left:-1em;color:#323232}.icon-corrosive .path15:before{content:\"\\e95a\";margin-left:-1em;color:#323232}.icon-corrosive .path16:before{content:\"\\e95b\";margin-left:-1em;color:#323232}.icon-corrosive .path17:before{content:\"\\e95c\";margin-left:-1em;color:#323232}.icon-corrosive .path18:before{content:\"\\e95d\";margin-left:-1em;color:#323232}.icon-corrosive .path19:before{content:\"\\e95e\";margin-left:-1em;color:#323232}.icon-corrosive .path20:before{content:\"\\e95f\";margin-left:-1em;color:#323232}.icon-corrosive .path21:before{content:\"\\e960\";margin-left:-1em;color:#e32730}.icon-dashboard:before{content:\"\\e961\"}.icon-database-sds:before{content:\"\\e962\"}.icon-description-add:before{content:\"\\e963\"}.icon-description-edit:before{content:\"\\e964\"}.icon-description-view:before{content:\"\\e965\";color:#666}.icon-document-read .path1:before{content:\"\\e966\";color:#000;opacity:.6}.icon-document-read .path2:before{content:\"\\e967\";margin-left:-1em;color:#fff}.icon-document-read .path3:before{content:\"\\e968\";margin-left:-1em;color:#000;opacity:.6}.icon-draft:before{content:\"\\e969\"}.icon-expired-off:before{content:\"\\e96a\"}.icon-expired-on:before{content:\"\\e96b\"}.icon-explosive .path1:before{content:\"\\e96c\";color:#e32730}.icon-explosive .path2:before{content:\"\\e96d\";margin-left:-1em;color:#323232}.icon-explosive .path3:before{content:\"\\e96e\";margin-left:-1em;color:#323232}.icon-explosive .path4:before{content:\"\\e96f\";margin-left:-1em;color:#323232}.icon-explosive .path5:before{content:\"\\e970\";margin-left:-1em;color:#323232}.icon-explosive .path6:before{content:\"\\e971\";margin-left:-1em;color:#323232}.icon-explosive .path7:before{content:\"\\e972\";margin-left:-1em;color:#323232}.icon-explosive .path8:before{content:\"\\e973\";margin-left:-1em;color:#323232}.icon-explosive .path9:before{content:\"\\e974\";margin-left:-1em;color:#323232}.icon-explosive .path10:before{content:\"\\e975\";margin-left:-1em;color:#323232}.icon-explosive .path11:before{content:\"\\e976\";margin-left:-1em;color:#323232}.icon-explosive .path12:before{content:\"\\e977\";margin-left:-1em;color:#323232}.icon-explosive .path13:before{content:\"\\e978\";margin-left:-1em;color:#323232}.icon-explosive .path14:before{content:\"\\e979\";margin-left:-1em;color:#323232}.icon-explosive .path15:before{content:\"\\e97a\";margin-left:-1em;color:#323232}.icon-explosive .path16:before{content:\"\\e97b\";margin-left:-1em;color:#323232}.icon-explosive .path17:before{content:\"\\e97c\";margin-left:-1em;color:#323232}.icon-explosive .path18:before{content:\"\\e97d\";margin-left:-1em;color:#323232}.icon-explosive .path19:before{content:\"\\e97e\";margin-left:-1em;color:#323232}.icon-explosive .path20:before{content:\"\\e97f\";margin-left:-1em;color:#323232}.icon-explosive .path21:before{content:\"\\e980\";margin-left:-1em;color:#323232}.icon-explosive .path22:before{content:\"\\e981\";margin-left:-1em;color:#323232}.icon-explosive .path23:before{content:\"\\e982\";margin-left:-1em;color:#323232}.icon-explosive .path24:before{content:\"\\e983\";margin-left:-1em;color:#323232}.icon-explosive .path25:before{content:\"\\e984\";margin-left:-1em;color:#323232}.icon-explosive .path26:before{content:\"\\e985\";margin-left:-1em;color:#323232}.icon-explosive .path27:before{content:\"\\e986\";margin-left:-1em;color:#323232}.icon-explosive .path28:before{content:\"\\e987\";margin-left:-1em;color:#323232}.icon-explosive .path29:before{content:\"\\e988\";margin-left:-1em;color:#323232}.icon-explosive .path30:before{content:\"\\e989\";margin-left:-1em;color:#323232}.icon-explosive .path31:before{content:\"\\e98a\";margin-left:-1em;color:#323232}.icon-explosive .path32:before{content:\"\\e98b\";margin-left:-1em;color:#323232}.icon-explosive .path33:before{content:\"\\e98c\";margin-left:-1em;color:#323232}.icon-explosive .path34:before{content:\"\\e98d\";margin-left:-1em;color:#323232}.icon-explosive .path35:before{content:\"\\e98e\";margin-left:-1em;color:#323232}.icon-explosive .path36:before{content:\"\\e98f\";margin-left:-1em;color:#323232}.icon-explosive .path37:before{content:\"\\e990\";margin-left:-1em;color:#323232}.icon-explosive .path38:before{content:\"\\e991\";margin-left:-1em;color:#323232}.icon-explosive .path39:before{content:\"\\e992\";margin-left:-1em;color:#323232}.icon-explosive .path40:before{content:\"\\e993\";margin-left:-1em;color:#323232}.icon-explosive .path41:before{content:\"\\e994\";margin-left:-1em;color:#323232}.icon-explosive .path42:before{content:\"\\e995\";margin-left:-1em;color:#323232}.icon-explosive .path43:before{content:\"\\e996\";margin-left:-1em;color:#323232}.icon-explosive .path44:before{content:\"\\e997\";margin-left:-1em;color:#323232}.icon-explosive .path45:before{content:\"\\e998\";margin-left:-1em;color:#323232}.icon-explosive .path46:before{content:\"\\e999\";margin-left:-1em;color:#323232}.icon-file-excel:before{content:\"\\e99a\"}.icon-file-pdf:before{content:\"\\e99b\"}.icon-file-pdf-verified .path1:before{content:\"\\e99c\";color:#000;opacity:.6}.icon-file-pdf-verified .path2:before{content:\"\\e99d\";margin-left:-1em;color:#fff}.icon-file-pdf-verified .path3:before{content:\"\\e99e\";margin-left:-1em;color:#000;opacity:.6}.icon-file-word:before{content:\"\\e99f\"}.icon-filter-alt:before{content:\"\\e9a0\"}.icon-flammable .path1:before{content:\"\\e9a1\";color:#323232}.icon-flammable .path2:before{content:\"\\e9a2\";margin-left:-1em;color:#323232}.icon-flammable .path3:before{content:\"\\e9a3\";margin-left:-1em;color:#e32730}.icon-gas-under-pressure .path1:before{content:\"\\e9a4\";color:#323232}.icon-gas-under-pressure .path2:before{content:\"\\e9a5\";margin-left:-1em;color:#e32730}.icon-health-hazard .path1:before{content:\"\\e9a6\";color:#323232}.icon-health-hazard .path2:before{content:\"\\e9a7\";margin-left:-1em;color:#e32730}.icon-line-break:before{content:\"\\e9a8\"}.icon-location:before{content:\"\\e9a9\"}.icon-measure-add:before{content:\"\\e9aa\"}.icon-measure-edit:before{content:\"\\e9ab\"}.icon-measure-view:before{content:\"\\e9ac\";color:#666}.icon-messages:before{content:\"\\e9ad\"}.icon-monitoring:before{content:\"\\e9ae\";color:#666}.icon-move:before{content:\"\\e9af\"}.icon-oxidizing .path1:before{content:\"\\e9b0\";color:#e32730}.icon-oxidizing .path2:before{content:\"\\e9b1\";margin-left:-1em;color:#323232}.icon-oxidizing .path3:before{content:\"\\e9b2\";margin-left:-1em;color:#323232}.icon-oxidizing .path4:before{content:\"\\e9b3\";margin-left:-1em;color:#323232}.icon-process-area-closed:before{content:\"\\e9b4\"}.icon-process-area-open:before{content:\"\\e9b5\"}.icon-process-linked .path1:before{content:\"\\e9b6\";color:#000;opacity:.6}.icon-process-linked .path2:before{content:\"\\e9b7\";margin-left:-1em;color:#666}.icon-risk:before{content:\"\\e9b8\"}.icon-search-in-file:before{content:\"\\e9b9\"}.icon-sort-ascending:before{content:\"\\e9ba\"}.icon-sort-descending:before{content:\"\\e9bb\"}.icon-subscript:before{content:\"\\e9bc\"}.icon-superscript:before{content:\"\\e9bd\"}.icon-syncronice-favorites:before{content:\"\\e9be\"}.icon-system-settings:before{content:\"\\e9bf\"}.icon-view-three-outlined:before{content:\"\\e9c0\"}.icon-workplace-safety:before{content:\"\\e9c1\"}.icon-checklist:before{content:\"\\e900\"}.icon-department-document .path1:before{content:\"\\e901\";color:#000;opacity:.6}.icon-department-document .path2:before{content:\"\\e902\";margin-left:-1em;color:#00804c}.icon-department-folder-closed .path1:before{content:\"\\e903\";color:#000;opacity:.6}.icon-department-folder-closed .path2:before{content:\"\\e904\";margin-left:-1em;color:#00804c}.icon-department-folder-open .path1:before{content:\"\\e905\";color:#000;opacity:.6}.icon-department-folder-open .path2:before{content:\"\\e906\";margin-left:-1em;color:#00804c}.icon-deviation:before{content:\"\\e907\"}.icon-dropdown-folder .path1:before{content:\"\\e908\";color:#00324e}.icon-dropdown-folder .path2:before{content:\"\\e909\";margin-left:-1em;color:#fff;opacity:.6}.icon-enterprise-document .path1:before{content:\"\\e90a\";color:#000;opacity:.6}.icon-enterprise-document .path2:before{content:\"\\e90b\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-closed .path1:before{content:\"\\e90c\";color:#000;opacity:.6}.icon-enterprise-folder-closed .path2:before{content:\"\\e90d\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-open .path1:before{content:\"\\e90e\";color:#000;opacity:.6}.icon-enterprise-folder-open .path2:before{content:\"\\e90f\";margin-left:-1em;color:#cf4714}.icon-folder-closed:before{content:\"\\e910\"}.icon-folder-open:before{content:\"\\e911\"}.icon-keyboard_arrow_down:before{content:\"\\e912\"}.icon-keyboard_arrow_up:before{content:\"\\e913\"}.icon-local-document .path1:before{content:\"\\e914\";color:#000;opacity:.6}.icon-local-document .path2:before{content:\"\\e915\";margin-left:-1em;color:#1954a9}.icon-local-folder-closed .path1:before{content:\"\\e916\";color:#000;opacity:.6}.icon-local-folder-closed .path2:before{content:\"\\e917\";margin-left:-1em;color:#1954a9}.icon-local-folder-open .path1:before{content:\"\\e918\";color:#000;opacity:.6}.icon-local-folder-open .path2:before{content:\"\\e919\";margin-left:-1em;color:#1954a9}.icon-process:before{content:\"\\e91a\"}.icon-regional-document .path1:before{content:\"\\e91c\";color:#000;opacity:.6}.icon-regional-document .path2:before{content:\"\\e91d\";margin-left:-1em;color:#662e0d}.icon-regional-folder-closed .path1:before{content:\"\\e91e\";color:#000;opacity:.6}.icon-regional-folder-closed .path2:before{content:\"\\e91f\";margin-left:-1em;color:#662e0d}.icon-regional-folder-open .path1:before{content:\"\\e920\";color:#000;opacity:.6}.icon-regional-folder-open .path2:before{content:\"\\e921\";margin-left:-1em;color:#662e0d}.cursor-pointer{cursor:pointer}.ml-5{margin-left:10px}.padding-5{padding:5px}.header-dialog{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:16px}.input__field{display:flex;align-items:center;position:relative}.input__field input.input-search{width:100%;padding:10px;outline:none;border:none;background:var(--background-input-text)}.input__field .btn-search{cursor:pointer;vertical-align:middle;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.line__divider{border-bottom:1px solid #ccc;height:1px;margin-top:10px;min-width:300px;max-width:100%}.mat-expansion-panel-header{height:30px;font-size:12px;letter-spacing:1px;font-family:Raleway;font-weight:600;padding:0}.mat-expansion-panel-header .mat-expansion-panel-header-title{align-items:center;margin-left:12px}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:none}.panel__item{max-height:110px;margin-top:4px;overflow-x:hidden;overflow-y:auto;padding-right:5px;width:100%;display:block}.panel__item .related__item__inline{max-width:100%}.panel__item ::ng-deep .mat-chip-list-wrapper{margin:0 -4px!important}.panel__item .select__toggle-include{width:100%}.panel__item .select__toggle-include.toggle-include-child .mat-mdc-slide-toggle.qms-group-options .mat-slide-toggle-thumb{background-color:#5a5a5a!important}.panel__item .related__item__content{height:32px;line-height:32px;background-color:var(--related-item-background);max-width:100%;margin-bottom:5px;margin-left:2.5px;margin-right:2.5px}.panel__item .related__item__content .mat-icon{color:var(--related-mat-icon-color);font-size:24px}.header-title{font-weight:600;color:#000000de}.result-content{padding-right:0!important}.result-content .mat-chip-list{min-height:40px}.result-content .mat-chip-list .mat-icon{color:#0000004d!important;cursor:pointer}.result-content .mat-chip-list .mat-icon:hover{color:#000!important}.result-content span.related__item__content_name{min-width:calc(100% - 13px);display:flex;align-items:center}.result-content span.related__item__content_name>span:nth-child(1){display:inline-block;margin-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.result-content span.related__item__content_name .select__include-children__count{font-size:.75rem;color:#00000080;font-weight:600;line-height:16px}.text-name{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;cursor:pointer;width:100%}::ng-deep .mat-mdc-checkbox.qms-group-options.flex-direction-row .mat-checkbox-layout{white-space:normal}::ng-deep .mat-mdc-checkbox.qms-group-options.flex-direction-row .mat-checkbox-label{flex-direction:row;align-items:center;position:relative;padding-bottom:2px}.confirm__button__groups .btn-add>.qms-btn-wrapper{display:flex;justify-content:center;align-items:center}::ng-deep .custom-department-tree .qms-view-search-result{height:100%!important}::ng-deep .custom-department-tree .qms-view-search-result .result{max-height:calc(100% - 80px)!important}::ng-deep .custom-department-tree .loading-container{height:calc(100% - 40px)!important}::ng-deep .btn-close-dialog.qms-btn-icon:focus:not(:hover){background-color:unset!important;color:unset!important}.qms-spinner-wrapper{display:inline-block;width:22px;height:22px}.qms-spinner-wrapper .qms-spinner{font-size:20px;width:1em;height:1em;position:absolute;right:5px;top:50%;transform:translateY(-50%)}.qms-spinner-wrapper .qms-spinner .mat-mdc-progress-spinner circle{stroke:#1b75be!important}@media screen and (max-width: 600px){::ng-deep .cdk-global-overlay-wrapper{justify-content:center!important;width:100vw}.header-title{font-size:14px}.related__item__content_name{font-size:12px!important}}\n"] }]
        }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialogRef }, { type: i14.SelectDepartmentPopupData, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }, { type: i2.TranslateLibraryService }], propDecorators: { treeDepartment: [{
                type: ViewChild,
                args: ['treeDepartment']
            }], onPagingEvent: [{
                type: Output
            }], onSearchEvent: [{
                type: Output
            }], onCheckNodeEvent: [{
                type: Output
            }], onExpandNodeEvent: [{
                type: Output
            }], onLoadMoreEvent: [{
                type: Output
            }], onCheckItemSearchEvent: [{
                type: Output
            }], onCheckAllItemSearchEvent: [{
                type: Output
            }], toggleIncludeChildEvent: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 