import { Component, EventEmitter, Input, Output } from '@angular/core';
import moment from 'moment/moment';
import * as i0 from "@angular/core";
import * as i1 from "../../frequency/frequency.service";
import * as i2 from "../../../ui-kit/snack-bar/snack-bar.service";
import * as i3 from "@angular/common";
import * as i4 from "../frequency-dialog-weekly/frequency-dialog-weekly.component";
import * as i5 from "../frequency-dialog-monthly/frequency-dialog-monthly.component";
import * as i6 from "../frequency-dialog-quarterly/frequency-dialog-quarterly.component";
import * as i7 from "../frequency-dialog-biannual/frequency-dialog-biannual.component";
import * as i8 from "../frequency-dialog-annual/frequency-dialog-annual.component";
import * as i9 from "../frequency-dialog-one-time/frequency-dialog-one-time.component";
export class FrequencyDialogContainerComponent {
    set getFrequencyDetails(frequency) {
        this.frequencyDetails['pattern'] = frequency?.frequency;
        this.frequencyDetails['window'] = frequency?.remind_before_days;
        this.frequencyDetails['failedTime'] = frequency?.frequency_time;
        this.frequencyDetails['failed_after_days'] = frequency?.failed_after_days;
        this.frequencyDetails['can_assess_before_days'] =
            frequency?.can_assess_before_days;
    }
    constructor(frequencyService, snackbar) {
        this.frequencyService = frequencyService;
        this.snackbar = snackbar;
        this.currentTab = 'WEEKLY';
        this.frequencyDetails = {
            pattern: '',
            window: 0,
            timeIn12hr: '',
            can_assess_before_days: 0,
            failed_after_days: 0,
        };
        this.isNextDisabled = false;
        this.frequencyTab = 'weekly';
        this.currentTabName = 'a weekly';
        this.frequencyList = [
            {
                name: 'Daily',
                type: 'daily',
            },
            {
                name: 'Weekly',
                type: 'weekly',
            },
            {
                name: 'Monthly',
                type: 'monthly',
            },
            {
                name: 'Quarterly',
                type: 'quarterly',
            },
            {
                name: 'Biannual',
                type: 'biannual',
            },
            {
                name: 'Annual',
                type: 'annual',
            },
            {
                name: 'One Time',
                type: 'oneTime',
            },
            {
                name: 'Random',
                type: 'random',
            },
            {
                name: 'On Completion Of',
                type: 'onCompletionOf',
            },
            {
                name: 'Ongoing',
                type: 'ongoing',
            },
        ];
        this.mode = '';
        this.selectedFrequency = new EventEmitter();
        this.closeFrequency = new EventEmitter();
    }
    ngOnInit() {
        if (this.frequencyDetails?.pattern != '') {
            this.populateFrequency();
        }
    }
    ngOnChanges() {
        this.selectedFrequencyData = Object.assign({ ...this.frequencyDetails });
        this.frequencyData = Object.assign({ ...this.frequencyDetails });
    }
    close() {
        this.closeFrequency.emit();
    }
    onFrequencySelected(event) {
        this.frequencyData = event;
        this.isNextDisabled = this.isInvalid();
    }
    populateFrequency() {
        const frequencyPattern = parseInt(this.frequencyDetails?.pattern.split('~')[0]);
        switch (frequencyPattern) {
            case 0:
                this.frequencyTab = 'oneTime';
                this.currentTabName = 'a one time';
                break;
            case 1:
                this.frequencyTab = 'daily';
                this.currentTabName = 'a daily';
                break;
            case 2:
                this.frequencyTab = 'weekly';
                this.currentTabName = 'a weekly';
                break;
            case 3:
                this.frequencyTab = 'monthly';
                this.currentTabName = 'a monthly';
                break;
            case 4:
                this.frequencyTab = 'annual';
                this.currentTabName = 'an annual ';
                break;
            case 5:
                this.frequencyTab = 'daily';
                this.currentTabName = 'a daily';
                break;
            case 6:
                this.frequencyTab = 'onCompletionOf';
                this.currentTabName = 'an on completion of';
                this.frequencyData.report_id = this.frequencyDetails.selectedReport;
                break;
            case 7:
                this.frequencyTab = 'quarterly';
                this.currentTabName = 'a quarterly';
                break;
            case 8:
                this.frequencyTab = 'random';
                this.currentTabName = 'a random';
                break;
            case 9:
                this.frequencyTab = 'biannual';
                this.currentTabName = 'a biannual';
                break;
            case 10:
                this.frequencyTab = 'ongoing';
                this.currentTabName = 'an ongoing';
                break;
        }
        this.isNextDisabled = false;
    }
    switchTab(frequency) {
        this.frequencyTab = frequency;
        if (frequency == 'oneTime') {
            this.currentTabName = 'a one time';
        }
        else {
            this.currentTabName =
                frequency.startsWith('On') || frequency.toLowerCase() === 'annual'
                    ? 'an ' + frequency
                    : 'a ' + frequency;
        }
    }
    isInvalid() {
        let isInvalid = false;
        const frequencyDetails = this.frequencyData?.pattern?.split('~');
        switch (this.frequencyTab) {
            case 'daily':
                if (this.frequencyData.continuous_failed_days < 2) {
                    this.snackbar.show('Input value should be greater than 1.', 'alert');
                    isInvalid = true;
                }
                else {
                    isInvalid = false;
                    this.isNextDisabled = false;
                }
                break;
            case 'weekly':
                if (this.frequencyData.continuous_failed_days < 2) {
                    this.snackbar.show('Input value should be greater than 1.', 'alert');
                    isInvalid = true;
                    break;
                }
                else {
                    isInvalid = false;
                    this.isNextDisabled = false;
                }
                if (frequencyDetails[1] == '' ||
                    !frequencyDetails[1] ||
                    frequencyDetails.length < 4) {
                    isInvalid = true;
                }
                else {
                    isInvalid = false;
                }
                break;
            case 'monthly':
                if (this.frequencyData.continuous_failed_days < 2) {
                    this.snackbar.show('Input value should be greater than 1.', 'alert');
                    isInvalid = true;
                    break;
                }
                else {
                    isInvalid = false;
                    this.isNextDisabled = false;
                }
                if (frequencyDetails[2] == '' ||
                    !frequencyDetails[2] ||
                    frequencyDetails.length < 4) {
                    isInvalid = true;
                }
                else {
                    isInvalid = false;
                }
                break;
            case 'biannual':
                if (frequencyDetails.length === 0 ||
                    frequencyDetails[2] === '' ||
                    frequencyDetails[2].split(',')?.length < 2) {
                    isInvalid = true;
                }
                else {
                    isInvalid = false;
                }
                break;
            case 'oneTime':
                if (frequencyDetails?.length > 0) {
                    const selectedTime = moment(`${frequencyDetails[3]}-${frequencyDetails[2]}-${frequencyDetails[1]} ${this.frequencyData.timeIn12hr}`, 'DD-MM-YYYY HH:mm a').unix();
                    if (this.frequencyService.changeTimeZone(new Date())?.getTime() / 1000 >
                        selectedTime) {
                        this.snackbar.show('Please set a future date.', 'alert');
                        isInvalid = true;
                        break;
                    }
                    else {
                        isInvalid = false;
                        this.isNextDisabled = false;
                    }
                }
                else {
                    isInvalid = true;
                }
                break;
            case 'onCompletionOf':
                if (this.frequencyData.reportId > 0) {
                    isInvalid = false;
                }
                else {
                    isInvalid = true;
                }
                break;
            case 'random':
                if (parseInt(frequencyDetails[1]) == 2 &&
                    (frequencyDetails[2] == '' ||
                        !frequencyDetails[2] ||
                        frequencyDetails.length < 4)) {
                    isInvalid = true;
                }
                else {
                    isInvalid = false;
                }
                break;
            default:
                isInvalid = false;
        }
        return isInvalid;
    }
    save() {
        let frequency_details = {
            frequency: this.frequencyData?.pattern,
            started_at: this.frequencyService?.changeTimeZone(new Date())
                ? moment(this.frequencyService?.changeTimeZone(new Date()))?.format('YYYY-MM-DD')
                : moment().format('YYYY-MM-DD'),
            frequency_time: this.frequencyData?.timeIn12hr,
            remind_before_days: this.frequencyData?.window,
            placeholder: this.frequencyData?.placeholder,
            failed_after_days: this.frequencyData?.failed_after_days,
            can_assess_before_days: this.frequencyData?.can_assess_before_days,
        };
        this.selectedFrequency.emit(frequency_details);
        this.closeFrequency.emit();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FrequencyDialogContainerComponent, deps: [{ token: i1.FrequencyService }, { token: i2.SnackBarService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FrequencyDialogContainerComponent, selector: "app-frequency-dialog-container", inputs: { mode: "mode", getFrequencyDetails: ["frequencyDetails", "getFrequencyDetails"] }, outputs: { selectedFrequency: "selectedFrequency", closeFrequency: "closeFrequency" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"risk-frequency-dialog\">\n    <div class=\"risk-frequency-dialog-head vx-p-3 vx-mb-4 vx-d-flex vx-align-center vx-justify-between\">\n        <div class=\"risk-frequency-dialog-title vx-fs-14 vx-fw-500 vx-label-txt\">Set a Reassessment Frequency</div>\n    </div>\n    <div class=\"risk-frequency-dialog-body vx-pl-4 vx-pr-4\">\n        <div class=\"risk-frequency-dialog-body-inner\">\n            <div class=\"risk-frequency-dialog-tab vx-d-flex vx-align-center\">\n                <button (click)=\"switchTab('weekly')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'weekly'\">WEEKLY</button>\n                <button (click)=\"switchTab('monthly')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'monthly'\">MONTHLY</button>\n                <button (click)=\"switchTab('quarterly')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'quarterly'\">QUARTERLY</button>\n                <button (click)=\"switchTab('biannual')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'biannual'\">BIANNUAL</button>\n                <button (click)=\"switchTab('annual')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'annual'\">ANNUAL</button>\n                <button (click)=\"switchTab('oneTime')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'oneTime'\">ONE TIME</button>\n            </div>\n\n            <div class=\"risk-frequency-dialog-container vx-pl-4 vx-pr-4\">\n                <!-- <app-frequency-dialog-weekly *ngIf=\"frequencyTab === 'WEEKLY'\"></app-frequency-dialog-weekly> -->\n                <app-frequency-dialog-weekly *ngIf=\"frequencyTab === 'weekly'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\"\n                ></app-frequency-dialog-weekly>\n                <!-- <app-frequency-dialog-monthly *ngIf=\"frequencyTab === 'MONTHLY'\"></app-frequency-dialog-monthly> -->\n                <app-frequency-dialog-monthly *ngIf=\"frequencyTab === 'monthly'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-monthly>\n                <!-- <app-frequency-dialog-quarterly *ngIf=\"frequencyTab === 'QUARTERLY'\"></app-frequency-dialog-quarterly>\n                <app-frequency-dialog-biannual *ngIf=\"frequencyTab === 'BIANNUAL'\"></app-frequency-dialog-biannual>\n                <app-frequency-dialog-annual *ngIf=\"frequencyTab === 'ANNUAL'\"></app-frequency-dialog-annual>\n                <app-frequency-dialog-one-time *ngIf=\"frequencyTab === 'ONETIME'\"></app-frequency-dialog-one-time> -->\n                <app-frequency-dialog-quarterly \n                    *ngIf=\"frequencyTab === 'quarterly'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-quarterly>\n                <app-frequency-dialog-biannual \n                    *ngIf=\"frequencyTab === 'biannual'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-biannual>\n                <app-frequency-dialog-annual \n                    *ngIf=\"frequencyTab === 'annual'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-annual>\n                <app-frequency-dialog-one-time \n                    *ngIf=\"frequencyTab === 'oneTime'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-one-time>\n            </div>\n        </div>\n    </div>\n    <div class=\"risk-frequency-dialog-footer vx-d-flex vx-align-center vx-justify-between vx-p-2 vx-pl-3 vx-pr-3\">\n        <div class=\"vx-fs-12 vx-paragraph-txt\">You have selected <span class=\"vx-fw-500 vx-label-txt\">{{currentTabName}}</span> frequency.</div>\n        <div class=\"vx-d-flex vx-align-center\">\n            <button class=\"cancel-btn vx-fs-11 vx-fw-500 vx-txt-red vx-tt-uppercase vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" (click)=\"close()\">CANCEL</button>\n            <button class=\"next-btn vx-fs-11 vx-fw-500 vx-txt-white vx-tt-uppercase vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-ml-3 vx-d-flex vx-align-center vx-lh-6\" [class.disabled]=\"isNextDisabled\" (click)=\"save()\">NEXT <i class=\"icons vx-fs-11 vx-ml-2\">&#xe91e;</i></button>\n        </div>\n    </div>\n</div>", 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 .risk-frequency-dialog{position:fixed;top:0;right:31.25rem;bottom:0;left:0;z-index:11}::ng-deep .risk-frequency-dialog:before{background:#1e5dd3;content:\"\";position:absolute;top:0;left:0;right:0;width:100%;height:3px}@media screen and (max-width: 1280px){::ng-deep .risk-frequency-dialog{right:30px}}::ng-deep .risk-frequency-dialog-head{background:#fbfbfb;border-bottom:1px solid #f1f1f1;height:2.75rem}::ng-deep .risk-frequency-dialog-body{height:calc(100vh - 9.75rem);margin:0 auto 1rem;overflow:hidden;overflow-y:auto;width:calc(100% - 2.5rem)}::ng-deep .risk-frequency-dialog-body::-webkit-scrollbar-track{background-color:transparent}::ng-deep .risk-frequency-dialog-body-inner{width:54.5rem;margin:0 auto}@media screen and (min-width: 1366px){::ng-deep .risk-frequency-dialog-body-inner{width:auto}}::ng-deep .risk-frequency-dialog-tab{border-bottom:1px solid #f1f1f1;margin-bottom:1.5rem}::ng-deep .risk-frequency-dialog-tab button.tab-btn{background:transparent;border-radius:0;border:none;border-bottom:.125rem solid transparent;margin-right:1.75rem!important}::ng-deep .risk-frequency-dialog-tab button.active.tab-btn{color:#1e5dd3;border-color:#1e5dd3}::ng-deep .risk-frequency-dialog-footer{background:#fff;border-radius:.25rem;box-shadow:0 6px 12px #4681ef26;height:3rem;margin:0 2rem}::ng-deep .risk-frequency-dialog-footer button{border-radius:.125rem;border:none}::ng-deep .risk-frequency-dialog-footer button.cancel-btn{background:transparent}::ng-deep .risk-frequency-dialog-footer button.next-btn{background:#1e5dd3}::ng-deep .risk-frequency-dialog-footer button.disabled{background:#f1f1f1!important;color:#747576!important;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.FrequencyDialogWeeklyComponent, selector: "app-frequency-dialog-weekly", inputs: ["mode", "startDate", "frequencyData"], outputs: ["frequencyDetails"] }, { kind: "component", type: i5.FrequencyDialogMonthlyComponent, selector: "app-frequency-dialog-monthly", inputs: ["mode", "startDate", "frequencyData"], outputs: ["frequencyDetails"] }, { kind: "component", type: i6.FrequencyDialogQuarterlyComponent, selector: "app-frequency-dialog-quarterly", inputs: ["mode", "startDate", "frequencyData"], outputs: ["frequencyDetails"] }, { kind: "component", type: i7.FrequencyDialogBiannualComponent, selector: "app-frequency-dialog-biannual", inputs: ["mode", "startDate", "frequencyData"], outputs: ["frequencyDetails"] }, { kind: "component", type: i8.FrequencyDialogAnnualComponent, selector: "app-frequency-dialog-annual", inputs: ["frequencyData", "mode", "startDate"], outputs: ["frequencyDetails"] }, { kind: "component", type: i9.FrequencyDialogOneTimeComponent, selector: "app-frequency-dialog-one-time", inputs: ["frequencyData", "mode"], outputs: ["frequencyDetails"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FrequencyDialogContainerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-frequency-dialog-container', template: "<div class=\"risk-frequency-dialog\">\n    <div class=\"risk-frequency-dialog-head vx-p-3 vx-mb-4 vx-d-flex vx-align-center vx-justify-between\">\n        <div class=\"risk-frequency-dialog-title vx-fs-14 vx-fw-500 vx-label-txt\">Set a Reassessment Frequency</div>\n    </div>\n    <div class=\"risk-frequency-dialog-body vx-pl-4 vx-pr-4\">\n        <div class=\"risk-frequency-dialog-body-inner\">\n            <div class=\"risk-frequency-dialog-tab vx-d-flex vx-align-center\">\n                <button (click)=\"switchTab('weekly')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'weekly'\">WEEKLY</button>\n                <button (click)=\"switchTab('monthly')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'monthly'\">MONTHLY</button>\n                <button (click)=\"switchTab('quarterly')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'quarterly'\">QUARTERLY</button>\n                <button (click)=\"switchTab('biannual')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'biannual'\">BIANNUAL</button>\n                <button (click)=\"switchTab('annual')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'annual'\">ANNUAL</button>\n                <button (click)=\"switchTab('oneTime')\" class=\"tab-btn vx-fs-11 vx-fw-500 vx-paragraph-txt vx-tt-uppercase vx-p-0 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" [class.active]=\"frequencyTab === 'oneTime'\">ONE TIME</button>\n            </div>\n\n            <div class=\"risk-frequency-dialog-container vx-pl-4 vx-pr-4\">\n                <!-- <app-frequency-dialog-weekly *ngIf=\"frequencyTab === 'WEEKLY'\"></app-frequency-dialog-weekly> -->\n                <app-frequency-dialog-weekly *ngIf=\"frequencyTab === 'weekly'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\"\n                ></app-frequency-dialog-weekly>\n                <!-- <app-frequency-dialog-monthly *ngIf=\"frequencyTab === 'MONTHLY'\"></app-frequency-dialog-monthly> -->\n                <app-frequency-dialog-monthly *ngIf=\"frequencyTab === 'monthly'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-monthly>\n                <!-- <app-frequency-dialog-quarterly *ngIf=\"frequencyTab === 'QUARTERLY'\"></app-frequency-dialog-quarterly>\n                <app-frequency-dialog-biannual *ngIf=\"frequencyTab === 'BIANNUAL'\"></app-frequency-dialog-biannual>\n                <app-frequency-dialog-annual *ngIf=\"frequencyTab === 'ANNUAL'\"></app-frequency-dialog-annual>\n                <app-frequency-dialog-one-time *ngIf=\"frequencyTab === 'ONETIME'\"></app-frequency-dialog-one-time> -->\n                <app-frequency-dialog-quarterly \n                    *ngIf=\"frequencyTab === 'quarterly'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-quarterly>\n                <app-frequency-dialog-biannual \n                    *ngIf=\"frequencyTab === 'biannual'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-biannual>\n                <app-frequency-dialog-annual \n                    *ngIf=\"frequencyTab === 'annual'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-annual>\n                <app-frequency-dialog-one-time \n                    *ngIf=\"frequencyTab === 'oneTime'\"\n                    [mode]=\"mode\"\n                    (frequencyDetails)=\"onFrequencySelected($event)\"\n                    [frequencyData]=\"frequencyDetails\">\n                </app-frequency-dialog-one-time>\n            </div>\n        </div>\n    </div>\n    <div class=\"risk-frequency-dialog-footer vx-d-flex vx-align-center vx-justify-between vx-p-2 vx-pl-3 vx-pr-3\">\n        <div class=\"vx-fs-12 vx-paragraph-txt\">You have selected <span class=\"vx-fw-500 vx-label-txt\">{{currentTabName}}</span> frequency.</div>\n        <div class=\"vx-d-flex vx-align-center\">\n            <button class=\"cancel-btn vx-fs-11 vx-fw-500 vx-txt-red vx-tt-uppercase vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-d-flex vx-align-center vx-lh-6\" (click)=\"close()\">CANCEL</button>\n            <button class=\"next-btn vx-fs-11 vx-fw-500 vx-txt-white vx-tt-uppercase vx-p-0 vx-pl-2 vx-pr-2 vx-m-0 vx-ml-3 vx-d-flex vx-align-center vx-lh-6\" [class.disabled]=\"isNextDisabled\" (click)=\"save()\">NEXT <i class=\"icons vx-fs-11 vx-ml-2\">&#xe91e;</i></button>\n        </div>\n    </div>\n</div>", 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 .risk-frequency-dialog{position:fixed;top:0;right:31.25rem;bottom:0;left:0;z-index:11}::ng-deep .risk-frequency-dialog:before{background:#1e5dd3;content:\"\";position:absolute;top:0;left:0;right:0;width:100%;height:3px}@media screen and (max-width: 1280px){::ng-deep .risk-frequency-dialog{right:30px}}::ng-deep .risk-frequency-dialog-head{background:#fbfbfb;border-bottom:1px solid #f1f1f1;height:2.75rem}::ng-deep .risk-frequency-dialog-body{height:calc(100vh - 9.75rem);margin:0 auto 1rem;overflow:hidden;overflow-y:auto;width:calc(100% - 2.5rem)}::ng-deep .risk-frequency-dialog-body::-webkit-scrollbar-track{background-color:transparent}::ng-deep .risk-frequency-dialog-body-inner{width:54.5rem;margin:0 auto}@media screen and (min-width: 1366px){::ng-deep .risk-frequency-dialog-body-inner{width:auto}}::ng-deep .risk-frequency-dialog-tab{border-bottom:1px solid #f1f1f1;margin-bottom:1.5rem}::ng-deep .risk-frequency-dialog-tab button.tab-btn{background:transparent;border-radius:0;border:none;border-bottom:.125rem solid transparent;margin-right:1.75rem!important}::ng-deep .risk-frequency-dialog-tab button.active.tab-btn{color:#1e5dd3;border-color:#1e5dd3}::ng-deep .risk-frequency-dialog-footer{background:#fff;border-radius:.25rem;box-shadow:0 6px 12px #4681ef26;height:3rem;margin:0 2rem}::ng-deep .risk-frequency-dialog-footer button{border-radius:.125rem;border:none}::ng-deep .risk-frequency-dialog-footer button.cancel-btn{background:transparent}::ng-deep .risk-frequency-dialog-footer button.next-btn{background:#1e5dd3}::ng-deep .risk-frequency-dialog-footer button.disabled{background:#f1f1f1!important;color:#747576!important;pointer-events:none}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.FrequencyService }, { type: i2.SnackBarService }]; }, propDecorators: { mode: [{
                type: Input
            }], getFrequencyDetails: [{
                type: Input,
                args: ['frequencyDetails']
            }], selectedFrequency: [{
                type: Output
            }], closeFrequency: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 