import { Component, ElementRef, EventEmitter, HostListener, Input, Output, ViewChild, } from '@angular/core';
import moment from 'moment/moment';
import dayjs from 'dayjs';
import * as i0 from "@angular/core";
import * as i1 from "../../frequency/frequency.service";
import * as i2 from "../../../services/common.service";
import * as i3 from "@angular/forms";
import * as i4 from "@angular/common";
import * as i5 from "../../../ui-kit/popover/popover.component";
import * as i6 from "../../../ui-kit/popover/popover.directive";
import * as i7 from "ng2-date-picker";
import * as i8 from "../../../ui-kit/time-picker/time-picker/time-picker.component";
import * as i9 from "../frequency-dialog-due-date/frequency-dialog-due-date.component";
export class FrequencyDialogOneTimeComponent {
    constructor(frequencyService, commonService) {
        this.frequencyService = frequencyService;
        this.commonService = commonService;
        this.datepickerOverlay = false;
        this.showDateError = false;
        this.oneTimeFailed = 5;
        this.oneTimeWindow = 15;
        this.oneTimeStartTime = '11:00 pm';
        this.oneTimeSelected = '';
        this.dateConfig = {
            min: '',
        };
        this.todayDate = this.frequencyService.changeTimeZone(new Date()?.setDate(new Date()?.getDate() + 1));
        this.shortMonth = [];
        this.dateObjectData = this.frequencyService.changeTimeZone(new Date()?.setDate(new Date()?.getDate() + 1));
        this.minDate = moment(Date.now()).format('YYYY-MM-DD HH:mm:ss')?.split(' ')[0];
        this.oneTimeExtension = 5;
        this.oneTimeWindowOpen = 15;
        this.mode = '';
        this.frequencyDetails = new EventEmitter();
    }
    ngOnInit() {
        this.dateConfig = this.frequencyService.dateConfig;
        this.dateConfig['min'] = this.formatDate();
        this.frequencyInfo = Object.assign(this.frequencyService.frequencyInfo);
        this.shortMonth = this.frequencyService.monthArray.map((month) => month.substring(0, 3));
        this.selectedDate = moment(this.todayDate);
        if (this.frequencyData?.pattern != '' &&
            this.frequencyData?.pattern.split('~')[0] === '0') {
            this.populateFrequency();
        }
        else {
            this.getOneTimeFrequency();
        }
    }
    formatDate() {
        const newDate = new Date(this.frequencyService.changeTimeZone(new Date().setDate(new Date().getDate() + 1)));
        const day = String(newDate.getDate()).padStart(2, '0');
        const month = String(newDate.getMonth() + 1).padStart(2, '0');
        const year = newDate.getFullYear();
        const formattedDate = `${day}-${month}-${year}`;
        return formattedDate;
    }
    populateFrequency() {
        const patternInfo = this.frequencyData?.pattern.split('~');
        const timeStamp = moment(`${patternInfo[3]}-${patternInfo[2]}-${patternInfo[1]} ${this.frequencyData?.failedTime}`, 'DD-MM-YYYY HH:mm a').unix();
        this.todayDate = new Date(timeStamp * 1000);
        this.selectedDate = moment(this.todayDate);
        this.oneTimeFailed = this.frequencyData?.failed;
        this.oneTimeWindow = this.frequencyData?.window;
        this.oneTimeStartTime = this.frequencyData?.failedTime;
        this.oneTimeSelected =
            patternInfo[1] + '~' + patternInfo[2] + '~' + patternInfo[3];
        this.dateObjectData = new Date(moment(this.oneTimeSelected + ' ' + this.oneTimeStartTime, 'YYYY~MM~DD HH:mm:ss').unix() * 1000);
        this.oneTimeWindowOpen = this.frequencyData?.can_assess_before_days;
        this.oneTimeExtension = this.frequencyData?.failed_after_days;
        this.getOneTimeFrequency();
    }
    openDatePicker() {
        const newDate = dayjs(this.todayDate);
        this.datePicker?.api?.moveCalendarTo(newDate);
        this.datePicker?.api?.open();
        this.datepickerOverlay = true;
    }
    closeDatepicker() {
        this.datePicker?.api?.close();
        this.datepickerOverlay = false;
    }
    onValueChange(event) {
        if (event.type === 'completed') {
            this.oneTimeWindow = event.value;
        }
        else {
            this.oneTimeFailed = event.value;
        }
        this.closeDatepicker();
        this.getOneTimeFrequency();
    }
    onWindowOpenChange(event) {
        if (event?.type?.toLowerCase() === 'window open') {
            this.oneTimeWindowOpen = event?.value;
        }
        this.getOneTimeFrequency();
    }
    onExtensionChange(event) {
        if (event?.type?.toLowerCase() === 'extension') {
            this.oneTimeExtension = event.value;
        }
        this.getOneTimeFrequency();
    }
    onTimeChanged(event) {
        this.oneTimeStartTime = event.selectedValue;
        if (typeof this.dateObjectData == 'object') {
            this.dateObjectData = moment(this.dateObjectData)?.toDate();
        }
        let timeStamp = moment(this.dateObjectData.getDate() +
            '-' +
            (this.dateObjectData.getMonth() + 1) +
            '-' +
            this.dateObjectData.getFullYear() +
            ' ' +
            this.oneTimeStartTime, 'DD-MM-YYYY hh:mm a').unix();
        this.oneTimeSelected = moment(timeStamp * 1000)
            .format('YYYY~MM~DDTHH:mm:ssZ')
            .split('T')[0];
        this.getOneTimeFrequency();
    }
    dateChange(event) {
        this.selectedDate = event?.date?.$d;
        const newDate = moment(this.selectedDate).unix();
        this.dateObjectData = new Date(newDate * 1000);
        this.todayDate = this.dateObjectData;
        let timeStamp = moment(this.dateObjectData.getDate() +
            '-' +
            (this.dateObjectData.getMonth() + 1) +
            '-' +
            this.dateObjectData.getFullYear() +
            ' ' +
            this.oneTimeStartTime, 'DD-MM-YYYY hh:mm a').unix();
        const momentDate = moment(event?.date?.$d);
        this.oneTimeSelected = momentDate
            .format('YYYY~MM~DDTHH:mm:ssZ')
            .split('T')[0];
        this.getOneTimeFrequency();
    }
    getOneTimeFrequency() {
        if (this.oneTimeSelected !== '') {
            this.todayDate = moment(this.todayDate)?.toDate();
        }
        this.selectedDate = moment(this.todayDate);
        this.frequencyInfo.placeholder =
            'One Time ' +
                this.todayDate.getDate() +
                ' ' +
                this.shortMonth[this.todayDate.getMonth()] +
                ' ' +
                this.todayDate.getFullYear() +
                ' by ' +
                this.oneTimeStartTime;
        this.frequencyInfo.pattern =
            0 +
                '~' +
                (this.oneTimeSelected === ''
                    ? this.frequencyService
                        .changeTimeZone(new Date()?.setDate(new Date()?.getDate() + 1))
                        ?.getFullYear() +
                        '~' +
                        (this.frequencyService
                            .changeTimeZone(new Date()?.setDate(new Date()?.getDate() + 1))
                            ?.getMonth() +
                            1) +
                        '~' +
                        this.frequencyService
                            .changeTimeZone(new Date()?.setDate(new Date()?.getDate() + 1))
                            ?.getDate()
                    : this.oneTimeSelected);
        this.frequencyInfo.case = 'oneTime';
        this.frequencyInfo.failedAfter = this.oneTimeFailed;
        this.frequencyInfo.window = this.oneTimeWindow;
        this.frequencyInfo.timeIn12hr = this.oneTimeStartTime;
        this.frequencyInfo.timeIn24Hr = this.frequencyService.timeFrom12hTo24h(this.oneTimeStartTime);
        this.frequencyInfo.failed_time_utc = 0;
        this.frequencyInfo.reportId = 0;
        this.frequencyInfo.failed_after_days = this.oneTimeExtension;
        this.frequencyInfo.can_assess_before_days = this.oneTimeWindowOpen;
        this.frequencyDetails.emit(this.frequencyInfo);
    }
    documentClick(event) {
        const datePickerObject = {
            event: event,
            class: 'frequency-date',
            popup: this.datePickerPopUp,
            component: this.datePicker,
            overlay: this.datepickerOverlay,
        };
        this.commonService.handleDocumentClick(datePickerObject);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FrequencyDialogOneTimeComponent, deps: [{ token: i1.FrequencyService }, { token: i2.CommonService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FrequencyDialogOneTimeComponent, selector: "app-frequency-dialog-one-time", inputs: { frequencyData: "frequencyData", mode: "mode" }, outputs: { frequencyDetails: "frequencyDetails" }, host: { listeners: { "document:click": "documentClick($event)" } }, viewQueries: [{ propertyName: "datePicker", first: true, predicate: ["datePicker"], descendants: true }, { propertyName: "datePickerPopUp", first: true, predicate: ["datePicker"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"frequency-dialog-one-time\" *ngIf=\"true\">\n  <div class=\"vx-fs-11 vx-fw-500 vx-label-txt vx-tt-uppercase vx-mb-1\">\n    REASSESSMENT FREQUENCY:\n  </div>\n  <div\n    class=\"frequency-dialog-one-time-item vx-p-3 vx-d-flex vx-align-center vx-justify-between vx-mb-5\"\n  >\n    <div class=\"date-picker\">\n      <i class=\"icons calendar-icon vx-fs-14 vx-txt-blue\">&#xe92d;</i>\n      <!-- <input class=\"datePicker\" (click)=\"openDatePicker()\" placeholder=\"Select Date\"> -->\n      <input\n        class=\"datePicker\"\n        type=\"text\"\n        [value]=\"todayDate | date : 'dd MMM yyyy'\"\n        [placeholder]=\"todayDate | date : 'dd MMM yyyy'\"\n        (click)=\"openDatePicker()\"\n        readonly\n        id=\"frequency-date\"\n      />\n      <!-- <dp-date-picker #datePicker placeholder='Select Date' (click)=\"openDatePicker()\" (click)=\"closeDatepicker()\"></dp-date-picker> -->\n      <dp-date-picker\n        #datePicker\n        [id]=\"'start-date-' + 6\"\n        [placeholder]=\"todayDate | date : 'dd MMM yyyy'\"\n        [(ngModel)]=\"selectedDate\"\n        [config]=\"dateConfig\"\n        (onSelect)=\"\n          openDatePicker();\n          dateChange($event);\n          showDateError = false;\n          datepickerOverlay = false\n        \"\n      >\n      </dp-date-picker>\n      <div\n        class=\"overlay\"\n        (click)=\"closeDatepicker()\"\n        *ngIf=\"datepickerOverlay\"\n      ></div>\n    </div>\n    <div\n      class=\"time-picker vx-d-flex vx-align-center vx-justify-end vx-pr-3\"\n      appPopover\n      (click)=\"timePicker.popover()\"\n      placement=\"right\"\n    >\n      <input\n        type=\"text\"\n        readonly\n        [(ngModel)]=\"oneTimeStartTime\"\n        placeholder=\"Select Time\"\n      />\n      <div class=\"clock-icon vx-d-flex vx-align-center vx-justify-center\">\n        <i class=\"icons vx-fs-12 vx-paragraph-txt\">&#xe955;</i>\n      </div>\n    </div>\n    <app-popover #timePicker [dontCloseonClick]=\"true\">\n      <app-time-picker\n        [time]=\"oneTimeStartTime\"\n        (onTimeSelection)=\"\n          onTimeChanged($event); timePicker.closePopover('top')\n        \"\n      ></app-time-picker>\n    </app-popover>\n  </div>\n  <app-frequency-dialog-due-date\n    [id]=\"6\"\n    [mode]=\"mode\"\n    [pageName]=\"'one-time'\"\n    [isDeactivated]=\"false\"\n    [completedValue]=\"oneTimeWindow\"\n    [windowCloses]=\"oneTimeExtension\"\n    [assessWindowOpen]=\"oneTimeWindowOpen\"\n    (valueChange)=\"onValueChange($event)\"\n    (windowOpenChange)=\"onWindowOpenChange($event)\"\n    (extensionValueChange)=\"onExtensionChange($event)\"\n  ></app-frequency-dialog-due-date>\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 .frequency-dialog-one-time-item{border-radius:.25rem;border:1px solid #f1f1f1}::ng-deep .frequency-dialog-one-time-item .date-picker{position:relative;width:calc(100% - 6.75rem)}::ng-deep .frequency-dialog-one-time-item .date-picker .calendar-icon{position:absolute;left:.75rem;top:9px;pointer-events:none;z-index:1}::ng-deep .frequency-dialog-one-time-item .date-picker input{border-radius:.25rem;border:1px solid #dbdbdb;color:#161b2f;font-size:13px;font-weight:400;padding:0 .5rem 0 2.25rem;height:2rem;width:100%;cursor:pointer;outline:none}::ng-deep .frequency-dialog-one-time-item .date-picker input::placeholder{color:#161b2f}::ng-deep .frequency-dialog-one-time-item .time-picker{border-radius:.25rem;border:1px solid #dbdbdb;height:2rem;width:6.25rem;position:relative}::ng-deep .frequency-dialog-one-time-item .time-picker input{background:transparent;border-radius:0;border:none;color:#161b2f;font-size:13px;margin:0!important;padding:0 0 0 .75rem;position:absolute;top:0;left:0;height:100%;width:100%;cursor:pointer}::ng-deep .frequency-dialog-one-time-item .time-picker input::placeholder{color:#161b2f}::ng-deep .frequency-dialog-one-time-item .time-picker input:focus{outline:none}::ng-deep dp-date-picker{width:100%;position:fixed!important;z-index:14;top:-40px;left:0}::ng-deep dp-date-picker input{width:100%;border:none;opacity:0;pointer-events:none}::ng-deep dp-date-picker input:focus{outline:none}::ng-deep dp-date-picker .dp-popup{width:412px;box-shadow:0 0 20px #161b2f26;background-color:#fff;border-radius:4px;animation:scale-up-center .2s cubic-bezier(.39,.575,.565,1) both}::ng-deep dp-date-picker .dp-popup dp-day-calendar,::ng-deep dp-date-picker .dp-popup dp-month-calendar{width:100%;pointer-events:auto}::ng-deep dp-date-picker .dp-popup dp-day-calendar button,::ng-deep dp-date-picker .dp-popup dp-month-calendar button{background:transparent;border:none;outline:none}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-left,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-left,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-right,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-right{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border-radius:50%;font-size:14px}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn:hover,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-left:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-left:hover,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-right:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-right:hover{background-color:#f3f3f3}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn{display:none}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn:before,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn:before{content:\"\";height:10px;width:10px;border-radius:50%;background:#000;display:inline-flex}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week{display:flex;justify-content:space-around}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays .dp-calendar-weekday,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays .dp-calendar-weekday,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week .dp-calendar-weekday,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week .dp-calendar-weekday{width:52px;border-left:none;border-bottom-color:#fff;color:#747576;font-size:11px;font-weight:600;text-transform:uppercase}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button{width:40px;height:40px;border-radius:50%;display:inline-flex;justify-content:center;align-items:center}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button:hover,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button:hover{background-color:#f3f3f3}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button.dp-selected,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button.dp-selected,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button.dp-selected,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button.dp-selected{background:#1e5dd3}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button.dp-current-day,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button.dp-current-day,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button.dp-current-day,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button.dp-current-day{border:1px solid rgba(0,0,0,.38);color:#1e5dd3;background-color:#fff}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-day-calendar-container,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-day-calendar-container{padding:20px;border-radius:2px}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-nav-container,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-nav-container{display:flex;margin:0 0 20px;border:none}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-nav-container .dp-nav-header button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-nav-container .dp-nav-header button{color:#000;font-size:17px;font-weight:500;margin:0 0 0 12px;padding:0}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-nav-btns-container,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-nav-btns-container{width:80px;display:flex}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-nav-btns-container .dp-calendar-nav-container-left button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-nav-btns-container .dp-calendar-nav-container-left button,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-nav-btns-container .dp-calendar-nav-container-right button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-nav-btns-container .dp-calendar-nav-container-right button{margin:0!important}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-wrapper,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-wrapper{border:none}::ng-deep dp-date-picker .dp-open+div{position:fixed!important;inset:0!important;display:flex;justify-content:center;align-items:center;z-index:99;pointer-events:none;background:#0000004d}@keyframes slide-bottom{0%{transform:translateY(-100px)}to{transform:translateY(0)}}\n"], dependencies: [{ kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PopoverComponent, selector: "app-popover", inputs: ["dontCloseonClick"] }, { kind: "directive", type: i6.PopoverDirective, selector: "[appPopover]", inputs: ["refrence", "placement"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.DatePickerComponent, selector: "dp-date-picker", inputs: ["config", "mode", "placeholder", "disabled", "displayDate", "theme", "minDate", "maxDate", "minTime", "maxTime"], outputs: ["open", "close", "onChange", "onGoToCurrent", "onLeftNav", "onRightNav", "onSelect"] }, { kind: "component", type: i8.TimePickerComponent, selector: "app-time-picker", inputs: ["time"], outputs: ["onTimeSelection"] }, { kind: "component", type: i9.FrequencyDialogDueDateComponent, selector: "app-frequency-dialog-due-date", inputs: ["mode", "completedValue", "deactivateValue", "isDeactivated", "id", "pageName", "windowCloses", "assessWindowOpen"], outputs: ["valueChange", "windowOpenChange", "extensionValueChange"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FrequencyDialogOneTimeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-frequency-dialog-one-time', template: "<div class=\"frequency-dialog-one-time\" *ngIf=\"true\">\n  <div class=\"vx-fs-11 vx-fw-500 vx-label-txt vx-tt-uppercase vx-mb-1\">\n    REASSESSMENT FREQUENCY:\n  </div>\n  <div\n    class=\"frequency-dialog-one-time-item vx-p-3 vx-d-flex vx-align-center vx-justify-between vx-mb-5\"\n  >\n    <div class=\"date-picker\">\n      <i class=\"icons calendar-icon vx-fs-14 vx-txt-blue\">&#xe92d;</i>\n      <!-- <input class=\"datePicker\" (click)=\"openDatePicker()\" placeholder=\"Select Date\"> -->\n      <input\n        class=\"datePicker\"\n        type=\"text\"\n        [value]=\"todayDate | date : 'dd MMM yyyy'\"\n        [placeholder]=\"todayDate | date : 'dd MMM yyyy'\"\n        (click)=\"openDatePicker()\"\n        readonly\n        id=\"frequency-date\"\n      />\n      <!-- <dp-date-picker #datePicker placeholder='Select Date' (click)=\"openDatePicker()\" (click)=\"closeDatepicker()\"></dp-date-picker> -->\n      <dp-date-picker\n        #datePicker\n        [id]=\"'start-date-' + 6\"\n        [placeholder]=\"todayDate | date : 'dd MMM yyyy'\"\n        [(ngModel)]=\"selectedDate\"\n        [config]=\"dateConfig\"\n        (onSelect)=\"\n          openDatePicker();\n          dateChange($event);\n          showDateError = false;\n          datepickerOverlay = false\n        \"\n      >\n      </dp-date-picker>\n      <div\n        class=\"overlay\"\n        (click)=\"closeDatepicker()\"\n        *ngIf=\"datepickerOverlay\"\n      ></div>\n    </div>\n    <div\n      class=\"time-picker vx-d-flex vx-align-center vx-justify-end vx-pr-3\"\n      appPopover\n      (click)=\"timePicker.popover()\"\n      placement=\"right\"\n    >\n      <input\n        type=\"text\"\n        readonly\n        [(ngModel)]=\"oneTimeStartTime\"\n        placeholder=\"Select Time\"\n      />\n      <div class=\"clock-icon vx-d-flex vx-align-center vx-justify-center\">\n        <i class=\"icons vx-fs-12 vx-paragraph-txt\">&#xe955;</i>\n      </div>\n    </div>\n    <app-popover #timePicker [dontCloseonClick]=\"true\">\n      <app-time-picker\n        [time]=\"oneTimeStartTime\"\n        (onTimeSelection)=\"\n          onTimeChanged($event); timePicker.closePopover('top')\n        \"\n      ></app-time-picker>\n    </app-popover>\n  </div>\n  <app-frequency-dialog-due-date\n    [id]=\"6\"\n    [mode]=\"mode\"\n    [pageName]=\"'one-time'\"\n    [isDeactivated]=\"false\"\n    [completedValue]=\"oneTimeWindow\"\n    [windowCloses]=\"oneTimeExtension\"\n    [assessWindowOpen]=\"oneTimeWindowOpen\"\n    (valueChange)=\"onValueChange($event)\"\n    (windowOpenChange)=\"onWindowOpenChange($event)\"\n    (extensionValueChange)=\"onExtensionChange($event)\"\n  ></app-frequency-dialog-due-date>\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 .frequency-dialog-one-time-item{border-radius:.25rem;border:1px solid #f1f1f1}::ng-deep .frequency-dialog-one-time-item .date-picker{position:relative;width:calc(100% - 6.75rem)}::ng-deep .frequency-dialog-one-time-item .date-picker .calendar-icon{position:absolute;left:.75rem;top:9px;pointer-events:none;z-index:1}::ng-deep .frequency-dialog-one-time-item .date-picker input{border-radius:.25rem;border:1px solid #dbdbdb;color:#161b2f;font-size:13px;font-weight:400;padding:0 .5rem 0 2.25rem;height:2rem;width:100%;cursor:pointer;outline:none}::ng-deep .frequency-dialog-one-time-item .date-picker input::placeholder{color:#161b2f}::ng-deep .frequency-dialog-one-time-item .time-picker{border-radius:.25rem;border:1px solid #dbdbdb;height:2rem;width:6.25rem;position:relative}::ng-deep .frequency-dialog-one-time-item .time-picker input{background:transparent;border-radius:0;border:none;color:#161b2f;font-size:13px;margin:0!important;padding:0 0 0 .75rem;position:absolute;top:0;left:0;height:100%;width:100%;cursor:pointer}::ng-deep .frequency-dialog-one-time-item .time-picker input::placeholder{color:#161b2f}::ng-deep .frequency-dialog-one-time-item .time-picker input:focus{outline:none}::ng-deep dp-date-picker{width:100%;position:fixed!important;z-index:14;top:-40px;left:0}::ng-deep dp-date-picker input{width:100%;border:none;opacity:0;pointer-events:none}::ng-deep dp-date-picker input:focus{outline:none}::ng-deep dp-date-picker .dp-popup{width:412px;box-shadow:0 0 20px #161b2f26;background-color:#fff;border-radius:4px;animation:scale-up-center .2s cubic-bezier(.39,.575,.565,1) both}::ng-deep dp-date-picker .dp-popup dp-day-calendar,::ng-deep dp-date-picker .dp-popup dp-month-calendar{width:100%;pointer-events:auto}::ng-deep dp-date-picker .dp-popup dp-day-calendar button,::ng-deep dp-date-picker .dp-popup dp-month-calendar button{background:transparent;border:none;outline:none}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-left,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-left,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-right,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-right{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border-radius:50%;font-size:14px}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn:hover,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-left:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-left:hover,::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-calendar-nav-right:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-calendar-nav-right:hover{background-color:#f3f3f3}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn{display:none}::ng-deep dp-date-picker .dp-popup dp-day-calendar button.dp-current-location-btn:before,::ng-deep dp-date-picker .dp-popup dp-month-calendar button.dp-current-location-btn:before{content:\"\";height:10px;width:10px;border-radius:50%;background:#000;display:inline-flex}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week{display:flex;justify-content:space-around}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays .dp-calendar-weekday,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays .dp-calendar-weekday,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week .dp-calendar-weekday,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week .dp-calendar-weekday{width:52px;border-left:none;border-bottom-color:#fff;color:#747576;font-size:11px;font-weight:600;text-transform:uppercase}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button{width:40px;height:40px;border-radius:50%;display:inline-flex;justify-content:center;align-items:center}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button:hover,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button:hover,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button:hover{background-color:#f3f3f3}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button.dp-selected,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button.dp-selected,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button.dp-selected,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button.dp-selected{background:#1e5dd3}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-weekdays button.dp-current-day,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-weekdays button.dp-current-day,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-week button.dp-current-day,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-week button.dp-current-day{border:1px solid rgba(0,0,0,.38);color:#1e5dd3;background-color:#fff}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-day-calendar-container,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-day-calendar-container{padding:20px;border-radius:2px}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-nav-container,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-nav-container{display:flex;margin:0 0 20px;border:none}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-nav-container .dp-nav-header button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-nav-container .dp-nav-header button{color:#000;font-size:17px;font-weight:500;margin:0 0 0 12px;padding:0}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-nav-btns-container,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-nav-btns-container{width:80px;display:flex}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-nav-btns-container .dp-calendar-nav-container-left button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-nav-btns-container .dp-calendar-nav-container-left button,::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-nav-btns-container .dp-calendar-nav-container-right button,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-nav-btns-container .dp-calendar-nav-container-right button{margin:0!important}::ng-deep dp-date-picker .dp-popup dp-day-calendar .dp-calendar-wrapper,::ng-deep dp-date-picker .dp-popup dp-month-calendar .dp-calendar-wrapper{border:none}::ng-deep dp-date-picker .dp-open+div{position:fixed!important;inset:0!important;display:flex;justify-content:center;align-items:center;z-index:99;pointer-events:none;background:#0000004d}@keyframes slide-bottom{0%{transform:translateY(-100px)}to{transform:translateY(0)}}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.FrequencyService }, { type: i2.CommonService }]; }, propDecorators: { datePicker: [{
                type: ViewChild,
                args: ['datePicker']
            }], frequencyData: [{
                type: Input
            }], mode: [{
                type: Input
            }], frequencyDetails: [{
                type: Output
            }], datePickerPopUp: [{
                type: ViewChild,
                args: ['datePicker', { read: ElementRef, static: false }]
            }], documentClick: [{
                type: HostListener,
                args: ['document:click', ['$event']]
            }] } });
//# sourceMappingURL=data:application/json;base64, 