import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "./approval-workflow-list/approval-workflow-list.component";
import * as i3 from "./approval-create-form/approval-create-form.component";
export class ApprovalWorkflowComponent {
    constructor() {
        this.hideDetails = false;
        this.enableCreateForm = false;
        this.createApprovalClick = false;
        this.selectedWorkflowNext = new EventEmitter();
        this.listCancelClicked = new EventEmitter();
        this.saveApprovalWorkflow = new EventEmitter();
        this.closeCreateClicked = new EventEmitter();
        this.description = {
            mode: 'prime',
            colorPalette: true,
            link: true,
            placeholder: 'Add a description for this policy',
        };
        this.mode = 'CREATE';
    }
    ngOnInit() {
        if (this.createApprovalClick) {
            this.enableCreateForm = true;
        }
        if (this.editWorkflowLevel.editLevel) {
            this.enableCreateForm = true;
        }
    }
    showDetails() {
        this.hideDetails = !this.hideDetails;
    }
    createApprovalClicked(event) {
        this.enableCreateForm = event;
    }
    cancelClicked(event) {
        this.enableCreateForm = false;
        this.listCancelClicked.emit(event);
    }
    nextClicked(event) {
        this.selectedWorkflowNext.emit(event);
    }
    approvalWorkflowAPICalled(event) {
        this.enableCreateForm = false;
        this.saveApprovalWorkflow.emit(event);
    }
    onApprovalEdit(event) {
        this.enableCreateForm = true;
        this.mode = 'EDIT';
        this.approverDetails = event;
    }
    closeCreateFormClicked() {
        this.closeCreateClicked.emit();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ApprovalWorkflowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ApprovalWorkflowComponent, selector: "app-approval-workflow", inputs: { approverWorkFlowList: "approverWorkFlowList", allApprovers: "allApprovers", selectedCategory: "selectedCategory", editApprovalWorkflow: "editApprovalWorkflow", createApprovalClick: "createApprovalClick", editWorkflowLevel: "editWorkflowLevel" }, outputs: { selectedWorkflowNext: "selectedWorkflowNext", listCancelClicked: "listCancelClicked", saveApprovalWorkflow: "saveApprovalWorkflow", closeCreateClicked: "closeCreateClicked" }, ngImport: i0, template: "<app-approval-workflow-list\n  *ngIf=\"approverWorkFlowList.length && !enableCreateForm\"\n  [approverWorkFlowList]=\"approverWorkFlowList\"\n  (createApprovalClicked)=\"createApprovalClicked($event)\"\n  (selectedWorkflowNext)=\"nextClicked($event)\"\n  (listCancelClicked)=\"cancelClicked($event)\"\n  (onApprovalEdit)=\"onApprovalEdit($event)\"\n  [editApprovalWorkflow]=\"editApprovalWorkflow\"\n></app-approval-workflow-list>\n<app-approval-create-form\n  *ngIf=\"!approverWorkFlowList.length || enableCreateForm\"\n  [selectedCategory]=\"selectedCategory\"\n  [approverWorkFlowList]=\"approverWorkFlowList\"\n  [enableCreateForm]=\"enableCreateForm\"\n  [allApprovers]=\"allApprovers\"\n  [mode]=\"mode\"\n  [approverDetails]=\"approverDetails\"\n  (saveApprovalWorkflow)=\"approvalWorkflowAPICalled($event)\"\n  (closeCreateClicked) = closeCreateFormClicked()\n  [editWorkflowLevel]=\"editWorkflowLevel\"\n></app-approval-create-form>\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-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-inner .approval-table-head{background:#fff;position:sticky;top:0;z-index:1}::ng-deep .approval-workflow-dialog-body-inner .approval-table-head .approval-table-row{border-radius:0;border:none;margin-bottom:0}::ng-deep .approval-workflow-dialog-body-inner .approval-table-head .approval-table-row .approval-table-column{color:#161b2f;height:1.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details{border:1px solid #f1f1f1;border-radius:0 0 .25rem .25rem;padding:1rem 2rem 0;margin-bottom:.25rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item button.details-chip-count{background:#fff;border-radius:.125rem;border:1px solid #f1f1f1;min-width:1.5rem;height:1.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item{border-bottom:1px solid #f1f1f1}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item .lavel-area{width:4.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item .lavel-area .lavel-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:4rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item .lavel-chips{width:calc(100% - 4.5rem)}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row{border-radius:.25rem;border:1px solid #f1f1f1;display:flex;align-items:center;position:relative;margin-bottom:.25rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row.clickable{cursor:pointer}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row button.create-approval-btn{background:transparent;border-radius:0;border:none;position:absolute;top:.25rem;right:0}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row:hover .approval-table-column.serial app-cs-radio,::ng-deep .approval-workflow-dialog-body-inner .approval-table-row.active .approval-table-column.serial app-cs-radio{opacity:1}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row.open{border-radius:.25rem .25rem 0 0;border-bottom:none;margin-bottom:0}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column{color:#747576;height:40px;position:relative;width:100%;display:flex;align-items:center;padding:0 4px}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial{width:32px;max-width:32px;justify-content:center}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial.serial{width:32px;max-width:32px;justify-content:center}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial.serial .sr-no{width:16px;background:#f8f8f8;writing-mode:vertical-lr;color:#747576;font-size:10px;font-weight:500;display:flex;height:100%;align-items:center;justify-content:center;position:relative;transition:all .2s ease-in-out}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial.serial app-cs-radio{position:absolute;top:12px;left:8px;opacity:0;transition:all .2s ease-in-out}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.workflow{width:calc(100% - 96px);min-width:calc(100% - 96px)}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.workflow .name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:calc(100% - 3rem)}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action{width:32px;max-width:32px;justify-content:center}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action button.more-action,::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action button.arrow{background:transparent;border:none;border-radius:0;height:100%;width:100%}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action button.disabled{opacity:.5!important;pointer-events:none}::ng-deep .approval-workflow-dialog-body vui-floating-bar .reviewer-floating-bar{padding:0!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ApprovalWorkflowListComponent, selector: "app-approval-workflow-list", inputs: ["approverWorkFlowList", "editApprovalWorkflow"], outputs: ["createApprovalClicked", "listCancelClicked", "selectedWorkflowNext", "onApprovalEdit"] }, { kind: "component", type: i3.ApprovalCreateFormComponent, selector: "app-approval-create-form", inputs: ["mode", "approverDetails", "approverWorkFlowList", "enableCreateForm", "allApprovers", "selectedCategory", "editWorkflowLevel"], outputs: ["saveApprovalWorkflow", "closeCreateClicked"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ApprovalWorkflowComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-approval-workflow', template: "<app-approval-workflow-list\n  *ngIf=\"approverWorkFlowList.length && !enableCreateForm\"\n  [approverWorkFlowList]=\"approverWorkFlowList\"\n  (createApprovalClicked)=\"createApprovalClicked($event)\"\n  (selectedWorkflowNext)=\"nextClicked($event)\"\n  (listCancelClicked)=\"cancelClicked($event)\"\n  (onApprovalEdit)=\"onApprovalEdit($event)\"\n  [editApprovalWorkflow]=\"editApprovalWorkflow\"\n></app-approval-workflow-list>\n<app-approval-create-form\n  *ngIf=\"!approverWorkFlowList.length || enableCreateForm\"\n  [selectedCategory]=\"selectedCategory\"\n  [approverWorkFlowList]=\"approverWorkFlowList\"\n  [enableCreateForm]=\"enableCreateForm\"\n  [allApprovers]=\"allApprovers\"\n  [mode]=\"mode\"\n  [approverDetails]=\"approverDetails\"\n  (saveApprovalWorkflow)=\"approvalWorkflowAPICalled($event)\"\n  (closeCreateClicked) = closeCreateFormClicked()\n  [editWorkflowLevel]=\"editWorkflowLevel\"\n></app-approval-create-form>\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-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-inner .approval-table-head{background:#fff;position:sticky;top:0;z-index:1}::ng-deep .approval-workflow-dialog-body-inner .approval-table-head .approval-table-row{border-radius:0;border:none;margin-bottom:0}::ng-deep .approval-workflow-dialog-body-inner .approval-table-head .approval-table-row .approval-table-column{color:#161b2f;height:1.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details{border:1px solid #f1f1f1;border-radius:0 0 .25rem .25rem;padding:1rem 2rem 0;margin-bottom:.25rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item button.details-chip-count{background:#fff;border-radius:.125rem;border:1px solid #f1f1f1;min-width:1.5rem;height:1.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item{border-bottom:1px solid #f1f1f1}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item .lavel-area{width:4.5rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item .lavel-area .lavel-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:4rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-body .approval-table-details .details-item .approver-item .lavel-chips{width:calc(100% - 4.5rem)}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row{border-radius:.25rem;border:1px solid #f1f1f1;display:flex;align-items:center;position:relative;margin-bottom:.25rem}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row.clickable{cursor:pointer}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row button.create-approval-btn{background:transparent;border-radius:0;border:none;position:absolute;top:.25rem;right:0}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row:hover .approval-table-column.serial app-cs-radio,::ng-deep .approval-workflow-dialog-body-inner .approval-table-row.active .approval-table-column.serial app-cs-radio{opacity:1}::ng-deep .approval-workflow-dialog-body-inner .approval-table-row.open{border-radius:.25rem .25rem 0 0;border-bottom:none;margin-bottom:0}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column{color:#747576;height:40px;position:relative;width:100%;display:flex;align-items:center;padding:0 4px}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial{width:32px;max-width:32px;justify-content:center}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial.serial{width:32px;max-width:32px;justify-content:center}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial.serial .sr-no{width:16px;background:#f8f8f8;writing-mode:vertical-lr;color:#747576;font-size:10px;font-weight:500;display:flex;height:100%;align-items:center;justify-content:center;position:relative;transition:all .2s ease-in-out}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.serial.serial app-cs-radio{position:absolute;top:12px;left:8px;opacity:0;transition:all .2s ease-in-out}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.workflow{width:calc(100% - 96px);min-width:calc(100% - 96px)}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.workflow .name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:calc(100% - 3rem)}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action{width:32px;max-width:32px;justify-content:center}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action button.more-action,::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action button.arrow{background:transparent;border:none;border-radius:0;height:100%;width:100%}::ng-deep .approval-workflow-dialog-body-inner .approval-table-column.action button.disabled{opacity:.5!important;pointer-events:none}::ng-deep .approval-workflow-dialog-body vui-floating-bar .reviewer-floating-bar{padding:0!important}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { approverWorkFlowList: [{
                type: Input
            }], allApprovers: [{
                type: Input
            }], selectedCategory: [{
                type: Input
            }], editApprovalWorkflow: [{
                type: Input
            }], createApprovalClick: [{
                type: Input
            }], editWorkflowLevel: [{
                type: Input
            }], selectedWorkflowNext: [{
                type: Output
            }], listCancelClicked: [{
                type: Output
            }], saveApprovalWorkflow: [{
                type: Output
            }], closeCreateClicked: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 