import { SelectionModel } from '@angular/cdk/collections';
import { FlatTreeControl } from '@angular/cdk/tree';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { QMSTreeConfig } from '../../common/models/qms-tree-config.model';
import * as i0 from "@angular/core";
import * as i1 from "../../services/qms-tree-global.service";
import * as i2 from "@angular/common";
import * as i3 from "@angular/material/tree";
import * as i4 from "@angular/material/icon";
import * as i5 from "@angular/material/button";
import * as i6 from "@angular/material/checkbox";
import * as i7 from "../../directives/form.directive";
import * as i8 from "../../directives/qms-multi-icon.directive";
export class QMSBasicTreeComponent {
    constructor(qmsTreeService, cdRef) {
        this.qmsTreeService = qmsTreeService;
        this.cdRef = cdRef;
        this.ngUnsubscribe = new Subject();
        this.treeData = [];
        this.openNodes = [];
        this.disabledList = [];
        this.nodeExpand = new EventEmitter();
        this.onClickNodeEvent = new EventEmitter();
        this.checkBoxEvent = new EventEmitter();
        this.treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
        this.treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
        this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
        this.expandingNodes = [];
        this.checklistSelection = new SelectionModel(true);
        this.guidHelper = {
            empty: '00000000-0000-0000-0000-000000000000'
        };
        this.configInternal = new QMSTreeConfig();
        this.hasChild = (_, node) => node.expandable;
        this.dataSource.data = this.convertTreeData(this.treeData);
    }
    _transformer(node, level) {
        return {
            expandable: (!!node.children && node.children.length > 0) || (!!node.childCount),
            name: node.name,
            level,
            id: node.id,
            parentId: node.parentId,
            itemIcon: node.itemIcon,
            itemMatIcon: node.itemMatIcon,
            itemIconSvg: node.itemIconSvg,
            isFile: node.isFile,
            disabled: node.disabled || false,
            markedGetChildren: node.markedGetChildren
        };
    }
    ngOnChanges(changes) {
        if (changes.treeData && JSON.stringify(changes.treeData.currentValue) !== JSON.stringify(changes.treeData.previousValue)) {
            this.dataSource.data = this.treeData;
        }
        if (changes.openNodes && JSON.stringify(changes.openNodes.currentValue) !== JSON.stringify(changes.openNodes.previousValue)) {
            this.findAndExpandNodes();
        }
        if (changes.disabledList && JSON.stringify(changes.disabledList.currentValue) !== JSON.stringify(changes.disabledList.previousValue)) {
            this.findAndExpandNodes();
        }
    }
    ngOnInit() {
        this.configInternal = this.treeConfig ? this.treeConfig : new QMSTreeConfig();
        this.qmsTreeService.getSelectedNode$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((id) => {
            this.selectedSearchItem = id;
        });
        this.qmsTreeService.getDisabledList$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((res) => {
            if (res.length) {
                this.disabledList = [];
                this.disabledList = [...res];
                this.findAndExpandNodes();
            }
        });
        this.qmsTreeService.getOpenNodes$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((res) => {
            if (res.length) {
                this.openNodes = [];
                this.openNodes = [...res];
                this.findAndExpandNodes();
            }
        });
        this.qmsTreeService.getItemsChildren$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((res) => {
            if (res.length) {
                let newNodesChildren = [];
                res.forEach(x => {
                    const index = this.treeData.findIndex(item => item.id === x.id && item.parentId === x.parentId);
                    if (index < 0) {
                        newNodesChildren.push(x);
                    }
                });
                // Add children to treeData
                if (newNodesChildren.length) {
                    this.treeData = [...this.treeData, ...newNodesChildren];
                    this.dataSource.data = this.convertTreeData(this.treeData);
                    this.findAndExpandNodes(true);
                }
                // Expand exist nodes in treeData
                this.expandingNodes.forEach(node => {
                    const index = this.treeControl.dataNodes.findIndex(x => x.parentId === node.parentId && x.id === node.id);
                    if (index >= 0) {
                        this.treeControl.expand(this.treeControl.dataNodes[index]);
                    }
                });
            }
        });
    }
    findAndExpandNodes(expandNewChild = false) {
        for (let i = 0; i < this.treeControl.dataNodes.length; i++) {
            // selected nodes in tree
            this.openNodes.forEach(el => {
                if (this.treeControl.dataNodes[i].id.toLocaleLowerCase() === el.toLowerCase()) {
                    this.expandingNodes.push(this.treeControl.dataNodes[i]);
                    this.treeControl.expand(this.treeControl.dataNodes[i]);
                }
            });
            // disabled nodes in tree
            this.disabledList.forEach(item => {
                if (this.treeControl.dataNodes[i].id.toLocaleLowerCase() === item.toLowerCase()) {
                    this.treeControl.dataNodes[i].disabled = true;
                }
            });
            if (this.selectedSearchItem && this.treeControl.dataNodes[i].id.toLocaleLowerCase() === this.selectedSearchItem.toLowerCase()) {
                this.onClickNode(this.treeControl.dataNodes[i]);
            }
        }
        this.activeNode = this.openNodes[this.openNodes.length - 1];
        // if (this.disabledList.includes(this.activeNode) || expandNewChild) {
        if (this.disabledList.includes(this.activeNode)) {
            this.activeNode = '';
        }
        // scroll to selected node
        setTimeout(() => {
            const element = document.querySelector('.mat-tree-node.active');
            if (element) {
                element.scrollIntoView({ behavior: 'smooth' });
            }
        });
        this.cdRef.detectChanges();
    }
    onClickNode(node) {
        if (this.configInternal.showCheckBox || node.disabled) {
            return;
        }
        this.activeNode = node.id;
        if (this.disabledList.includes(this.activeNode)) {
            this.activeNode = '';
        }
        this.onClickNodeEvent.emit(node);
    }
    onCheckNode(node) {
        if (node.disabled) {
            return;
        }
        this.checklistSelection.toggle(node);
        this.checkBoxEvent.emit(this.checklistSelection.selected);
    }
    onExpandNode(node) {
        this.openNodes = [];
        if (this.treeControl.isExpanded(node)) {
            this.treeControl.expand(node);
            this._addExpandingNode(node);
        }
        else {
            this.treeControl.collapse(node);
            this._removeExpandingNodes(node.id);
        }
        if (!node.markedGetChildren) {
            this.treeControl.dataNodes.forEach(x => {
                if (x.parentId === node.parentId && x.id === node.id) {
                    x.markedGetChildren = true;
                }
            });
            this.nodeExpand.emit({ node, isExpand: this.treeControl.isExpanded(node) });
        }
    }
    _addExpandingNode(node) {
        if (!this.expandingNodes.some(x => x.id === node.id)) {
            this.expandingNodes.push(node);
        }
    }
    _removeExpandingNodes(nodeId) {
        this.expandingNodes = this.expandingNodes.filter(x => x.id !== nodeId);
    }
    ngOnDestroy() {
        this.ngUnsubscribe.next();
        this.ngUnsubscribe.complete();
    }
    convertTreeData(list) {
        let map = {}, node, roots = [], i;
        for (i = 0; i < list.length; i += 1) {
            map[list[i].id] = i; // initialize the map
            list[i].children = []; // initialize the children
        }
        for (i = 0; i < list.length; i += 1) {
            node = list[i];
            if (node.parentId || (node.parentId !== this.guidHelper.empty)) {
                if (list[map[node.parentId]]) {
                    list[map[node.parentId]].children.push(node);
                }
                else {
                    roots.push(node);
                }
            }
            else {
                roots.push(node);
            }
        }
        return roots;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QMSBasicTreeComponent, deps: [{ token: i1.QMSTreeGlobalService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: QMSBasicTreeComponent, selector: "qms-basic-tree", inputs: { treeData: "treeData", treeConfig: "treeConfig", openNodes: "openNodes", disabledList: "disabledList" }, outputs: { nodeExpand: "nodeExpand", onClickNodeEvent: "onClickNodeEvent", checkBoxEvent: "checkBoxEvent" }, usesOnChanges: true, ngImport: i0, template: "<mat-tree\n  class=\"basic-tree-container\"\n  [dataSource]=\"dataSource\"\n  [treeControl]=\"treeControl\"\n>\n  <!-- This is the tree node template for leaf nodes -->\n  <mat-tree-node\n    *matTreeNodeDef=\"let node\"\n    matTreeNodeToggle\n    matTreeNodePadding\n    [ngClass]=\"{\n      active: activeNode == node.id,\n      'mat-tree-node-disabled-all': node.disabled\n    }\"\n    [disabled]=\"node.disabled\"\n  >\n    <button class=\"btn-toggle\" mat-icon-button disabled></button>\n    <ng-container\n      [ngTemplateOutlet]=\"\n        configInternal.showCheckBox ? showCheckboxTemplate : noCheckboxTemplate\n      \"\n      [ngTemplateOutletContext]=\"{ node: node }\"\n    ></ng-container>\n\n    <button\n      *ngIf=\"configInternal.showTickIcon && activeNode == node.id\"\n      disabled\n      mat-icon-button\n    >\n      <mat-icon>done</mat-icon>\n    </button>\n  </mat-tree-node>\n  <!-- This is the tree node template for expandable nodes -->\n  <mat-tree-node\n    *matTreeNodeDef=\"let node; when: hasChild\"\n    matTreeNodePadding\n    [ngClass]=\"{\n      'expand-node': treeControl.isExpanded(node),\n      'collapse-node': !treeControl.isExpanded(node),\n      active: activeNode == node.id,\n      'mat-tree-node-disabled': node.disabled\n    }\"\n  >\n    <button\n      class=\"btn-toggle\"\n      mat-icon-button\n      (click)=\"onExpandNode(node)\"\n      matTreeNodeToggle\n    >\n      <mat-icon class=\"mat-icon-rtl-mirror\">\n        {{ treeControl.isExpanded(node) ? \"expand_more\" : \"chevron_right\" }}\n      </mat-icon>\n    </button>\n\n    <ng-container\n      [ngTemplateOutlet]=\"\n        configInternal.showCheckBox ? showCheckboxTemplate : noCheckboxTemplate\n      \"\n      [ngTemplateOutletContext]=\"{ node: node }\"\n    ></ng-container>\n\n    <button\n      *ngIf=\"configInternal.showTickIcon && activeNode == node.id\"\n      disabled\n      mat-icon-button\n    >\n      <mat-icon>done</mat-icon>\n    </button>\n  </mat-tree-node>\n</mat-tree>\n\n<!-- Template for NO Checkbox -->\n<ng-template #noCheckboxTemplate let-node=\"node\">\n  <img\n    *ngIf=\"node.itemIconSvg\"\n    class=\"material-icons type-icon\"\n    [src]=\"node.itemIconSvg\"\n    (click)=\"onClickNode(node)\"\n  />\n  <span\n    *ngIf=\"node.itemIcon\"\n    [class]=\"node.itemIcon\"\n    [qmsTransformIcon]=\"node.itemIcon\"\n    class=\"material-icons-outlined type-icon\"\n    (click)=\"onClickNode(node)\"\n  ></span>\n  <span\n    *ngIf=\"node.itemMatIcon\"\n    class=\"material-icons-outlined type-icon\"\n    (click)=\"onClickNode(node)\"\n    >{{ node.itemMatIcon }}\n  </span>\n\n  <span\n    class=\"text-name cursor-pointer ml-5 123\"\n    [ngClass]=\"{ disabled: node.disabled }\"\n    (click)=\"onClickNode(node)\"\n    >{{ node.name }}</span\n  >\n</ng-template>\n\n<!-- Template for Checkbox -->\n\n<ng-template #showCheckboxTemplate let-node=\"node\">\n  <mat-checkbox\n    qms-group-options\n    color=\"default\"\n    label=\"none\"\n    class=\"flex-direction-row\"\n    [checked]=\"checklistSelection.isSelected(node)\"\n    (change)=\"onCheckNode(node)\"\n    [disabled]=\"node.disabled\"\n  >\n    <img\n      *ngIf=\"node.itemIconSvg\"\n      class=\"material-icons type-icon\"\n      [src]=\"node.itemIconSvg\"\n      (click)=\"onClickNode(node)\"\n    />\n    <span\n      *ngIf=\"node.itemIcon\"\n      [class]=\"node.itemIcon\"\n      [qmsTransformIcon]=\"node.itemIcon\"\n      class=\"material-icons-outlined type-icon\"\n      (click)=\"onClickNode(node)\"\n    ></span>\n    <span\n      *ngIf=\"node.itemMatIcon\"\n      class=\"material-icons-outlined type-icon\"\n      (click)=\"onClickNode(node)\"\n      >{{ node.itemMatIcon }}\n    </span>\n\n    <span\n      class=\"text-name cursor-pointer ml-5 123\"\n      [ngClass]=\"{ disabled: node.disabled }\"\n      (click)=\"onClickNode(node)\"\n      >{{ node.name }}</span\n    >\n  </mat-checkbox>\n</ng-template>\n", 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}.mat-tree.basic-tree-container{font-family:Open Sans}.mat-tree.basic-tree-container .mat-tree-node:hover{background:#00000014}.mat-tree.basic-tree-container .mat-tree-node:active{background:#0000001f}.mat-tree.basic-tree-container .mat-tree-node.active{color:var(--primary);background:var(--primary-light-6-opacity)}.mat-tree.basic-tree-container .mat-tree-node.active:active{background:var(--primary-light-12-opacity)}.mat-tree.basic-tree-container .mat-tree-node.active button,.mat-tree.basic-tree-container .mat-tree-node.active .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.active .type-icon,.mat-tree.basic-tree-container .mat-tree-node.active .text-name,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active button,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active .type-icon,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active .text-name{color:var(--primary)}.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active:hover{background:var(--primary-light-6-opacity)}.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active:active{background:var(--primary-light-12-opacity)}.mat-tree.basic-tree-container .mat-tree-node.expand-node,.mat-tree.basic-tree-container .mat-tree-node.expand-node button,.mat-tree.basic-tree-container .mat-tree-node.expand-node .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.expand-node .type-icon,.mat-tree.basic-tree-container .mat-tree-node.expand-node .text-name{color:var(--primary)}.mat-tree.basic-tree-container .mat-tree-node.expand-node:hover{background:var(--primary-light-6-opacity)}.mat-tree.basic-tree-container .mat-tree-node.expand-node:active{background:var(--primary-light-12-opacity)}.mat-tree.basic-tree-container .type-icon{margin-right:5px;color:var(--ws-action-active)}.mat-tree.basic-tree-container .text-name{color:var(--default-color)}.mat-tree.basic-tree-container .mat-icon-rtl-mirror{color:#0009}.mat-tree.basic-tree-container .mat-mdc-icon-button.btn-toggle{width:35px;height:35px;line-height:35px}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all{cursor:default!important;pointer-events:none;-webkit-user-select:none;user-select:none}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all button.mat-button-disabled,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all .type-icon{color:#00000061}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all .text-name.disabled{color:#00000061;cursor:default!important;pointer-events:none;-webkit-user-select:none;user-select:none}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all.active{background-color:transparent}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled button.mat-button-disabled,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled .type-icon{color:#00000061}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled .text-name.disabled{color:#00000061;cursor:default!important;pointer-events:none;-webkit-user-select:none;user-select:none}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled.active,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled:hover,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled:active,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled.expand-node:hover,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled.expand-node:active{background-color:transparent}.text-name{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;cursor:pointer;width:100%}.cursor-pointer{cursor:pointer}.ml-5{margin-left:10px}::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}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3.MatTreeNode, selector: "mat-tree-node", inputs: ["disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7.QMSGroupOptionDirective, selector: "[qms-group-options]", inputs: ["label"] }, { kind: "directive", type: i7.AutocompleteOffDirective, selector: "[qms-group-options]" }, { kind: "directive", type: i8.QMSMultiIconDirective, selector: "[qmsTransformIcon]", inputs: ["qmsTransformIcon"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QMSBasicTreeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'qms-basic-tree', template: "<mat-tree\n  class=\"basic-tree-container\"\n  [dataSource]=\"dataSource\"\n  [treeControl]=\"treeControl\"\n>\n  <!-- This is the tree node template for leaf nodes -->\n  <mat-tree-node\n    *matTreeNodeDef=\"let node\"\n    matTreeNodeToggle\n    matTreeNodePadding\n    [ngClass]=\"{\n      active: activeNode == node.id,\n      'mat-tree-node-disabled-all': node.disabled\n    }\"\n    [disabled]=\"node.disabled\"\n  >\n    <button class=\"btn-toggle\" mat-icon-button disabled></button>\n    <ng-container\n      [ngTemplateOutlet]=\"\n        configInternal.showCheckBox ? showCheckboxTemplate : noCheckboxTemplate\n      \"\n      [ngTemplateOutletContext]=\"{ node: node }\"\n    ></ng-container>\n\n    <button\n      *ngIf=\"configInternal.showTickIcon && activeNode == node.id\"\n      disabled\n      mat-icon-button\n    >\n      <mat-icon>done</mat-icon>\n    </button>\n  </mat-tree-node>\n  <!-- This is the tree node template for expandable nodes -->\n  <mat-tree-node\n    *matTreeNodeDef=\"let node; when: hasChild\"\n    matTreeNodePadding\n    [ngClass]=\"{\n      'expand-node': treeControl.isExpanded(node),\n      'collapse-node': !treeControl.isExpanded(node),\n      active: activeNode == node.id,\n      'mat-tree-node-disabled': node.disabled\n    }\"\n  >\n    <button\n      class=\"btn-toggle\"\n      mat-icon-button\n      (click)=\"onExpandNode(node)\"\n      matTreeNodeToggle\n    >\n      <mat-icon class=\"mat-icon-rtl-mirror\">\n        {{ treeControl.isExpanded(node) ? \"expand_more\" : \"chevron_right\" }}\n      </mat-icon>\n    </button>\n\n    <ng-container\n      [ngTemplateOutlet]=\"\n        configInternal.showCheckBox ? showCheckboxTemplate : noCheckboxTemplate\n      \"\n      [ngTemplateOutletContext]=\"{ node: node }\"\n    ></ng-container>\n\n    <button\n      *ngIf=\"configInternal.showTickIcon && activeNode == node.id\"\n      disabled\n      mat-icon-button\n    >\n      <mat-icon>done</mat-icon>\n    </button>\n  </mat-tree-node>\n</mat-tree>\n\n<!-- Template for NO Checkbox -->\n<ng-template #noCheckboxTemplate let-node=\"node\">\n  <img\n    *ngIf=\"node.itemIconSvg\"\n    class=\"material-icons type-icon\"\n    [src]=\"node.itemIconSvg\"\n    (click)=\"onClickNode(node)\"\n  />\n  <span\n    *ngIf=\"node.itemIcon\"\n    [class]=\"node.itemIcon\"\n    [qmsTransformIcon]=\"node.itemIcon\"\n    class=\"material-icons-outlined type-icon\"\n    (click)=\"onClickNode(node)\"\n  ></span>\n  <span\n    *ngIf=\"node.itemMatIcon\"\n    class=\"material-icons-outlined type-icon\"\n    (click)=\"onClickNode(node)\"\n    >{{ node.itemMatIcon }}\n  </span>\n\n  <span\n    class=\"text-name cursor-pointer ml-5 123\"\n    [ngClass]=\"{ disabled: node.disabled }\"\n    (click)=\"onClickNode(node)\"\n    >{{ node.name }}</span\n  >\n</ng-template>\n\n<!-- Template for Checkbox -->\n\n<ng-template #showCheckboxTemplate let-node=\"node\">\n  <mat-checkbox\n    qms-group-options\n    color=\"default\"\n    label=\"none\"\n    class=\"flex-direction-row\"\n    [checked]=\"checklistSelection.isSelected(node)\"\n    (change)=\"onCheckNode(node)\"\n    [disabled]=\"node.disabled\"\n  >\n    <img\n      *ngIf=\"node.itemIconSvg\"\n      class=\"material-icons type-icon\"\n      [src]=\"node.itemIconSvg\"\n      (click)=\"onClickNode(node)\"\n    />\n    <span\n      *ngIf=\"node.itemIcon\"\n      [class]=\"node.itemIcon\"\n      [qmsTransformIcon]=\"node.itemIcon\"\n      class=\"material-icons-outlined type-icon\"\n      (click)=\"onClickNode(node)\"\n    ></span>\n    <span\n      *ngIf=\"node.itemMatIcon\"\n      class=\"material-icons-outlined type-icon\"\n      (click)=\"onClickNode(node)\"\n      >{{ node.itemMatIcon }}\n    </span>\n\n    <span\n      class=\"text-name cursor-pointer ml-5 123\"\n      [ngClass]=\"{ disabled: node.disabled }\"\n      (click)=\"onClickNode(node)\"\n      >{{ node.name }}</span\n    >\n  </mat-checkbox>\n</ng-template>\n", 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}.mat-tree.basic-tree-container{font-family:Open Sans}.mat-tree.basic-tree-container .mat-tree-node:hover{background:#00000014}.mat-tree.basic-tree-container .mat-tree-node:active{background:#0000001f}.mat-tree.basic-tree-container .mat-tree-node.active{color:var(--primary);background:var(--primary-light-6-opacity)}.mat-tree.basic-tree-container .mat-tree-node.active:active{background:var(--primary-light-12-opacity)}.mat-tree.basic-tree-container .mat-tree-node.active button,.mat-tree.basic-tree-container .mat-tree-node.active .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.active .type-icon,.mat-tree.basic-tree-container .mat-tree-node.active .text-name,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active button,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active .type-icon,.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active .text-name{color:var(--primary)}.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active:hover{background:var(--primary-light-6-opacity)}.mat-tree.basic-tree-container .mat-tree-node.collapse-node.active:active{background:var(--primary-light-12-opacity)}.mat-tree.basic-tree-container .mat-tree-node.expand-node,.mat-tree.basic-tree-container .mat-tree-node.expand-node button,.mat-tree.basic-tree-container .mat-tree-node.expand-node .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.expand-node .type-icon,.mat-tree.basic-tree-container .mat-tree-node.expand-node .text-name{color:var(--primary)}.mat-tree.basic-tree-container .mat-tree-node.expand-node:hover{background:var(--primary-light-6-opacity)}.mat-tree.basic-tree-container .mat-tree-node.expand-node:active{background:var(--primary-light-12-opacity)}.mat-tree.basic-tree-container .type-icon{margin-right:5px;color:var(--ws-action-active)}.mat-tree.basic-tree-container .text-name{color:var(--default-color)}.mat-tree.basic-tree-container .mat-icon-rtl-mirror{color:#0009}.mat-tree.basic-tree-container .mat-mdc-icon-button.btn-toggle{width:35px;height:35px;line-height:35px}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all{cursor:default!important;pointer-events:none;-webkit-user-select:none;user-select:none}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all button.mat-button-disabled,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all .mat-icon-rtl-mirror,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all .type-icon{color:#00000061}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all .text-name.disabled{color:#00000061;cursor:default!important;pointer-events:none;-webkit-user-select:none;user-select:none}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled-all.active{background-color:transparent}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled button.mat-button-disabled,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled .type-icon{color:#00000061}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled .text-name.disabled{color:#00000061;cursor:default!important;pointer-events:none;-webkit-user-select:none;user-select:none}.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled.active,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled:hover,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled:active,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled.expand-node:hover,.mat-tree.basic-tree-container .mat-tree-node.mat-tree-node-disabled.expand-node:active{background-color:transparent}.text-name{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;cursor:pointer;width:100%}.cursor-pointer{cursor:pointer}.ml-5{margin-left:10px}::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}\n"] }]
        }], ctorParameters: () => [{ type: i1.QMSTreeGlobalService }, { type: i0.ChangeDetectorRef }], propDecorators: { treeData: [{
                type: Input
            }], treeConfig: [{
                type: Input
            }], openNodes: [{
                type: Input
            }], disabledList: [{
                type: Input
            }], nodeExpand: [{
                type: Output
            }], onClickNodeEvent: [{
                type: Output
            }], checkBoxEvent: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 