import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ASSETS } from '../../../constants/assets.constants';
import * as i0 from "@angular/core";
import * as i1 from "../../../workflow-services/auth.service";
import * as i2 from "../../../workflow-services/policy.service";
import * as i3 from "@angular/forms";
import * as i4 from "@vcomply/editor";
import * as i5 from "@angular/common";
import * as i6 from "../../../ui-kit/tooltip/tooltip.directive";
import * as i7 from "../../../ui-kit/popover/popover.component";
import * as i8 from "../../../ui-kit/popover/popover.directive";
import * as i9 from "../../no-data/no-data.component";
import * as i10 from "../../../workflow-program/create-program-ui/floating-bar/floating-bar.component";
import * as i11 from "../../checkbox-list/checkbox-list.component";
import * as i12 from "../../select-approvers/select-approvers.component";
export class ApprovalCreateFormComponent {
    constructor(authService, policyService) {
        this.authService = authService;
        this.policyService = policyService;
        this.ASSETS = ASSETS;
        this.enableApprovalCreate = false;
        this.enableApprovalLevel = false;
        this.enablePolicyCategory = false;
        this.workflowName = '';
        this.selectApprovalPayload = [];
        this.createApprovalPayload = [];
        this.approvalWorkflows = [];
        this.filteredCategory = [];
        this.levels = 1;
        this.categoryConfig = {
            panelTitle: 'Select Category',
            floatingTextSingular: 'Category selected',
            floatingTextPlural: 'Categories selected',
            searchPlaceholder: 'Search Category',
            searchEnabled: true,
            selectAllEnabled: true,
            workflow: 'policy',
        };
        this.selectedCat = [];
        this.editApprovalData = [];
        this.editIndex = -1;
        this.createDescription = '';
        this.selectedCategoryId = [];
        this.isSaving = false;
        this.mode = 'CREATE';
        this.saveApprovalWorkflow = new EventEmitter();
        this.closeCreateClicked = new EventEmitter();
        this.description = {
            mode: 'prime',
            colorPalette: true,
            link: true,
            placeholder: 'Add a description for this approval workflow',
        };
    }
    ngOnInit() {
        if (this.mode == 'EDIT') {
            this.populateApprover();
        }
        if (this.editWorkflowLevel?.editLevel) {
            this.editApproval(this.editWorkflowLevel?.editLevel, this.editWorkflowLevel?.index);
        }
        if (this.enableCreateForm) {
            this.enableApprovalCreate = true;
        }
    }
    createApprovalAction(event) {
        if (event.toLowerCase() === 'approval') {
            this.enableApprovalCreate = true;
        }
    }
    addLevelsClicked(event) {
        this.enableApprovalLevel = event;
        if (event)
            this.levels++;
    }
    getCategoryId(category) {
        this.selectedCategoryId = category.map((cat) => cat.item_id);
    }
    saveCategoryList(event) {
        this.selectedCat = event;
        this.filterSelectedCategory(event);
        this.enablePolicyCategory = false;
    }
    filterSelectedCategory(selectedCategory) {
        this.filteredCategory = this.selectedCategory.filter((category) => selectedCategory.includes(category._id));
        this.getCategoryId(this.filteredCategory);
    }
    removeCategory(event) {
        const categoryIndex = this.filteredCategory.findIndex((category) => category?.item_id === event?.item_id);
        this.filteredCategory?.splice(categoryIndex, 1);
    }
    closeCategoryList() {
        this.enablePolicyCategory = false;
    }
    enableCategory(event) {
        this.enablePolicyCategory = event;
    }
    closeSelectApprover() {
        this.enableApprovalLevel = false;
        this.approvalWorkflows = this.approvalWorkflows.filter((workflow) => workflow.approvers?.length);
        this.levels = this.approvalWorkflows?.length + 1;
    }
    selectedApprover(event) {
        this.selectApprovalPayload = event;
        if (this.editIndex !== -1) {
            this.approvalWorkflows?.splice(this.editIndex, 1);
            this.approvalWorkflows?.splice(this.editIndex, 0, event[0]);
            this.editIndex = -1;
            this.editApprovalData = [];
        }
        else {
            this.approvalWorkflows.push(event[0]);
        }
        this.approvalWorkflows = this.approvalWorkflows.filter((workflow) => workflow.approvers?.length);
        this.levels = this.approvalWorkflows?.length + 1;
        this.enableApprovalLevel = false;
    }
    deleteLevel(index) {
        this.approvalWorkflows.splice(index, 1);
        this.levels = this.approvalWorkflows?.length + 1;
        for (let i = index; i < this.approvalWorkflows.length; i++) {
            if (this.approvalWorkflows[index]['level1'] ===
                this.approvalWorkflows[index]['alias_name']) {
                this.approvalWorkflows[index]['alias_name'] = `Level ${i + 1}`;
            }
            this.approvalWorkflows[index]['level1'] = `Level ${i + 1}`;
        }
    }
    checkLevel() {
        if (this.levels === 0) {
            this.levels = 1;
        }
    }
    editApproval(approval, index) {
        this.editApprovalData = [approval];
        this.editIndex = index;
        this.enableApprovalLevel = true;
    }
    closeCreateForm() {
        this.closeCreateClicked.emit();
    }
    nextClick() {
        this.removeMemberNameKey();
    }
    removeMemberNameKey() {
        this.approvalWorkflows = this.approvalWorkflows.map(({ approvers, ...rest }) => ({
            ...rest,
            approvers: approvers.map(({ member_name, ...rest }) => ({ ...rest })),
        }));
        this.generatePayload();
    }
    generatePayload() {
        this.isSaving = true;
        this.setDefaultValues();
        const payload = {
            workflow_module: 'POLICY',
            workflow_name: this.workflowName,
            category_id: this.selectedCategoryId,
            approval_workflow: this.approvalWorkflows,
            created_by: this.authService.getMemberId(),
            organisation_id: this.authService.getOrganizationId(),
            delete_flag: 0,
            Is_approval: 1,
            description: {
                attachments: [],
                text: this.createDescription,
            },
        };
        if (this.mode === 'EDIT') {
            this._editWorkflow(payload);
        }
        else {
            this.createNewWorkflow(payload);
        }
    }
    setDefaultValues() {
        const approvers = JSON.parse(JSON.stringify(this.approvalWorkflows));
        this.approvalWorkflows = approvers.map((ele) => {
            ele['approvers'] = ele['approvers'].map((approvers) => {
                approvers['approval_flag'] = false;
                approvers['reject_flag'] = false;
                approvers['remove_flag'] = false;
                return approvers;
            });
            return ele;
        });
    }
    createNewWorkflow(payload) {
        this.policyService.createApprovalWorkflow(payload).subscribe({
            next: (res) => {
                this.isSaving = false;
                this.saveApprovalWorkflow.emit(true);
            },
            error: (err) => {
                console.error(err);
            },
        });
    }
    _editWorkflow(payload) {
        this.policyService
            .editApprovalWorkflow(payload, this.approverDetails._id)
            .subscribe({
            next: (res) => {
                this.isSaving = false;
                this.saveApprovalWorkflow.emit(true);
            },
            error: (err) => {
                console.error(err);
            },
        });
    }
    populateApprover() {
        const { workflow_name, approval_workflow, description, category_arr } = this.approverDetails;
        this.workflowName = workflow_name;
        this.approvalWorkflows = approval_workflow;
        this.createDescription = description?.text ?? '';
        const categoryDetails = category_arr.map((category) => {
            return {
                item_id: category?.cal_category_id,
                item_name: category?.category_name,
                _id: category?._id,
                parent_items: [],
                parent_item_ids: [],
                custom_tags: [],
            };
        });
        this.selectedCategoryId = category_arr.map((category) => category?.cal_category_id);
        this.filteredCategory = categoryDetails;
    }
    closeForm() {
        this.saveApprovalWorkflow.emit();
    }
    deselectUser(approver, index) {
        const removeIndex = this.approvalWorkflows[index]?.approvers.findIndex((ele) => ele?.member_id === approver?.member_id);
        this.approvalWorkflows[index]?.approvers.splice(removeIndex, 1);
        this.approvalWorkflows = this.approvalWorkflows.filter((workflow) => workflow.approvers?.length);
        this.levels = this.approvalWorkflows?.length + 1;
    }
    approvalNameSelection(type, event) {
        this.approvalName = event ? type : '';
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ApprovalCreateFormComponent, deps: [{ token: i1.AuthService }, { token: i2.PolicyService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ApprovalCreateFormComponent, selector: "app-approval-create-form", inputs: { mode: "mode", approverDetails: "approverDetails", approverWorkFlowList: "approverWorkFlowList", enableCreateForm: "enableCreateForm", allApprovers: "allApprovers", selectedCategory: "selectedCategory", editWorkflowLevel: "editWorkflowLevel" }, outputs: { saveApprovalWorkflow: "saveApprovalWorkflow", closeCreateClicked: "closeCreateClicked" }, ngImport: i0, template: "<div\n  class=\"approval-workflow-dialog\"\n  *ngIf=\"!enableApprovalLevel && !enablePolicyCategory\"\n>\n  <div\n    class=\"approval-workflow-dialog-head vx-d-flex vx-align-center vx-justify-between vx-pl-4 vx-pr-4\"\n  >\n    <div class=\"vx-fs-14 vx-fw-500 vx-label-txt\">\n      <button (click)=\"closeCreateForm()\" class=\"back-btn vx-p-0 vx-m-0\">\n        <i class=\"icons vx-mr-1\">&#xe91d;</i></button\n      >Select Approval Workflow\n    </div>\n  </div>\n  <div class=\"approval-workflow-dialog-body\">\n    <app-no-data\n      *ngIf=\"!approverWorkFlowList.length && !enableApprovalCreate\"\n      [noDataImage]=\"ASSETS.approval_workflow\"\n      noDataText=\"\n        You did not set any approval workflow.<br><span class='small-text'>Click on the <strong>Create An Approval Workflow</strong> button to begin.</span>\n      \"\n      [noDataButton]=\"'CREATE AN APPROVAL WORKFLOW'\"\n      [button]=\"'approval'\"\n      (buttonAction)=\"createApprovalAction($event)\"\n    ></app-no-data>\n\n    <div\n      *ngIf=\"enableApprovalCreate || enableCreateForm\"\n      class=\"approval-workflow-dialog-body-inner vx-d-flex vx-align-center vx-justify-center\"\n    >\n      <div class=\"approval-workflow-form\">\n        <!-- Workflow Name -->\n        <div class=\"approval-workflow-form-row vx-mb-5\">\n          <div class=\"form-left\">\n            <img [src]=\"ASSETS.what\" />\n          </div>\n          <div class=\"form-right\">\n            <div\n              class=\"label-heading vx-fs-11 vx-fw-500 vx-tt-uppercase vx-tt-uppercase vx-mb-2\"\n            >\n              WORKFLOW NAME <span class=\"required vx-fs-14 vx-fw-500\">*</span>\n            </div>\n            <input\n              *ngIf=\"!workflowName?.length || approvalName === 'name'\"\n              (keydown)=\"approvalName = 'name'\"\n              (focusin)=\"approvalNameSelection('name', true)\"\n              (focusout)=\"approvalNameSelection('name', false)\"\n              class=\"textField\"\n              type=\"text\"\n              [(ngModel)]=\"workflowName\"\n              placeholder=\"Name of the approval workflow\"\n            />\n            <div\n              *ngIf=\"workflowName?.length && approvalName !== 'name'\"\n              class=\"selectBoxSuccess vx-pl-2 vx-pr-3 vx-d-flex vx-align-center vx-justify-between\"\n            >\n              <div\n                class=\"selectBoxText vx-fs-13 vx-paragraph-txt\"\n                [appTooltip]=\"workflowName\"\n                placement=\"bottom-left\"\n                delay=\"0\"\n                type=\"black\"\n                [tooltipMandatory]=\"false\"\n              >\n                {{ workflowName }}\n              </div>\n              <button\n                (click)=\"approvalNameSelection('name', true)\"\n                class=\"editBtn vx-fs-11 vx-fw-600 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center\"\n              >\n                <i class=\"icons vx-mr-1\">&#xe90c;</i> EDIT\n              </button>\n            </div>\n            <div class=\"vx-mt-2\">\n              <vcomply-editor\n                [editorConfig]=\"description\"\n                [(ngModel)]=\"createDescription\"\n              ></vcomply-editor>\n            </div>\n          </div>\n        </div>\n\n        <!-- Policy Category -->\n        <div class=\"approval-workflow-form-row vx-mb-5\">\n          <div class=\"form-left\">\n            <img [src]=\"ASSETS.case_category\" />\n          </div>\n          <div class=\"form-right\">\n            <div\n              class=\"label-heading vx-fs-11 vx-fw-500 vx-tt-uppercase vx-tt-uppercase vx-mb-2\"\n            >\n              SELECT POLICY CATEGORY\n              <span class=\"required vx-fs-14 vx-fw-500\">*</span>\n            </div>\n            <div\n              *ngIf=\"filteredCategory?.length === 0\"\n              (click)=\"enableCategory(true)\"\n              class=\"selectBoxEnable vx-pl-3 vx-pr-3 vx-d-flex vx-align-center\"\n              [class.disabled]=\"false\"\n            >\n              <div\n                class=\"selectBoxPlacehoder vx-fs-13 vx-paragraph-txt vx-lh-4\"\n              >\n                Select the policy category that this approval<br />workflow\n                applies to\n              </div>\n            </div>\n\n            <div\n              *ngIf=\"filteredCategory?.length > 0\"\n              class=\"selectBoxSuccess vx-pl-2 vx-pr-3 vx-d-flex vx-align-center vx-justify-between\"\n            >\n              <div\n                class=\"chipContainer vx-d-flex vx-align-center vx-pl-1 vx-pr-2\"\n              >\n                <ng-container\n                  *ngFor=\"\n                    let category of filteredCategory | slice : 0 : 1;\n                    let catIndex = index\n                  \"\n                >\n                  <i\n                    (click)=\"removeCategory(category)\"\n                    class=\"icons cross vx-fs-12 vx-paragraph-txt vx-mr-1\"\n                    >&#xe9ae;</i\n                  >\n                  <span\n                    class=\"chipName vx-fs-11 vx-label-txt\"\n                    [appTooltip]=\"category?.item_name\"\n                    placement=\"bottom-left\"\n                    delay=\"0\"\n                    type=\"black\"\n                    [tooltipMandatory]=\"false\"\n                    >{{ category?.item_name }}</span\n                  >\n                </ng-container>\n                <button\n                  *ngIf=\"filteredCategory?.length > 1\"\n                  class=\"countBtn vx-fs-9 vx-fw-500 vx-txt-white vx-d-flex vx-align-center vx-justify-center vx-lh-4\"\n                  appPopover\n                  (click)=\"policyOwnerPopover.popover()\"\n                  placement=\"right\"\n                >\n                  +{{ filteredCategory?.length - 1 }}\n                </button>\n              </div>\n              <app-popover #policyOwnerPopover [dontCloseonClick]=\"true\">\n                <div class=\"wf-action-list\">\n                  <ul class=\"action-item\">\n                    <li *ngFor=\"let category of filteredCategory | slice : 1\">\n                      <div class=\"avatar-card\">\n                        <span\n                          class=\"value\"\n                          [appTooltip]=\"category?.item_name\"\n                          placement=\"bottom-left\"\n                          delay=\"0\"\n                          type=\"black\"\n                          [tooltipMandatory]=\"false\"\n                        >\n                          <i (click)=\"removeCategory(category)\" class=\"icons\"\n                            >&#xe90d;</i\n                          >\n                          {{ category?.item_name }}\n                        </span>\n                      </div>\n                    </li>\n                  </ul>\n                </div>\n              </app-popover>\n              <button\n                filteredCategory\n                (click)=\"enableCategory(true)\"\n                class=\"editBtn vx-fs-11 vx-fw-600 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center\"\n              >\n                <i class=\"icons vx-mr-1\">&#xe90c;</i> EDIT\n              </button>\n            </div>\n          </div>\n        </div>\n\n        <!-- Approval Workflow -->\n        <div class=\"approval-workflow-form-row vx-mb-5\">\n          <div class=\"form-left\">\n            <img [src]=\"ASSETS.approval\" />\n          </div>\n          <div class=\"form-right\">\n            <div\n              class=\"label-heading vx-fs-11 vx-fw-500 vx-tt-uppercase vx-tt-uppercase vx-mb-2\"\n            >\n              APPROVERS & APPROVAL WORKFLOW\n              <span class=\"required vx-fs-14 vx-fw-500\">*</span>\n            </div>\n            <div\n              *ngIf=\"approvalWorkflows?.length === 0\"\n              (click)=\"addLevelsClicked(true)\"\n              class=\"selectBoxEnable vx-pl-3 vx-pr-3 vx-d-flex vx-align-center\"\n              [class.disabled]=\"false\"\n            >\n              <div\n                class=\"selectBoxPlacehoder vx-fs-13 vx-paragraph-txt vx-lh-4\"\n              >\n                Select approvers and select the order of approval\n              </div>\n            </div>\n            <ng-container *ngIf=\"approvalWorkflows?.length > 0\">\n              <div\n                *ngFor=\"\n                  let approvalWorkflow of approvalWorkflows;\n                  let i = index\n                \"\n                class=\"selectBoxSuccess vx-pl-2 vx-pr-3 vx-d-flex vx-align-center vx-justify-between vx-mb-2\"\n              >\n                <div class=\"vx-d-flex vx-align-center\">\n                  <div class=\"level-left vx-d-flex vx-align-center\">\n                    <div class=\"vx-d-block\">\n                      <div\n                        class=\"level-name vx-fs-9 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-lh-3\"\n                        [appTooltip]=\"approvalWorkflow?.alias_name\"\n                        placement=\"bottom-left\"\n                        delay=\"0\"\n                        type=\"black\"\n                        [tooltipMandatory]=\"false\"\n                      >\n                        {{ approvalWorkflow?.alias_name }}\n                      </div>\n                      <div\n                        class=\"vx-fs-9 vx-fw-500 vx-label-txt vx-tt-uppercase vx-lh-3\"\n                      >\n                        <!-- {{ approvalWorkflow?.type }} -->\n                        {{\n                          (approvalWorkflow?.type | lowercase) === \"roundrobin\"\n                            ? \"ROUND-ROBIN\"\n                            : (approvalWorkflow?.type | lowercase) === \"anyone\"\n                            ? \"ANY ONE\"\n                            : approvalWorkflow?.type\n                        }}\n                      </div>\n                    </div>\n                  </div>\n                  <div\n                    class=\"chipContainer vx-d-flex vx-align-center vx-pl-1 vx-pr-2 vx-ml-2\"\n                  >\n                    <i\n                      (click)=\"deselectUser(approvalWorkflow?.approvers[0], i)\"\n                      class=\"icons cross vx-fs-12 vx-paragraph-txt vx-mr-1\"\n                      >&#xe9ae;</i\n                    >\n                    <div\n                      *ngIf=\"\n                        approvalWorkflow?.type?.toLowerCase() ===\n                          'sequential' &&\n                        approvalWorkflow?.approvers?.length < 2\n                      \"\n                      class=\"workflowLavel vx-fs-11 vx-fw-500 vx-pl-1 vx-pr-1 vx-lh-4 vx-mr-1 vx-text-center\"\n                    >\n                      {{\n                        1 == approvalWorkflow?.approvers?.length ? \"Final\" : 1\n                      }}\n                    </div>\n                    <div\n                      *ngIf=\"\n                        approvalWorkflow?.approvers?.length > 1 &&\n                        approvalWorkflow?.type?.toLowerCase() === 'sequential'\n                      \"\n                      class=\"workflowLavel vx-fs-11 vx-fw-500 vx-pl-1 vx-pr-1 vx-lh-4 vx-mr-1 vx-text-center\"\n                    >\n                      1\n                    </div>\n                    <span\n                      class=\"chipName vx-fs-11 vx-label-txt\"\n                      [appTooltip]=\"approvalWorkflow?.approvers[0]?.member_name\"\n                      placement=\"bottom-left\"\n                      delay=\"0\"\n                      type=\"black\"\n                      [tooltipMandatory]=\"false\"\n                      >{{ approvalWorkflow?.approvers[0]?.member_name }}</span\n                    >\n                    <button\n                      *ngIf=\"approvalWorkflow?.approvers?.length > 1\"\n                      class=\"countBtn vx-fs-9 vx-fw-500 vx-txt-white vx-d-flex vx-align-center vx-justify-center vx-lh-4\"\n                      appPopover\n                      (click)=\"workflowPopover.popover()\"\n                      placement=\"right\"\n                    >\n                      + {{ approvalWorkflow?.approvers?.length - 1 }}\n                    </button>\n                  </div>\n                  <app-popover #workflowPopover [dontCloseonClick]=\"true\">\n                    <div class=\"wf-action-list\">\n                      <ul class=\"action-item\">\n                        <li\n                          *ngFor=\"\n                            let approver of approvalWorkflow?.approvers\n                              | slice : 1;\n                            let j = index\n                          \"\n                        >\n                          <div class=\"avatar-card\">\n                            <span\n                              class=\"value\"\n                              [appTooltip]=\"approver?.member_name\"\n                              placement=\"bottom-left\"\n                              delay=\"0\"\n                              type=\"black\"\n                              [tooltipMandatory]=\"false\"\n                            >\n                              <i\n                                (click)=\"deselectUser(approver, i)\"\n                                class=\"icons\"\n                                >&#xe90d;</i\n                              >\n                              <span\n                                *ngIf=\"\n                                  approvalWorkflow?.type?.toLowerCase() ===\n                                  'sequential'\n                                \"\n                                class=\"workflowLavel vx-fs-11 vx-fw-500 vx-pl-1 vx-pr-1 vx-lh-4 vx-mr-1 vx-text-center\"\n                                >{{\n                                  j + 1 ===\n                                  approvalWorkflow?.approvers?.length - 1\n                                    ? \"Final\"\n                                    : j + 2\n                                }}</span\n                              >\n                              {{ approver?.member_name }}\n                            </span>\n                          </div>\n                        </li>\n                      </ul>\n                    </div>\n                  </app-popover>\n                </div>\n\n                <div class=\"vx-d-flex vx-align-center\">\n                  <button\n                    (click)=\"editApproval(approvalWorkflow, i)\"\n                    class=\"editBtn vx-fs-11 vx-fw-600 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center\"\n                  >\n                    <i class=\"icons vx-mr-1\">&#xe90c;</i> EDIT\n                  </button>\n                  <button\n                    (click)=\"deleteLevel(i)\"\n                    class=\"deleteBtn vx-fs-11 vx-fw-600 vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-4 vx-d-flex vx-align-center\"\n                  >\n                    <i class=\"icons vx-mr-1\">&#xe9ae;</i> DELETE\n                  </button>\n                </div>\n              </div>\n            </ng-container>\n\n            <button\n              *ngIf=\"approvalWorkflows?.length > 0\"\n              (click)=\"addLevelsClicked(true)\"\n              class=\"addMoreBtn vx-fs-11 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-mt-1\"\n            >\n              + ADD MORE LEVELS\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <vui-floating-bar\n      *ngIf=\"enableApprovalCreate || enableCreateForm\"\n      [nextDisabled]=\"\n        workflowName?.trim() === '' ||\n        approvalWorkflows?.length === 0 ||\n        filteredCategory?.length === 0 ||\n        isSaving\n      \"\n      (closeList)=\"closeCreateForm()\"\n      (closeEvent)=\"nextClick()\"\n    ></vui-floating-bar>\n  </div>\n</div>\n\n<!-- [selectedItems]=\"policyForm.selectedCategories\" -->\n\n<app-select-approvers\n  *ngIf=\"enableApprovalLevel\"\n  [allApprovers]=\"allApprovers\"\n  (closeSelectApprover)=\"closeSelectApprover()\"\n  (selectedApprover)=\"selectedApprover($event)\"\n  [levels]=\"levels\"\n  [editApprovalData]=\"editApprovalData\"\n></app-select-approvers>\n\n<app-checkbox-list\n  *ngIf=\"enablePolicyCategory\"\n  [config]=\"categoryConfig\"\n  [twoColumn]=\"false\"\n  [itemsList]=\"selectedCategory\"\n  [identifierKey]=\"'_id'\"\n  [displayKey]=\"'item_name'\"\n  [tooltipKey]=\"'item_name'\"\n  [loaded]=\"false\"\n  (saveList)=\"saveCategoryList($event)\"\n  (closeList)=\"closeCategoryList()\"\n  [selectedItems]=\"filteredCategory\"\n>\n</app-checkbox-list>\n", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";@import\"https://cdn.v-comply.com/design-system/css/display/display.css\";@import\"https://cdn.v-comply.com/design-system/css/alignment/alignment.css\";@import\"https://cdn.v-comply.com/design-system/css/text/text.css\";@import\"https://cdn.v-comply.com/design-system/css/color/color.css\";@import\"https://cdn.v-comply.com/design-system/css/width/width.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-top.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-left.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-right.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-top.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-left.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-right.css\";::ng-deep .approval-workflow-dialog{position:fixed;inset:0 500px 0 0}::ng-deep .approval-workflow-dialog:before{background:#1e5dd3;content:\"\";position:absolute;top:0;left:0;right:0;width:100%;height:3px}::ng-deep .approval-workflow-dialog-head{background:#fbfbfb;height:2.75rem;border-bottom:1px solid #f1f1f1}::ng-deep .approval-workflow-dialog-head button.back-btn{background:transparent;border-radius:0;border:none}::ng-deep .approval-workflow-dialog-body{background:#fff;height:calc(100vh - 2.75rem);padding:2rem}::ng-deep .approval-workflow-dialog-body-inner{height:calc(100vh - 10.75rem);overflow:hidden;overflow-y:auto;margin-bottom:1rem;padding-right:.5rem;width:calc(100% + .5rem)}::ng-deep .approval-workflow-dialog-body-inner::-webkit-scrollbar-track{background-color:#fff;position:absolute}::ng-deep .approval-workflow-dialog-body-inner::-webkit-scrollbar{width:3px;height:3px;background-color:transparent;position:absolute}::ng-deep .approval-workflow-dialog-body-inner::-webkit-scrollbar-thumb{border-radius:3px;background-color:#dbdbdb;position:absolute}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form{width:30.75rem;max-height:calc(100vh - 10.75rem)}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row{position:relative}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-left{position:absolute;top:30px;left:0}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-left img{width:2.5rem;height:2.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-right{padding-left:3.75rem}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-right .label-heading .required{color:#eb2424;position:relative;top:-.125rem}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-right button.addMoreBtn{background:transparent;border-radius:0;border:none}::ng-deep .approval-workflow-dialog-body vui-floating-bar .reviewer-floating-bar{padding:0!important}\n"], dependencies: [{ kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i4.MarxEditorComponent, selector: "vcomply-editor", inputs: ["editorConfig"], outputs: ["comment", "sendSavedFiles", "popup"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ToolTipDirective, selector: "[appTooltip]", inputs: ["appTooltip", "placement", "type", "tooltipMandatory", "showTooltip", "animate"] }, { kind: "component", type: i7.PopoverComponent, selector: "app-popover", inputs: ["dontCloseonClick"] }, { kind: "directive", type: i8.PopoverDirective, selector: "[appPopover]", inputs: ["refrence", "placement"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.NoDataComponent, selector: "app-no-data", inputs: ["action", "noDataImage", "noDataText", "noDataButton", "noDataSecButton", "altText", "smallButton", "button"], outputs: ["buttonAction"] }, { kind: "component", type: i10.VuiFloatingBarComponent, selector: "vui-floating-bar", inputs: ["selectedData", "groupSelected", "displayElementKey", "elementId", "singularText", "pluralText", "showNextButton", "showFrequencyText", "showWorkflow", "workflowText", "currentFrequency", "isDisabled", "workflowList", "selectedWorkflow", "workflowPlaceHolder", "mode", "nextDisabled", "nonRemovableUsersList", "removePosition"], outputs: ["closeEvent", "deleteEvent", "closeList", "workflowTypeChanged"] }, { kind: "component", type: i11.CheckboxListComponent, selector: "app-checkbox-list", inputs: ["itemsList", "selectedItems", "identifierKey", "displayKey", "tooltipKey", "config", "twoColumn", "loaded"], outputs: ["closeList", "saveList"] }, { kind: "component", type: i12.SelectApproversComponent, selector: "app-select-approvers", inputs: ["allApprovers", "levels", "editApprovalData"], outputs: ["closeSelectApprover", "selectedApprover"] }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i5.SlicePipe, name: "slice" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ApprovalCreateFormComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-approval-create-form', template: "<div\n  class=\"approval-workflow-dialog\"\n  *ngIf=\"!enableApprovalLevel && !enablePolicyCategory\"\n>\n  <div\n    class=\"approval-workflow-dialog-head vx-d-flex vx-align-center vx-justify-between vx-pl-4 vx-pr-4\"\n  >\n    <div class=\"vx-fs-14 vx-fw-500 vx-label-txt\">\n      <button (click)=\"closeCreateForm()\" class=\"back-btn vx-p-0 vx-m-0\">\n        <i class=\"icons vx-mr-1\">&#xe91d;</i></button\n      >Select Approval Workflow\n    </div>\n  </div>\n  <div class=\"approval-workflow-dialog-body\">\n    <app-no-data\n      *ngIf=\"!approverWorkFlowList.length && !enableApprovalCreate\"\n      [noDataImage]=\"ASSETS.approval_workflow\"\n      noDataText=\"\n        You did not set any approval workflow.<br><span class='small-text'>Click on the <strong>Create An Approval Workflow</strong> button to begin.</span>\n      \"\n      [noDataButton]=\"'CREATE AN APPROVAL WORKFLOW'\"\n      [button]=\"'approval'\"\n      (buttonAction)=\"createApprovalAction($event)\"\n    ></app-no-data>\n\n    <div\n      *ngIf=\"enableApprovalCreate || enableCreateForm\"\n      class=\"approval-workflow-dialog-body-inner vx-d-flex vx-align-center vx-justify-center\"\n    >\n      <div class=\"approval-workflow-form\">\n        <!-- Workflow Name -->\n        <div class=\"approval-workflow-form-row vx-mb-5\">\n          <div class=\"form-left\">\n            <img [src]=\"ASSETS.what\" />\n          </div>\n          <div class=\"form-right\">\n            <div\n              class=\"label-heading vx-fs-11 vx-fw-500 vx-tt-uppercase vx-tt-uppercase vx-mb-2\"\n            >\n              WORKFLOW NAME <span class=\"required vx-fs-14 vx-fw-500\">*</span>\n            </div>\n            <input\n              *ngIf=\"!workflowName?.length || approvalName === 'name'\"\n              (keydown)=\"approvalName = 'name'\"\n              (focusin)=\"approvalNameSelection('name', true)\"\n              (focusout)=\"approvalNameSelection('name', false)\"\n              class=\"textField\"\n              type=\"text\"\n              [(ngModel)]=\"workflowName\"\n              placeholder=\"Name of the approval workflow\"\n            />\n            <div\n              *ngIf=\"workflowName?.length && approvalName !== 'name'\"\n              class=\"selectBoxSuccess vx-pl-2 vx-pr-3 vx-d-flex vx-align-center vx-justify-between\"\n            >\n              <div\n                class=\"selectBoxText vx-fs-13 vx-paragraph-txt\"\n                [appTooltip]=\"workflowName\"\n                placement=\"bottom-left\"\n                delay=\"0\"\n                type=\"black\"\n                [tooltipMandatory]=\"false\"\n              >\n                {{ workflowName }}\n              </div>\n              <button\n                (click)=\"approvalNameSelection('name', true)\"\n                class=\"editBtn vx-fs-11 vx-fw-600 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center\"\n              >\n                <i class=\"icons vx-mr-1\">&#xe90c;</i> EDIT\n              </button>\n            </div>\n            <div class=\"vx-mt-2\">\n              <vcomply-editor\n                [editorConfig]=\"description\"\n                [(ngModel)]=\"createDescription\"\n              ></vcomply-editor>\n            </div>\n          </div>\n        </div>\n\n        <!-- Policy Category -->\n        <div class=\"approval-workflow-form-row vx-mb-5\">\n          <div class=\"form-left\">\n            <img [src]=\"ASSETS.case_category\" />\n          </div>\n          <div class=\"form-right\">\n            <div\n              class=\"label-heading vx-fs-11 vx-fw-500 vx-tt-uppercase vx-tt-uppercase vx-mb-2\"\n            >\n              SELECT POLICY CATEGORY\n              <span class=\"required vx-fs-14 vx-fw-500\">*</span>\n            </div>\n            <div\n              *ngIf=\"filteredCategory?.length === 0\"\n              (click)=\"enableCategory(true)\"\n              class=\"selectBoxEnable vx-pl-3 vx-pr-3 vx-d-flex vx-align-center\"\n              [class.disabled]=\"false\"\n            >\n              <div\n                class=\"selectBoxPlacehoder vx-fs-13 vx-paragraph-txt vx-lh-4\"\n              >\n                Select the policy category that this approval<br />workflow\n                applies to\n              </div>\n            </div>\n\n            <div\n              *ngIf=\"filteredCategory?.length > 0\"\n              class=\"selectBoxSuccess vx-pl-2 vx-pr-3 vx-d-flex vx-align-center vx-justify-between\"\n            >\n              <div\n                class=\"chipContainer vx-d-flex vx-align-center vx-pl-1 vx-pr-2\"\n              >\n                <ng-container\n                  *ngFor=\"\n                    let category of filteredCategory | slice : 0 : 1;\n                    let catIndex = index\n                  \"\n                >\n                  <i\n                    (click)=\"removeCategory(category)\"\n                    class=\"icons cross vx-fs-12 vx-paragraph-txt vx-mr-1\"\n                    >&#xe9ae;</i\n                  >\n                  <span\n                    class=\"chipName vx-fs-11 vx-label-txt\"\n                    [appTooltip]=\"category?.item_name\"\n                    placement=\"bottom-left\"\n                    delay=\"0\"\n                    type=\"black\"\n                    [tooltipMandatory]=\"false\"\n                    >{{ category?.item_name }}</span\n                  >\n                </ng-container>\n                <button\n                  *ngIf=\"filteredCategory?.length > 1\"\n                  class=\"countBtn vx-fs-9 vx-fw-500 vx-txt-white vx-d-flex vx-align-center vx-justify-center vx-lh-4\"\n                  appPopover\n                  (click)=\"policyOwnerPopover.popover()\"\n                  placement=\"right\"\n                >\n                  +{{ filteredCategory?.length - 1 }}\n                </button>\n              </div>\n              <app-popover #policyOwnerPopover [dontCloseonClick]=\"true\">\n                <div class=\"wf-action-list\">\n                  <ul class=\"action-item\">\n                    <li *ngFor=\"let category of filteredCategory | slice : 1\">\n                      <div class=\"avatar-card\">\n                        <span\n                          class=\"value\"\n                          [appTooltip]=\"category?.item_name\"\n                          placement=\"bottom-left\"\n                          delay=\"0\"\n                          type=\"black\"\n                          [tooltipMandatory]=\"false\"\n                        >\n                          <i (click)=\"removeCategory(category)\" class=\"icons\"\n                            >&#xe90d;</i\n                          >\n                          {{ category?.item_name }}\n                        </span>\n                      </div>\n                    </li>\n                  </ul>\n                </div>\n              </app-popover>\n              <button\n                filteredCategory\n                (click)=\"enableCategory(true)\"\n                class=\"editBtn vx-fs-11 vx-fw-600 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center\"\n              >\n                <i class=\"icons vx-mr-1\">&#xe90c;</i> EDIT\n              </button>\n            </div>\n          </div>\n        </div>\n\n        <!-- Approval Workflow -->\n        <div class=\"approval-workflow-form-row vx-mb-5\">\n          <div class=\"form-left\">\n            <img [src]=\"ASSETS.approval\" />\n          </div>\n          <div class=\"form-right\">\n            <div\n              class=\"label-heading vx-fs-11 vx-fw-500 vx-tt-uppercase vx-tt-uppercase vx-mb-2\"\n            >\n              APPROVERS & APPROVAL WORKFLOW\n              <span class=\"required vx-fs-14 vx-fw-500\">*</span>\n            </div>\n            <div\n              *ngIf=\"approvalWorkflows?.length === 0\"\n              (click)=\"addLevelsClicked(true)\"\n              class=\"selectBoxEnable vx-pl-3 vx-pr-3 vx-d-flex vx-align-center\"\n              [class.disabled]=\"false\"\n            >\n              <div\n                class=\"selectBoxPlacehoder vx-fs-13 vx-paragraph-txt vx-lh-4\"\n              >\n                Select approvers and select the order of approval\n              </div>\n            </div>\n            <ng-container *ngIf=\"approvalWorkflows?.length > 0\">\n              <div\n                *ngFor=\"\n                  let approvalWorkflow of approvalWorkflows;\n                  let i = index\n                \"\n                class=\"selectBoxSuccess vx-pl-2 vx-pr-3 vx-d-flex vx-align-center vx-justify-between vx-mb-2\"\n              >\n                <div class=\"vx-d-flex vx-align-center\">\n                  <div class=\"level-left vx-d-flex vx-align-center\">\n                    <div class=\"vx-d-block\">\n                      <div\n                        class=\"level-name vx-fs-9 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-lh-3\"\n                        [appTooltip]=\"approvalWorkflow?.alias_name\"\n                        placement=\"bottom-left\"\n                        delay=\"0\"\n                        type=\"black\"\n                        [tooltipMandatory]=\"false\"\n                      >\n                        {{ approvalWorkflow?.alias_name }}\n                      </div>\n                      <div\n                        class=\"vx-fs-9 vx-fw-500 vx-label-txt vx-tt-uppercase vx-lh-3\"\n                      >\n                        <!-- {{ approvalWorkflow?.type }} -->\n                        {{\n                          (approvalWorkflow?.type | lowercase) === \"roundrobin\"\n                            ? \"ROUND-ROBIN\"\n                            : (approvalWorkflow?.type | lowercase) === \"anyone\"\n                            ? \"ANY ONE\"\n                            : approvalWorkflow?.type\n                        }}\n                      </div>\n                    </div>\n                  </div>\n                  <div\n                    class=\"chipContainer vx-d-flex vx-align-center vx-pl-1 vx-pr-2 vx-ml-2\"\n                  >\n                    <i\n                      (click)=\"deselectUser(approvalWorkflow?.approvers[0], i)\"\n                      class=\"icons cross vx-fs-12 vx-paragraph-txt vx-mr-1\"\n                      >&#xe9ae;</i\n                    >\n                    <div\n                      *ngIf=\"\n                        approvalWorkflow?.type?.toLowerCase() ===\n                          'sequential' &&\n                        approvalWorkflow?.approvers?.length < 2\n                      \"\n                      class=\"workflowLavel vx-fs-11 vx-fw-500 vx-pl-1 vx-pr-1 vx-lh-4 vx-mr-1 vx-text-center\"\n                    >\n                      {{\n                        1 == approvalWorkflow?.approvers?.length ? \"Final\" : 1\n                      }}\n                    </div>\n                    <div\n                      *ngIf=\"\n                        approvalWorkflow?.approvers?.length > 1 &&\n                        approvalWorkflow?.type?.toLowerCase() === 'sequential'\n                      \"\n                      class=\"workflowLavel vx-fs-11 vx-fw-500 vx-pl-1 vx-pr-1 vx-lh-4 vx-mr-1 vx-text-center\"\n                    >\n                      1\n                    </div>\n                    <span\n                      class=\"chipName vx-fs-11 vx-label-txt\"\n                      [appTooltip]=\"approvalWorkflow?.approvers[0]?.member_name\"\n                      placement=\"bottom-left\"\n                      delay=\"0\"\n                      type=\"black\"\n                      [tooltipMandatory]=\"false\"\n                      >{{ approvalWorkflow?.approvers[0]?.member_name }}</span\n                    >\n                    <button\n                      *ngIf=\"approvalWorkflow?.approvers?.length > 1\"\n                      class=\"countBtn vx-fs-9 vx-fw-500 vx-txt-white vx-d-flex vx-align-center vx-justify-center vx-lh-4\"\n                      appPopover\n                      (click)=\"workflowPopover.popover()\"\n                      placement=\"right\"\n                    >\n                      + {{ approvalWorkflow?.approvers?.length - 1 }}\n                    </button>\n                  </div>\n                  <app-popover #workflowPopover [dontCloseonClick]=\"true\">\n                    <div class=\"wf-action-list\">\n                      <ul class=\"action-item\">\n                        <li\n                          *ngFor=\"\n                            let approver of approvalWorkflow?.approvers\n                              | slice : 1;\n                            let j = index\n                          \"\n                        >\n                          <div class=\"avatar-card\">\n                            <span\n                              class=\"value\"\n                              [appTooltip]=\"approver?.member_name\"\n                              placement=\"bottom-left\"\n                              delay=\"0\"\n                              type=\"black\"\n                              [tooltipMandatory]=\"false\"\n                            >\n                              <i\n                                (click)=\"deselectUser(approver, i)\"\n                                class=\"icons\"\n                                >&#xe90d;</i\n                              >\n                              <span\n                                *ngIf=\"\n                                  approvalWorkflow?.type?.toLowerCase() ===\n                                  'sequential'\n                                \"\n                                class=\"workflowLavel vx-fs-11 vx-fw-500 vx-pl-1 vx-pr-1 vx-lh-4 vx-mr-1 vx-text-center\"\n                                >{{\n                                  j + 1 ===\n                                  approvalWorkflow?.approvers?.length - 1\n                                    ? \"Final\"\n                                    : j + 2\n                                }}</span\n                              >\n                              {{ approver?.member_name }}\n                            </span>\n                          </div>\n                        </li>\n                      </ul>\n                    </div>\n                  </app-popover>\n                </div>\n\n                <div class=\"vx-d-flex vx-align-center\">\n                  <button\n                    (click)=\"editApproval(approvalWorkflow, i)\"\n                    class=\"editBtn vx-fs-11 vx-fw-600 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center\"\n                  >\n                    <i class=\"icons vx-mr-1\">&#xe90c;</i> EDIT\n                  </button>\n                  <button\n                    (click)=\"deleteLevel(i)\"\n                    class=\"deleteBtn vx-fs-11 vx-fw-600 vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-4 vx-d-flex vx-align-center\"\n                  >\n                    <i class=\"icons vx-mr-1\">&#xe9ae;</i> DELETE\n                  </button>\n                </div>\n              </div>\n            </ng-container>\n\n            <button\n              *ngIf=\"approvalWorkflows?.length > 0\"\n              (click)=\"addLevelsClicked(true)\"\n              class=\"addMoreBtn vx-fs-11 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-mt-1\"\n            >\n              + ADD MORE LEVELS\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <vui-floating-bar\n      *ngIf=\"enableApprovalCreate || enableCreateForm\"\n      [nextDisabled]=\"\n        workflowName?.trim() === '' ||\n        approvalWorkflows?.length === 0 ||\n        filteredCategory?.length === 0 ||\n        isSaving\n      \"\n      (closeList)=\"closeCreateForm()\"\n      (closeEvent)=\"nextClick()\"\n    ></vui-floating-bar>\n  </div>\n</div>\n\n<!-- [selectedItems]=\"policyForm.selectedCategories\" -->\n\n<app-select-approvers\n  *ngIf=\"enableApprovalLevel\"\n  [allApprovers]=\"allApprovers\"\n  (closeSelectApprover)=\"closeSelectApprover()\"\n  (selectedApprover)=\"selectedApprover($event)\"\n  [levels]=\"levels\"\n  [editApprovalData]=\"editApprovalData\"\n></app-select-approvers>\n\n<app-checkbox-list\n  *ngIf=\"enablePolicyCategory\"\n  [config]=\"categoryConfig\"\n  [twoColumn]=\"false\"\n  [itemsList]=\"selectedCategory\"\n  [identifierKey]=\"'_id'\"\n  [displayKey]=\"'item_name'\"\n  [tooltipKey]=\"'item_name'\"\n  [loaded]=\"false\"\n  (saveList)=\"saveCategoryList($event)\"\n  (closeList)=\"closeCategoryList()\"\n  [selectedItems]=\"filteredCategory\"\n>\n</app-checkbox-list>\n", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";@import\"https://cdn.v-comply.com/design-system/css/display/display.css\";@import\"https://cdn.v-comply.com/design-system/css/alignment/alignment.css\";@import\"https://cdn.v-comply.com/design-system/css/text/text.css\";@import\"https://cdn.v-comply.com/design-system/css/color/color.css\";@import\"https://cdn.v-comply.com/design-system/css/width/width.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-top.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-left.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-right.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-top.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-left.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-right.css\";::ng-deep .approval-workflow-dialog{position:fixed;inset:0 500px 0 0}::ng-deep .approval-workflow-dialog:before{background:#1e5dd3;content:\"\";position:absolute;top:0;left:0;right:0;width:100%;height:3px}::ng-deep .approval-workflow-dialog-head{background:#fbfbfb;height:2.75rem;border-bottom:1px solid #f1f1f1}::ng-deep .approval-workflow-dialog-head button.back-btn{background:transparent;border-radius:0;border:none}::ng-deep .approval-workflow-dialog-body{background:#fff;height:calc(100vh - 2.75rem);padding:2rem}::ng-deep .approval-workflow-dialog-body-inner{height:calc(100vh - 10.75rem);overflow:hidden;overflow-y:auto;margin-bottom:1rem;padding-right:.5rem;width:calc(100% + .5rem)}::ng-deep .approval-workflow-dialog-body-inner::-webkit-scrollbar-track{background-color:#fff;position:absolute}::ng-deep .approval-workflow-dialog-body-inner::-webkit-scrollbar{width:3px;height:3px;background-color:transparent;position:absolute}::ng-deep .approval-workflow-dialog-body-inner::-webkit-scrollbar-thumb{border-radius:3px;background-color:#dbdbdb;position:absolute}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form{width:30.75rem;max-height:calc(100vh - 10.75rem)}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row{position:relative}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-left{position:absolute;top:30px;left:0}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-left img{width:2.5rem;height:2.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-right{padding-left:3.75rem}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-right .label-heading .required{color:#eb2424;position:relative;top:-.125rem}::ng-deep .approval-workflow-dialog-body-inner .approval-workflow-form-row .form-right button.addMoreBtn{background:transparent;border-radius:0;border:none}::ng-deep .approval-workflow-dialog-body vui-floating-bar .reviewer-floating-bar{padding:0!important}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.AuthService }, { type: i2.PolicyService }]; }, propDecorators: { mode: [{
                type: Input
            }], approverDetails: [{
                type: Input
            }], approverWorkFlowList: [{
                type: Input
            }], enableCreateForm: [{
                type: Input
            }], allApprovers: [{
                type: Input
            }], selectedCategory: [{
                type: Input
            }], editWorkflowLevel: [{
                type: Input
            }], saveApprovalWorkflow: [{
                type: Output
            }], closeCreateClicked: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 