import { Component, EventEmitter, Input, Output } from '@angular/core';
import { cloneDeep } from 'lodash';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../../formgroup/cs-radio/cs-radio.component";
import * as i3 from "../../../../formgroup/cs-switch/cs-switch.component";
import * as i4 from "@angular/forms";
export class SettingAnonymousComponent {
    set settingData(value) {
        this.setting = cloneDeep(value);
        this.localSetting = cloneDeep(value);
    }
    constructor() {
        this.save = new EventEmitter();
        this.cancelEvt = new EventEmitter();
        this.overRideConfirm = false;
    }
    ngOnInit() {
    }
    manipulateDefault(mode) {
        if (mode === 'INCREASE' && this.setting.defaultScore >= 0) {
            this.setting.defaultScore = this.setting.defaultScore + 1;
        }
        else if (mode === 'DECREASE' && this.setting.defaultScore > 1) {
            this.setting.defaultScore = this.setting.defaultScore - 1;
        }
    }
    manipulateNegativeScore(mode) {
        if (mode === 'INCREASE' && this.setting.negativeScore >= 0) {
            this.setting.negativeScore = this.setting.negativeScore + 1;
        }
        else if (mode === 'DECREASE' && this.setting.negativeScore >= 1) {
            this.setting.negativeScore = this.setting.negativeScore - 1;
        }
    }
    confirmOverride(evt) {
        this.overRideConfirm = !this.overRideConfirm;
    }
    saveSetting() {
        this.save.emit(this.setting);
        this.overRideConfirm = false;
    }
    cancel() {
        this.cancelEvt.emit(this.localSetting);
        this.overRideConfirm = false;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SettingAnonymousComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SettingAnonymousComponent, selector: "app-setting-anonymous", inputs: { settingData: ["setting", "settingData"] }, outputs: { save: "save", cancelEvt: "cancelEvt" }, ngImport: i0, template: "<div class=\"item-body vx-pt-3 vx-pb-3\" *ngIf=\"true\">\n    <!-- <app-cs-switch><div class=\"vx-fs-13 vx-paragraph-txt\">Enable assessment mode for this form</div></app-cs-switch> -->\n    <div class=\"mode-list vx-mt-3\">\n        <div class=\"mode-item vx-d-flex vx-align-center vx-justify-between vx-mt-2\" [class.done]=\"false\">\n            <div class=\"heading vx-fs-13 vx-fw-500 vx-label-txt vx-pl-3\">Set default scores for all questions</div>\n            <div *ngIf=\"true\" class=\"score-area vx-d-flex vx-align-center vx-pl-3 vx-pr-1\">\n                <div class=\"vx-fs-12 vx-paragraph-txt vx-mr-2\">Score</div>\n                <div class=\"input-area vx-d-flex vx-align-center\">\n                    <button (click)=\"manipulateDefault('DECREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">-</button>\n                    <input type=\"number\" [(ngModel)]=\"setting.defaultScore\">\n                    <button (click)=\"manipulateDefault('INCREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">+</button>\n                </div>\n            </div>\n            <div *ngIf=\"false\" class=\"score vx-pl-2 vx-pr-2 vx-lh-6\">\n                <span class=\"vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-mr-1\">SCORE:</span>\n                <span class=\"vx-fs-13 vx-txt-blue\">10</span>\n            </div>\n        </div>\n        <div class=\"mode-item vx-mt-2\" [class.done]=\"false\">\n            <div class=\"vx-d-flex vx-align-center vx-justify-between\">\n                <div class=\"heading vx-fs-13 vx-fw-500 vx-label-txt vx-pl-3\">Select a criterion for negative scores</div>\n                <div *ngIf=\"true\" class=\"score-area vx-d-flex vx-align-center vx-pl-3 vx-pr-1\">\n                    <div class=\"vx-fs-12 vx-paragraph-txt vx-mr-2\">Score</div>\n                    <div class=\"input-area vx-d-flex vx-align-center\">\n                        <button  (click)=\"manipulateNegativeScore('DECREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">-</button>\n                        <input type=\"number\" [(ngModel)]=\"setting.negativeScore\">\n                        <button (click)=\"manipulateNegativeScore('INCREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">+</button>\n                    </div>\n                </div>\n                <div *ngIf=\"false\" class=\"score vx-pl-2 vx-pr-2 vx-lh-6\">\n                    <span class=\"vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-mr-1\">SCORE:</span>\n                    <span class=\"vx-fs-13 vx-txt-blue\">2</span>\n                </div>\n            </div>\n            <div class=\"criteria-list vx-pt-3 vx-pl-3\">\n                <app-cs-radio [name]=\"'failedCriteriaSettings'\" [checked]=\"setting.negativeScoreCriteria === 'FAILED'\" (checkedEvent)=\"setting.negativeScoreCriteria = 'FAILED'\"><div class=\"name vx-fs-12 vx-paragraph-txt\">Failed Responses</div></app-cs-radio>\n                <app-cs-radio [name]=\"'failedCriteriaSettings'\"  [checked]=\"setting.negativeScoreCriteria === 'SKIPPED'\" (checkedEvent)=\"setting.negativeScoreCriteria = 'SKIPPED'\"><div class=\"name vx-fs-12 vx-paragraph-txt\">Skipped Questions</div></app-cs-radio>\n                <app-cs-radio [name]=\"'failedCriteriaSettings'\"  [checked]=\"setting.negativeScoreCriteria === 'FAILED_SKIPPED'\" (checkedEvent)=\"setting.negativeScoreCriteria = 'FAILED_SKIPPED'\"><div class=\"name vx-fs-12 vx-paragraph-txt\">Skipped Questions & Failed Responses</div></app-cs-radio>\n            </div>\n        </div>\n        <div  class=\"mode-item vx-d-flex vx-align-center vx-justify-between vx-mt-2 vx-pl-3 vx-pr-3\">\n            <app-cs-switch [(ngValue)]=\"setting.weightageEnabled\"><div class=\"vx-fs-13 vx-label-txt\">Enabled weightage for each question</div></app-cs-switch>\n        </div>\n        <div class=\"segment-bottom vx-d-flex vx-align-center vx-justify-end vx-p-2 vx-mt-4\" >\n            <button (click)=\"cancel()\" class=\"cancel-btn vx-fs-11 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">CANCEL</button>\n            <button (click)=\"confirmOverride()\" class=\"save-btn vx-fs-11 vx-fw-500 vx-txt-white vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-1 vx-d-flex vx-align-center vx-justify-center\" [class.disabled]=\"false\">SAVE</button>\n        </div>\n        <div class=\"confirmation-massage\" *ngIf=\"overRideConfirm\">\n            <div class=\"confirmation-massage-top vx-d-flex vx-p-3\">\n                <i class=\"icons vx-fs-16 vx-txt-white vx-mr-2\">&#xe932;</i>\n                <span class=\"text vx-fs-12 vx-txt-white\">These settings will be updated for all the questions within this form. Scores that were added previously will be replaced with the new settings.</span>\n            </div>\n            <div class=\"confirmation-massage-bottom vx-d-flex vx-align-center vx-justify-between vx-p-2\" *ngIf=\"overRideConfirm\">\n                <div class=\"text vx-fs-13 vx-txt-white\">Are you sure you would like to proceed?</div>\n                <div class=\"vx-d-flex vx-align-center\">\n                    <button (click)=\"confirmOverride('NO')\" class=\"no-btn vx-fs-11 vx-fw-500 vx-txt-white vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-1 vx-d-flex vx-align-center vx-justify-center\">NO</button>\n                    <button (click)=\"saveSetting()\" class=\"yes-btn vx-fs-11 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-1 vx-d-flex vx-align-center vx-justify-center\">YES</button>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";@import\"https://cdn.v-comply.com/design-system/css/mixin/mixin.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/color/color.css\";@import\"https://cdn.v-comply.com/design-system/css/text/text.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 .assessment-settings{background:#fff;width:31.25rem;height:100vh}::ng-deep .assessment-settings-head{background:#f8f8f8;border-bottom:1px solid #F1F1F1;height:3rem}::ng-deep .assessment-settings-head i.info{cursor:pointer}::ng-deep .assessment-settings-head button.close{background:transparent;border:none;border-radius:0}::ng-deep .assessment-settings-body{padding-left:2.25rem;padding-right:1rem;width:32.25rem;position:relative;left:-1rem;height:calc(100vh - 3.5rem);overflow-y:auto}::ng-deep .assessment-settings-body::-webkit-scrollbar-track{background-color:transparent}::ng-deep .assessment-settings-body .settings-item{border:1px solid #DBDBDB;border-radius:.25rem;position:relative;transition:all .3s ease-in-out}::ng-deep .assessment-settings-body .settings-item:hover,::ng-deep .assessment-settings-body .settings-item.active{border-color:#1e5dd3;box-shadow:0 3px 6px #1e5dd326}::ng-deep .assessment-settings-body .settings-item.done{background:#fbfbfb;border-color:#f1f1f1}::ng-deep .assessment-settings-body .settings-item.done:hover{border-color:#1e5dd3}::ng-deep .assessment-settings-body .settings-item .status{background:#fff;border-radius:50%;position:absolute;left:-2.25rem;top:.35rem;width:1.75rem;height:1.75rem;transition:all .1s ease-in-out;z-index:1}::ng-deep .assessment-settings-body .settings-item .status.done .checkIcon{position:absolute;top:-1px;width:29px;height:29px;border-radius:50%;stroke-width:4;stroke:#34aa44;stroke-miterlimit:10;box-shadow:inset 0 0 #34aa44;animation:fillCheck .4s ease-in-out .4s forwards,scale .3s ease-in-out .9s both}::ng-deep .assessment-settings-body .settings-item .status.done .checkIcon__circle{stroke-dasharray:166;stroke-dashoffset:166;stroke-width:2;stroke-miterlimit:10;stroke:#34aa44;fill:none;animation:strokeCheck .6s cubic-bezier(.65,0,.45,1) forwards}::ng-deep .assessment-settings-body .settings-item .status.done .checkIcon__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;animation:strokeCheck .3s cubic-bezier(.65,0,.45,1) .8s forwards}::ng-deep .assessment-settings-body .settings-item .status.edit .edit-loader{position:absolute;top:-.1875rem;left:-.1875rem;right:0;bottom:0;width:34px;height:34px;transform:rotate(90deg)}::ng-deep .assessment-settings-body .settings-item .status.edit .editmark{width:28px;height:28px;border-radius:50%;stroke-width:4;stroke:#1e5dd3;stroke-miterlimit:10;box-shadow:inset 0 0 #1e5dd3}::ng-deep .assessment-settings-body .settings-item .status.edit .editmark__circle{stroke-dasharray:0;stroke-dashoffset:0;stroke-width:0;stroke-miterlimit:10;stroke:#f1f1f1;fill:none;animation:strokeCheck .6s cubic-bezier(.65,0,.45,1) forwards;transform:scale(.23)}::ng-deep .assessment-settings-body .settings-item .status.edit .editmark__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;fill:#1e5dd3;transform:scale(.5)}::ng-deep .assessment-settings-body .settings-item .item-head{min-height:2.5rem;width:100%;cursor:pointer}::ng-deep .assessment-settings-body .settings-item .item-head .name I.info{position:relative;top:1px;cursor:pointer}::ng-deep .assessment-settings-body .settings-item .item-body{border-top:1px solid #F1F1F1}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list{position:relative}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage{background:#1e5dd3;border-radius:0 0 .1875rem .1875rem;position:absolute;bottom:0;left:-1rem;width:calc(100% + 2rem)}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom{border-top:1px solid #4681ef}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom button{border-radius:.125rem;width:3.5rem;height:1.875rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom button.no-btn{background:#1e5dd3;border:1px solid #FFFFFF}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom button.yes-btn{background:#fff;border:none}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item{border:1px solid #DBDBDB;border-radius:.25rem;min-height:2.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item.done{background:#fbfbfb;border-color:#f1f1f1}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item.done .criteria-list{border-color:#f1f1f1}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score-area{border-left:1px solid #DBDBDB;width:9.5rem;height:2.375rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score-area .input-area button{background:transparent;border:none;border-radius:0;height:1.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score-area .input-area input{background:#fff;border:1px solid #F1F1F1;border-radius:.25rem;color:#747576;font-size:13px;text-align:center;width:44px;height:1.5rem;outline:none}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score{background:#fff;border:1px solid #F1F1F1;border-radius:.125rem;margin:.375rem .375rem .375rem 0;min-width:4.5rem;max-width:5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .criteria-list{border-top:1px solid #DBDBDB}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .criteria-list app-cs-radio{display:block;margin-bottom:.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item app-cs-switch{width:100%}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item{position:relative;min-height:2.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input{background:#fff;border:1px solid #DBDBDB;border-radius:.25rem;color:#747576;font-size:12px;padding:0 .75rem;height:2.5rem;width:100%;outline:none;transition:all .3s ease-in-out}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input:hover,::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input:focus{border-color:#1e5dd3;box-shadow:0 3px 6px #1e5dd326}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input::placeholder{color:#747576;opacity:1}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item vcomply-editor .editor-container .editable-block{font-size:12px;padding:.5rem .75rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item vcomply-editor .editor-container .editable-block:before{color:#747576!important}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .score-label{background:#f1f1f1;border-radius:.125rem;position:relative;top:-.375rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list{background:#f8f8f8;border-radius:.125rem;height:2rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .left{width:calc(100% - 6.5rem)}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .left .name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:calc(100% - 2rem)}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .left i.info{cursor:pointer}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right{width:6.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right .score{border-radius:0 .125rem .125rem 0;height:2rem;display:flex}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right .action{height:2rem;display:none}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right .action button{background:transparent;border:none;border-radius:0}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list:hover .right .score{display:none}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list:hover .right .action{display:flex}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list button.segment-close{top:-2.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item button.segment-btn{background:#fff;border:1px solid #1e5dd3;border-radius:.25rem;height:2.5rem;width:100%}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item button.segment-close{background:#1e5dd3;border:.25rem solid #FFFFFF;border-radius:50%;width:36px;height:36px;margin:.125rem auto;position:relative;z-index:3}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .segment-popup{position:absolute;bottom:1.25rem;left:.875rem;width:25rem;z-index:2}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom{background:#fbfbfb;border-top:1px solid #F1F1F1;border-radius:0 0 .1875rem .1875rem;height:2.75rem;margin:0 0 -.75rem -1rem;width:calc(100% + 2rem)}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button{border-radius:.125rem;height:1.875rem;width:5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button.cancel-btn{background:#fff;border:1px solid #DBDBDB}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button.save-btn{background:#1e5dd3;border:none}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button.disabled{background:#f1f1f1;color:#747576;pointer-events:none}::ng-deep .assessment-settings-body .settings-item.skeleton-loader{background:#f8f8f8;border-color:#f1f1f1;height:2.5rem}::ng-deep .assessment-settings-body .settings-item.skeleton-loader .loader{background:#dbdbdb;border-radius:.5rem;height:.5rem;width:12rem}@keyframes strokeCheck{to{stroke-dashoffset:0}}@keyframes fillCheck{to{box-shadow:inset 0 0 0 2px #34aa44}}@keyframes fillEdit{to{box-shadow:inset 0 0 0 2px #1e5dd3}}.circular-loader{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;left:0;margin:auto}.loader-path{stroke-dasharray:150,200;stroke-dashoffset:-10;animation:dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}::ng-deep app-cs-switch .cs-switch{cursor:pointer}.segment-bottom{background:#fbfbfb;border-top:1px solid #F1F1F1;border-radius:0 0 .1875rem .1875rem;height:2.75rem;margin:0 0 -.75rem -1rem;width:calc(100% + 2rem)}.segment-bottom button{border-radius:.125rem;height:1.875rem;width:5rem}.segment-bottom button.cancel-btn{background:#fff;border:1px solid #DBDBDB}.segment-bottom button.save-btn{background:#1e5dd3;border:none}.segment-bottom button.disabled{background:#f1f1f1;color:#747576;pointer-events:none}.footer{margin:0 -15px;border-top:1px solid #F1F1F1;height:50px;background:#fbfbfb;display:flex;align-items:center;justify-content:flex-end;border-radius:0 0 4px 4px;padding:0 13px}.footer button{height:32px;border-radius:2px;display:flex;align-items:center;justify-content:center;width:80px;cursor:pointer;border:1px solid;font-size:11px;font-weight:500}.footer button.blue{background:#1e5dd3;color:#fff;border-color:#1e5dd3}.footer button.white{background:#fff;color:#1e5dd3;border-color:#1e5dd3}.footer.warning{background:#1e5dd3;justify-content:space-between;border-top:1px solid #4681EF}.footer.warning p{margin:0;font-size:14px;color:#fff;font-weight:500}.footer.warning .button-wrapper{display:flex}.footer.warning button{width:60px}.footer.warning button.yes{background:#fff;color:#1e5dd3;border-color:#fff}.footer.warning button.no{background:transparent;color:#fff;border-color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.CsRadioComponent, selector: "app-cs-radio", inputs: ["disabled", "readonly", "name", "checked", "value", "oneLine"], outputs: ["checkedEvent"] }, { kind: "component", type: i3.CsSwitchComponent, selector: "app-cs-switch", inputs: ["disabled", "ngValue", "value", "tooltipMessage", "position"], outputs: ["ngValueChange"] }, { kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SettingAnonymousComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-setting-anonymous', template: "<div class=\"item-body vx-pt-3 vx-pb-3\" *ngIf=\"true\">\n    <!-- <app-cs-switch><div class=\"vx-fs-13 vx-paragraph-txt\">Enable assessment mode for this form</div></app-cs-switch> -->\n    <div class=\"mode-list vx-mt-3\">\n        <div class=\"mode-item vx-d-flex vx-align-center vx-justify-between vx-mt-2\" [class.done]=\"false\">\n            <div class=\"heading vx-fs-13 vx-fw-500 vx-label-txt vx-pl-3\">Set default scores for all questions</div>\n            <div *ngIf=\"true\" class=\"score-area vx-d-flex vx-align-center vx-pl-3 vx-pr-1\">\n                <div class=\"vx-fs-12 vx-paragraph-txt vx-mr-2\">Score</div>\n                <div class=\"input-area vx-d-flex vx-align-center\">\n                    <button (click)=\"manipulateDefault('DECREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">-</button>\n                    <input type=\"number\" [(ngModel)]=\"setting.defaultScore\">\n                    <button (click)=\"manipulateDefault('INCREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">+</button>\n                </div>\n            </div>\n            <div *ngIf=\"false\" class=\"score vx-pl-2 vx-pr-2 vx-lh-6\">\n                <span class=\"vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-mr-1\">SCORE:</span>\n                <span class=\"vx-fs-13 vx-txt-blue\">10</span>\n            </div>\n        </div>\n        <div class=\"mode-item vx-mt-2\" [class.done]=\"false\">\n            <div class=\"vx-d-flex vx-align-center vx-justify-between\">\n                <div class=\"heading vx-fs-13 vx-fw-500 vx-label-txt vx-pl-3\">Select a criterion for negative scores</div>\n                <div *ngIf=\"true\" class=\"score-area vx-d-flex vx-align-center vx-pl-3 vx-pr-1\">\n                    <div class=\"vx-fs-12 vx-paragraph-txt vx-mr-2\">Score</div>\n                    <div class=\"input-area vx-d-flex vx-align-center\">\n                        <button  (click)=\"manipulateNegativeScore('DECREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">-</button>\n                        <input type=\"number\" [(ngModel)]=\"setting.negativeScore\">\n                        <button (click)=\"manipulateNegativeScore('INCREASE')\" class=\"vx-fs-14 vx-fw-500 vx-paragraph-txt vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">+</button>\n                    </div>\n                </div>\n                <div *ngIf=\"false\" class=\"score vx-pl-2 vx-pr-2 vx-lh-6\">\n                    <span class=\"vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-mr-1\">SCORE:</span>\n                    <span class=\"vx-fs-13 vx-txt-blue\">2</span>\n                </div>\n            </div>\n            <div class=\"criteria-list vx-pt-3 vx-pl-3\">\n                <app-cs-radio [name]=\"'failedCriteriaSettings'\" [checked]=\"setting.negativeScoreCriteria === 'FAILED'\" (checkedEvent)=\"setting.negativeScoreCriteria = 'FAILED'\"><div class=\"name vx-fs-12 vx-paragraph-txt\">Failed Responses</div></app-cs-radio>\n                <app-cs-radio [name]=\"'failedCriteriaSettings'\"  [checked]=\"setting.negativeScoreCriteria === 'SKIPPED'\" (checkedEvent)=\"setting.negativeScoreCriteria = 'SKIPPED'\"><div class=\"name vx-fs-12 vx-paragraph-txt\">Skipped Questions</div></app-cs-radio>\n                <app-cs-radio [name]=\"'failedCriteriaSettings'\"  [checked]=\"setting.negativeScoreCriteria === 'FAILED_SKIPPED'\" (checkedEvent)=\"setting.negativeScoreCriteria = 'FAILED_SKIPPED'\"><div class=\"name vx-fs-12 vx-paragraph-txt\">Skipped Questions & Failed Responses</div></app-cs-radio>\n            </div>\n        </div>\n        <div  class=\"mode-item vx-d-flex vx-align-center vx-justify-between vx-mt-2 vx-pl-3 vx-pr-3\">\n            <app-cs-switch [(ngValue)]=\"setting.weightageEnabled\"><div class=\"vx-fs-13 vx-label-txt\">Enabled weightage for each question</div></app-cs-switch>\n        </div>\n        <div class=\"segment-bottom vx-d-flex vx-align-center vx-justify-end vx-p-2 vx-mt-4\" >\n            <button (click)=\"cancel()\" class=\"cancel-btn vx-fs-11 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-justify-center\">CANCEL</button>\n            <button (click)=\"confirmOverride()\" class=\"save-btn vx-fs-11 vx-fw-500 vx-txt-white vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-1 vx-d-flex vx-align-center vx-justify-center\" [class.disabled]=\"false\">SAVE</button>\n        </div>\n        <div class=\"confirmation-massage\" *ngIf=\"overRideConfirm\">\n            <div class=\"confirmation-massage-top vx-d-flex vx-p-3\">\n                <i class=\"icons vx-fs-16 vx-txt-white vx-mr-2\">&#xe932;</i>\n                <span class=\"text vx-fs-12 vx-txt-white\">These settings will be updated for all the questions within this form. Scores that were added previously will be replaced with the new settings.</span>\n            </div>\n            <div class=\"confirmation-massage-bottom vx-d-flex vx-align-center vx-justify-between vx-p-2\" *ngIf=\"overRideConfirm\">\n                <div class=\"text vx-fs-13 vx-txt-white\">Are you sure you would like to proceed?</div>\n                <div class=\"vx-d-flex vx-align-center\">\n                    <button (click)=\"confirmOverride('NO')\" class=\"no-btn vx-fs-11 vx-fw-500 vx-txt-white vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-1 vx-d-flex vx-align-center vx-justify-center\">NO</button>\n                    <button (click)=\"saveSetting()\" class=\"yes-btn vx-fs-11 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0 vx-ml-1 vx-d-flex vx-align-center vx-justify-center\">YES</button>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";@import\"https://cdn.v-comply.com/design-system/css/mixin/mixin.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/color/color.css\";@import\"https://cdn.v-comply.com/design-system/css/text/text.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 .assessment-settings{background:#fff;width:31.25rem;height:100vh}::ng-deep .assessment-settings-head{background:#f8f8f8;border-bottom:1px solid #F1F1F1;height:3rem}::ng-deep .assessment-settings-head i.info{cursor:pointer}::ng-deep .assessment-settings-head button.close{background:transparent;border:none;border-radius:0}::ng-deep .assessment-settings-body{padding-left:2.25rem;padding-right:1rem;width:32.25rem;position:relative;left:-1rem;height:calc(100vh - 3.5rem);overflow-y:auto}::ng-deep .assessment-settings-body::-webkit-scrollbar-track{background-color:transparent}::ng-deep .assessment-settings-body .settings-item{border:1px solid #DBDBDB;border-radius:.25rem;position:relative;transition:all .3s ease-in-out}::ng-deep .assessment-settings-body .settings-item:hover,::ng-deep .assessment-settings-body .settings-item.active{border-color:#1e5dd3;box-shadow:0 3px 6px #1e5dd326}::ng-deep .assessment-settings-body .settings-item.done{background:#fbfbfb;border-color:#f1f1f1}::ng-deep .assessment-settings-body .settings-item.done:hover{border-color:#1e5dd3}::ng-deep .assessment-settings-body .settings-item .status{background:#fff;border-radius:50%;position:absolute;left:-2.25rem;top:.35rem;width:1.75rem;height:1.75rem;transition:all .1s ease-in-out;z-index:1}::ng-deep .assessment-settings-body .settings-item .status.done .checkIcon{position:absolute;top:-1px;width:29px;height:29px;border-radius:50%;stroke-width:4;stroke:#34aa44;stroke-miterlimit:10;box-shadow:inset 0 0 #34aa44;animation:fillCheck .4s ease-in-out .4s forwards,scale .3s ease-in-out .9s both}::ng-deep .assessment-settings-body .settings-item .status.done .checkIcon__circle{stroke-dasharray:166;stroke-dashoffset:166;stroke-width:2;stroke-miterlimit:10;stroke:#34aa44;fill:none;animation:strokeCheck .6s cubic-bezier(.65,0,.45,1) forwards}::ng-deep .assessment-settings-body .settings-item .status.done .checkIcon__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;animation:strokeCheck .3s cubic-bezier(.65,0,.45,1) .8s forwards}::ng-deep .assessment-settings-body .settings-item .status.edit .edit-loader{position:absolute;top:-.1875rem;left:-.1875rem;right:0;bottom:0;width:34px;height:34px;transform:rotate(90deg)}::ng-deep .assessment-settings-body .settings-item .status.edit .editmark{width:28px;height:28px;border-radius:50%;stroke-width:4;stroke:#1e5dd3;stroke-miterlimit:10;box-shadow:inset 0 0 #1e5dd3}::ng-deep .assessment-settings-body .settings-item .status.edit .editmark__circle{stroke-dasharray:0;stroke-dashoffset:0;stroke-width:0;stroke-miterlimit:10;stroke:#f1f1f1;fill:none;animation:strokeCheck .6s cubic-bezier(.65,0,.45,1) forwards;transform:scale(.23)}::ng-deep .assessment-settings-body .settings-item .status.edit .editmark__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;fill:#1e5dd3;transform:scale(.5)}::ng-deep .assessment-settings-body .settings-item .item-head{min-height:2.5rem;width:100%;cursor:pointer}::ng-deep .assessment-settings-body .settings-item .item-head .name I.info{position:relative;top:1px;cursor:pointer}::ng-deep .assessment-settings-body .settings-item .item-body{border-top:1px solid #F1F1F1}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list{position:relative}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage{background:#1e5dd3;border-radius:0 0 .1875rem .1875rem;position:absolute;bottom:0;left:-1rem;width:calc(100% + 2rem)}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom{border-top:1px solid #4681ef}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom button{border-radius:.125rem;width:3.5rem;height:1.875rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom button.no-btn{background:#1e5dd3;border:1px solid #FFFFFF}::ng-deep .assessment-settings-body .settings-item .item-body .mode-list .confirmation-massage-bottom button.yes-btn{background:#fff;border:none}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item{border:1px solid #DBDBDB;border-radius:.25rem;min-height:2.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item.done{background:#fbfbfb;border-color:#f1f1f1}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item.done .criteria-list{border-color:#f1f1f1}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score-area{border-left:1px solid #DBDBDB;width:9.5rem;height:2.375rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score-area .input-area button{background:transparent;border:none;border-radius:0;height:1.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score-area .input-area input{background:#fff;border:1px solid #F1F1F1;border-radius:.25rem;color:#747576;font-size:13px;text-align:center;width:44px;height:1.5rem;outline:none}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .score{background:#fff;border:1px solid #F1F1F1;border-radius:.125rem;margin:.375rem .375rem .375rem 0;min-width:4.5rem;max-width:5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .criteria-list{border-top:1px solid #DBDBDB}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item .criteria-list app-cs-radio{display:block;margin-bottom:.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .mode-item app-cs-switch{width:100%}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item{position:relative;min-height:2.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input{background:#fff;border:1px solid #DBDBDB;border-radius:.25rem;color:#747576;font-size:12px;padding:0 .75rem;height:2.5rem;width:100%;outline:none;transition:all .3s ease-in-out}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input:hover,::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input:focus{border-color:#1e5dd3;box-shadow:0 3px 6px #1e5dd326}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item input::placeholder{color:#747576;opacity:1}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item vcomply-editor .editor-container .editable-block{font-size:12px;padding:.5rem .75rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item vcomply-editor .editor-container .editable-block:before{color:#747576!important}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .score-label{background:#f1f1f1;border-radius:.125rem;position:relative;top:-.375rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list{background:#f8f8f8;border-radius:.125rem;height:2rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .left{width:calc(100% - 6.5rem)}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .left .name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:calc(100% - 2rem)}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .left i.info{cursor:pointer}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right{width:6.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right .score{border-radius:0 .125rem .125rem 0;height:2rem;display:flex}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right .action{height:2rem;display:none}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list .right .action button{background:transparent;border:none;border-radius:0}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list:hover .right .score{display:none}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list:hover .right .action{display:flex}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .associated-list button.segment-close{top:-2.5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item button.segment-btn{background:#fff;border:1px solid #1e5dd3;border-radius:.25rem;height:2.5rem;width:100%}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item button.segment-close{background:#1e5dd3;border:.25rem solid #FFFFFF;border-radius:50%;width:36px;height:36px;margin:.125rem auto;position:relative;z-index:3}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .form-item .segment-popup{position:absolute;bottom:1.25rem;left:.875rem;width:25rem;z-index:2}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom{background:#fbfbfb;border-top:1px solid #F1F1F1;border-radius:0 0 .1875rem .1875rem;height:2.75rem;margin:0 0 -.75rem -1rem;width:calc(100% + 2rem)}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button{border-radius:.125rem;height:1.875rem;width:5rem}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button.cancel-btn{background:#fff;border:1px solid #DBDBDB}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button.save-btn{background:#1e5dd3;border:none}::ng-deep .assessment-settings-body .settings-item .item-body .segment-form .segment-bottom button.disabled{background:#f1f1f1;color:#747576;pointer-events:none}::ng-deep .assessment-settings-body .settings-item.skeleton-loader{background:#f8f8f8;border-color:#f1f1f1;height:2.5rem}::ng-deep .assessment-settings-body .settings-item.skeleton-loader .loader{background:#dbdbdb;border-radius:.5rem;height:.5rem;width:12rem}@keyframes strokeCheck{to{stroke-dashoffset:0}}@keyframes fillCheck{to{box-shadow:inset 0 0 0 2px #34aa44}}@keyframes fillEdit{to{box-shadow:inset 0 0 0 2px #1e5dd3}}.circular-loader{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;left:0;margin:auto}.loader-path{stroke-dasharray:150,200;stroke-dashoffset:-10;animation:dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}::ng-deep app-cs-switch .cs-switch{cursor:pointer}.segment-bottom{background:#fbfbfb;border-top:1px solid #F1F1F1;border-radius:0 0 .1875rem .1875rem;height:2.75rem;margin:0 0 -.75rem -1rem;width:calc(100% + 2rem)}.segment-bottom button{border-radius:.125rem;height:1.875rem;width:5rem}.segment-bottom button.cancel-btn{background:#fff;border:1px solid #DBDBDB}.segment-bottom button.save-btn{background:#1e5dd3;border:none}.segment-bottom button.disabled{background:#f1f1f1;color:#747576;pointer-events:none}.footer{margin:0 -15px;border-top:1px solid #F1F1F1;height:50px;background:#fbfbfb;display:flex;align-items:center;justify-content:flex-end;border-radius:0 0 4px 4px;padding:0 13px}.footer button{height:32px;border-radius:2px;display:flex;align-items:center;justify-content:center;width:80px;cursor:pointer;border:1px solid;font-size:11px;font-weight:500}.footer button.blue{background:#1e5dd3;color:#fff;border-color:#1e5dd3}.footer button.white{background:#fff;color:#1e5dd3;border-color:#1e5dd3}.footer.warning{background:#1e5dd3;justify-content:space-between;border-top:1px solid #4681EF}.footer.warning p{margin:0;font-size:14px;color:#fff;font-weight:500}.footer.warning .button-wrapper{display:flex}.footer.warning button{width:60px}.footer.warning button.yes{background:#fff;color:#1e5dd3;border-color:#fff}.footer.warning button.no{background:transparent;color:#fff;border-color:#fff}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { settingData: [{
                type: Input,
                args: ['setting']
            }], save: [{
                type: Output
            }], cancelEvt: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 