import * as i0 from '@angular/core';
import { Component, Inject, EventEmitter, Input, Output, NgModule } from '@angular/core';
import * as i2 from '@angular/material/dialog';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { CSSFrameworkEnum } from '@asoftwareworld/form-builder-pro/api';
import * as i14 from '@asoftwareworld/form-builder-pro/common';
import { Constants, Icons, AswMomentDatetimeModule, MaterialModule, AswPipeModule, ASW_DATETIME_FORMATS } from '@asoftwareworld/form-builder-pro/common';
import { AswConfirmDialog, AswConfirmDialogModule } from '@asoftwareworld/form-builder-pro/form-control/confirm-dialog';
import * as i1 from '@angular/forms';
import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
import * as i2$1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i4 from '@angular/material/core';
import * as i5 from '@angular/material/button';
import * as i6 from '@angular/material/datepicker';
import * as i7 from '@angular/material/divider';
import * as i8 from '@angular/material/input';
import * as i9 from '@angular/material/form-field';
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
import * as i10 from '@angular/material/select';
import * as i11 from '@angular/material/slide-toggle';
import * as i12 from '@angular/material/tooltip';
import * as i13 from '@asoftwareworld/form-builder-pro/core';
import { AswTranslateModule } from '@asoftwareworld/form-builder-pro/core';
import * as i8$1 from '@asoftwareworld/form-builder-pro/datetimepicker';
import { AswDatetimepickerModule } from '@asoftwareworld/form-builder-pro/datetimepicker';

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
class AswDatepickerDialog {
    formBuilder;
    dialogRef;
    data;
    constants = Constants;
    icons = Icons;
    aswDatepickerForm;
    status;
    disabled;
    isDisableWeekendDates = false;
    control;
    isMinMaxEnabled = true;
    constructor(formBuilder, dialogRef, data) {
        this.formBuilder = formBuilder;
        this.dialogRef = dialogRef;
        this.data = data;
    }
    ngOnInit() {
        this.control = this.data.control;
        this.validateFormBuilder();
        this.editProperty(this.control);
    }
    validateFormBuilder() {
        this.aswDatepickerForm = this.formBuilder.group({
            id: ['', [Validators.required]],
            customClass: [],
            tooltip: [''],
            minDate: [''],
            maxDate: [''],
            label: ['', [Validators.required, Validators.minLength(2)]],
            value: [''],
            type: ['date'],
            mode: ['auto'],
            defaultView: ['month'],
            style: ['', [Validators.required]],
            isRequired: [false],
            isDisabled: [false],
            isDisableWeekendDates: [false],
            yearSelector: [true],
            twelveHour: [false]
        });
    }
    editProperty(control) {
        if (control.type === 'time') {
            this.isMinMaxEnabled = false;
        }
        this.aswDatepickerForm.setValue({
            id: control.id,
            customClass: control.customClass ?? '',
            minDate: control.minDate ?? '',
            maxDate: control.maxDate ?? '',
            tooltip: control.tooltip,
            label: control.label,
            value: control.value ?? '',
            style: control.style,
            type: control.type,
            mode: control.mode,
            defaultView: control.defaultView,
            isRequired: control.isRequired,
            isDisabled: control.isDisabled,
            isDisableWeekendDates: control.isDisableWeekendDates,
            twelveHour: control.twelveHour,
            yearSelector: control.yearSelector
        });
    }
    onNoClick() {
        this.dialogRef.close();
    }
    onSubmit() {
        this.aswDatepickerForm.value.controlType = this.control.controlType;
        this.aswDatepickerForm.value.guid = this.control.guid;
        this.dialogRef.close(this.aswDatepickerForm.value);
    }
    onStatusChange(event) {
        this.status = event.checked ? true : false;
    }
    onChange(event) {
        this.disabled = event.checked ? true : false;
        if (event.checked === undefined) {
            this.status = event.target.checked ? true : false;
        }
    }
    onChangeWeekendDateFilter(event) {
        this.isDisableWeekendDates = event.checked ? true : false;
        if (event.checked === undefined) {
            this.status = event.target.checked ? true : false;
        }
    }
    onTypeChange(event) {
        if (event.value) {
            this.isMinMaxEnabled = event.value === 'time' ? false : true;
        }
        else {
            this.isMinMaxEnabled = event.target.value === 'time' ? false : true;
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepickerDialog, deps: [{ token: i1.FormBuilder }, { token: i2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AswDatepickerDialog, selector: "asw-datepicker-dialog", ngImport: i0, template: "<div class=\"asw-dialog-header\">\r\n    <div class=\"asw-edit-row-dialog\">\r\n        <div class=\"asw-dialog-header clearfix\">\r\n            <div class=\"asw-dialog-about\">\r\n                <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Edit' | aswTranslate}} {{control.label}}</h1>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n        <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n    </button>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<form [formGroup]=\"aswDatepickerForm\" (ngSubmit)=\"onSubmit()\">\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <div class=\"asw-row asw-px-2 asw-py-3\">\r\n            <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.UniqueId' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"id\"\r\n                                placeholder=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <mat-error *ngFor=\"let validation of constants.accountValidationMessages.id\">\r\n                                <ng-container *ngIf=\"aswDatepickerForm.get('id')?.hasError(validation.type) && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </mat-error>\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n                            <ng-container *ngIf=\"aswDatepickerForm.get('label')?.hasError(validation.type) && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Tooltip' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"customClass\"\r\n                                placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Type' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"type\" \r\n                            matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\" \r\n                            (selectionChange)=\"onTypeChange($event)\">\r\n                            <mat-option value=\"date\">Date</mat-option>\r\n                            <mat-option value=\"time\">Time</mat-option>\r\n                            <mat-option value=\"datetime\">Datetime</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Mode' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"mode\" matTooltip=\"{{'FormControl.SelectMode' | aswTranslate}}\">\r\n                            <mat-option value=\"auto\">Auto</mat-option>\r\n                            <mat-option value=\"portrait\">Portrait</mat-option>\r\n                            <mat-option value=\"landscape\">Landscape</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.DefaultView' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"defaultView\" matTooltip=\"{{'FormControl.SelectDefaultView' | aswTranslate}}\">\r\n                            <mat-option value=\"clock\">Clock</mat-option>\r\n                            <mat-option value=\"month\">Month</mat-option>\r\n                            <mat-option value=\"year\">Year</mat-option>\r\n                            <mat-option value=\"multi-year\">Multi Year</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <ng-container *ngIf=\"isMinMaxEnabled\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.MinDate' | aswTranslate}}</mat-label>\r\n                            <input matInput name=\"minDate\" placeholder=\"{{'FormControl.MinDate' | aswTranslate}}\" \r\n                                matTooltip=\"{{'FormControl.MinDate' | aswTranslate}}\"\r\n                                formControlName=\"minDate\" [matDatepicker]=\"minDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"minDate\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #minDate></mat-datepicker>\r\n                        </mat-form-field>\r\n                    </div>\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.MaxDate' | aswTranslate}}</mat-label>\r\n                            <input matInput name=\"maxDate\" placeholder=\"{{'FormControl.MaxDate' | aswTranslate}}\" \r\n                                matTooltip=\"{{'FormControl.MaxDate' | aswTranslate}}\"\r\n                                formControlName=\"maxDate\" [matDatepicker]=\"maxDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"maxDate\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #maxDate></mat-datepicker>\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>                \r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Value' | aswTranslate}}</mat-label>\r\n                        <input matInput name=\"value\" placeholder=\"{{'FormControl.Value' | aswTranslate}}\" \r\n                            matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n                            formControlName=\"value\" [matDatepicker]=\"picker\">\r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n                        <mat-datepicker #picker></mat-datepicker>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Style' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n                            <mat-option value=\"fill\">Fill</mat-option>\r\n                            <mat-option value=\"outline\">Outline</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-slide-toggle color=\"primary\"\r\n                            #isActive\r\n                            formControlName=\"isRequired\"\r\n                            (change)=\"onStatusChange($event)\">\r\n                            {{(status ? 'FormControl.Required' : 'FormControl.NotRequired') | aswTranslate}}\r\n                            \r\n                    </mat-slide-toggle>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-slide-toggle color=\"primary\"\r\n                            #isDisable\r\n                            formControlName=\"isDisabled\"\r\n                            (change)=\"onChange($event)\">\r\n                            {{(disabled ? 'FormControl.Disabled' : 'FormControl.Enabled') | aswTranslate}}\r\n                    </mat-slide-toggle>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-slide-toggle color=\"primary\"\r\n                            #isDisableWeekendDates\r\n                            formControlName=\"isDisableWeekendDates\"\r\n                            (change)=\"onChangeWeekendDateFilter($event)\">\r\n                            {{(isDisableWeekendDates ? 'FormControl.DisabledWeekend' : 'FormControl.EnabledWeekend') | aswTranslate}}\r\n                    </mat-slide-toggle>\r\n                </div>\r\n            </ng-container>\r\n            <ng-template #bootstrap>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label asw-invalid-label {{(aswDatepickerForm.get('id')?.invalid && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.UniqueId' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"id\"\r\n                                class=\"asw-input-control\"\r\n                                [class.asw-is-invalid]=\"(aswDatepickerForm.get('id')?.invalid && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched))\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <div *ngFor=\"let validation of constants.accountValidationMessages.id\" class=\"invalid-feedback\">\r\n                                <ng-container *ngIf=\"aswDatepickerForm.get('id')?.hasError(validation.type) && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label asw-invalid-label {{(aswDatepickerForm.get('label')?.invalid && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            [class.asw-is-invalid]=\"(aswDatepickerForm.get('label')?.invalid && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched))\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"aswDatepickerForm.get('label')?.hasError(validation.type) && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Tooltip' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-12\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Value' | aswTranslate}}</label>\r\n                        <input matInput name=\"value\" class=\"asw-input-control\"\r\n                            matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n                            formControlName=\"value\" [matDatepicker]=\"picker\">\r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\" class=\"asw-date-picker\"></mat-datepicker-toggle>\r\n                        <mat-datepicker #picker></mat-datepicker>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Type' | aswTranslate}}</label>\r\n                        <select formControlName=\"type\" class=\"asw-select\" matNativeControl\r\n                            matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\" \r\n                            (change)=\"onTypeChange($event)\">\r\n                            <option value=\"date\">Date</option>\r\n                            <option value=\"time\">Time</option>\r\n                            <option value=\"datetime\">Datetime</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Mode' | aswTranslate}}</label>\r\n                        <select formControlName=\"mode\" class=\"asw-select\" matNativeControl matTooltip=\"{{'FormControl.SelectMode' | aswTranslate}}\">\r\n                            <option value=\"auto\">Auto</option>\r\n                            <option value=\"portrait\">Portrait</option>\r\n                            <option value=\"landscape\">Landscape</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Type' | aswTranslate}}</label>\r\n                        <select formControlName=\"defaultView\" class=\"asw-select\" matNativeControl matTooltip=\"{{'FormControl.SelectDefaultView' | aswTranslate}}\">\r\n                            <option value=\"clock\">Clock</option>\r\n                            <option value=\"month\">Month</option>\r\n                            <option value=\"year\">Year</option>\r\n                            <option value=\"multi-year\">Multi Year</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <ng-container *ngIf=\"isMinMaxEnabled\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.MinDate' | aswTranslate}}</label>\r\n                            <input name=\"minDate\" class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.MinDate' | aswTranslate}}\"\r\n                                formControlName=\"minDate\" [matDatepicker]=\"minDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"minDate\" class=\"asw-date-picker\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #minDate></mat-datepicker>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.MaxDate' | aswTranslate}}</label>\r\n                            <input name=\"maxDate\" class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.MaxDate' | aswTranslate}}\"\r\n                                formControlName=\"maxDate\" [matDatepicker]=\"maxDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"maxDate\" class=\"asw-date-picker\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #maxDate></mat-datepicker>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>                \r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"customClass\"\r\n                                class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <div class=\"asw-form-check asw-form-switch\">\r\n                            <input class=\"asw-form-check-input\" \r\n                                type=\"checkbox\" \r\n                                #isActive\r\n                                id=\"isActive\" \r\n                                formControlName=\"isRequired\"\r\n                                (change)=\"onStatusChange($event)\">\r\n                            <label class=\"asw-form-check-label\" for=\"isActive\">\r\n                                {{(status ? 'FormControl.Required' : 'FormControl.NotRequired') | aswTranslate}}\r\n                            </label>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <div class=\"asw-form-check asw-form-switch\">\r\n                            <input class=\"asw-form-check-input\" \r\n                                type=\"checkbox\"\r\n                                id=\"isDisable\" \r\n                                #isDisable\r\n                                formControlName=\"isDisabled\"\r\n                                (change)=\"onStatusChange($event)\">\r\n                            <label class=\"asw-form-check-label\" for=\"isDisable\">\r\n                                {{'FormControl.Readonly' | aswTranslate}}\r\n                            </label>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <div class=\"asw-form-check asw-form-switch\">\r\n                            <input class=\"asw-form-check-input\" \r\n                                type=\"checkbox\"\r\n                                id=\"isDisableWeekendDates\" \r\n                                #isDisableWeekendDates\r\n                                formControlName=\"isDisableWeekendDates\"\r\n                                (change)=\"onChangeWeekendDateFilter($event)\">\r\n                            <label class=\"asw-form-check-label\" for=\"isDisableWeekendDates\">\r\n                                {{(isDisableWeekendDates ? 'FormControl.DisabledWeekend' : 'FormControl.EnabledWeekend') | aswTranslate}}\r\n                            </label>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </ng-template>\r\n        </div>\r\n    </mat-dialog-content>\r\n    <mat-divider></mat-divider>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button type=\"button\" class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\" (click)=\"onNoClick()\">\r\n            {{'FormControl.No' | aswTranslate}}\r\n        </button>\r\n        <button type=\"submit\" class=\"asw-button asw-button-primary asw-mb-1\" cdkFocusInitial>\r\n            {{'FormControl.Yes' | aswTranslate}}\r\n        </button>\r\n    </mat-dialog-actions>\r\n</form>", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.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: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i10.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i13.AswTranslatePipe, name: "aswTranslate" }, { kind: "pipe", type: i14.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepickerDialog, decorators: [{
            type: Component,
            args: [{ selector: 'asw-datepicker-dialog', template: "<div class=\"asw-dialog-header\">\r\n    <div class=\"asw-edit-row-dialog\">\r\n        <div class=\"asw-dialog-header clearfix\">\r\n            <div class=\"asw-dialog-about\">\r\n                <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Edit' | aswTranslate}} {{control.label}}</h1>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n        <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n    </button>\r\n</div>\r\n<mat-divider></mat-divider>\r\n<form [formGroup]=\"aswDatepickerForm\" (ngSubmit)=\"onSubmit()\">\r\n    <mat-dialog-content class=\"mat-typography\">\r\n        <div class=\"asw-row asw-px-2 asw-py-3\">\r\n            <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.UniqueId' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"id\"\r\n                                placeholder=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <mat-error *ngFor=\"let validation of constants.accountValidationMessages.id\">\r\n                                <ng-container *ngIf=\"aswDatepickerForm.get('id')?.hasError(validation.type) && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </mat-error>\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n                            <ng-container *ngIf=\"aswDatepickerForm.get('label')?.hasError(validation.type) && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Tooltip' | aswTranslate}}</mat-label>\r\n                        <input matInput type=\"text\"\r\n                            placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </mat-form-field>\r\n                </div>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n                            <input matInput type=\"text\"\r\n                                name=\"customClass\"\r\n                                placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Type' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"type\" \r\n                            matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\" \r\n                            (selectionChange)=\"onTypeChange($event)\">\r\n                            <mat-option value=\"date\">Date</mat-option>\r\n                            <mat-option value=\"time\">Time</mat-option>\r\n                            <mat-option value=\"datetime\">Datetime</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Mode' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"mode\" matTooltip=\"{{'FormControl.SelectMode' | aswTranslate}}\">\r\n                            <mat-option value=\"auto\">Auto</mat-option>\r\n                            <mat-option value=\"portrait\">Portrait</mat-option>\r\n                            <mat-option value=\"landscape\">Landscape</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.DefaultView' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"defaultView\" matTooltip=\"{{'FormControl.SelectDefaultView' | aswTranslate}}\">\r\n                            <mat-option value=\"clock\">Clock</mat-option>\r\n                            <mat-option value=\"month\">Month</mat-option>\r\n                            <mat-option value=\"year\">Year</mat-option>\r\n                            <mat-option value=\"multi-year\">Multi Year</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <ng-container *ngIf=\"isMinMaxEnabled\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.MinDate' | aswTranslate}}</mat-label>\r\n                            <input matInput name=\"minDate\" placeholder=\"{{'FormControl.MinDate' | aswTranslate}}\" \r\n                                matTooltip=\"{{'FormControl.MinDate' | aswTranslate}}\"\r\n                                formControlName=\"minDate\" [matDatepicker]=\"minDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"minDate\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #minDate></mat-datepicker>\r\n                        </mat-form-field>\r\n                    </div>\r\n                    <div class=\"asw-col-md-6\">\r\n                        <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                            <mat-label>{{'FormControl.MaxDate' | aswTranslate}}</mat-label>\r\n                            <input matInput name=\"maxDate\" placeholder=\"{{'FormControl.MaxDate' | aswTranslate}}\" \r\n                                matTooltip=\"{{'FormControl.MaxDate' | aswTranslate}}\"\r\n                                formControlName=\"maxDate\" [matDatepicker]=\"maxDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"maxDate\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #maxDate></mat-datepicker>\r\n                        </mat-form-field>\r\n                    </div>\r\n                </ng-container>                \r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Value' | aswTranslate}}</mat-label>\r\n                        <input matInput name=\"value\" placeholder=\"{{'FormControl.Value' | aswTranslate}}\" \r\n                            matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n                            formControlName=\"value\" [matDatepicker]=\"picker\">\r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n                        <mat-datepicker #picker></mat-datepicker>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n                        <mat-label>{{'FormControl.Style' | aswTranslate}}</mat-label>\r\n                        <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n                            <mat-option value=\"fill\">Fill</mat-option>\r\n                            <mat-option value=\"outline\">Outline</mat-option>\r\n                        </mat-select>\r\n                    </mat-form-field>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-slide-toggle color=\"primary\"\r\n                            #isActive\r\n                            formControlName=\"isRequired\"\r\n                            (change)=\"onStatusChange($event)\">\r\n                            {{(status ? 'FormControl.Required' : 'FormControl.NotRequired') | aswTranslate}}\r\n                            \r\n                    </mat-slide-toggle>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-slide-toggle color=\"primary\"\r\n                            #isDisable\r\n                            formControlName=\"isDisabled\"\r\n                            (change)=\"onChange($event)\">\r\n                            {{(disabled ? 'FormControl.Disabled' : 'FormControl.Enabled') | aswTranslate}}\r\n                    </mat-slide-toggle>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <mat-slide-toggle color=\"primary\"\r\n                            #isDisableWeekendDates\r\n                            formControlName=\"isDisableWeekendDates\"\r\n                            (change)=\"onChangeWeekendDateFilter($event)\">\r\n                            {{(isDisableWeekendDates ? 'FormControl.DisabledWeekend' : 'FormControl.EnabledWeekend') | aswTranslate}}\r\n                    </mat-slide-toggle>\r\n                </div>\r\n            </ng-container>\r\n            <ng-template #bootstrap>\r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label asw-invalid-label {{(aswDatepickerForm.get('id')?.invalid && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.UniqueId' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"id\"\r\n                                class=\"asw-input-control\"\r\n                                [class.asw-is-invalid]=\"(aswDatepickerForm.get('id')?.invalid && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched))\"\r\n                                matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n                                formControlName=\"id\" required>\r\n                            <div *ngFor=\"let validation of constants.accountValidationMessages.id\" class=\"invalid-feedback\">\r\n                                <ng-container *ngIf=\"aswDatepickerForm.get('id')?.hasError(validation.type) && (aswDatepickerForm.get('id')?.dirty || aswDatepickerForm.get('id')?.touched)\">\r\n                                    {{validation.message | aswTranslate}}\r\n                                </ng-container>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label asw-invalid-label {{(aswDatepickerForm.get('label')?.invalid && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            [class.asw-is-invalid]=\"(aswDatepickerForm.get('label')?.invalid && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched))\"\r\n                            matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n                            formControlName=\"label\" required>\r\n                        <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"aswDatepickerForm.get('label')?.hasError(validation.type) && (aswDatepickerForm.get('label')?.dirty || aswDatepickerForm.get('label')?.touched)\">\r\n                                {{validation.message | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-6\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Tooltip' | aswTranslate}}</label>\r\n                        <input type=\"text\"\r\n                            class=\"asw-input-control\"\r\n                            matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n                            formControlName=\"tooltip\">\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-12\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Value' | aswTranslate}}</label>\r\n                        <input matInput name=\"value\" class=\"asw-input-control\"\r\n                            matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n                            formControlName=\"value\" [matDatepicker]=\"picker\">\r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\" class=\"asw-date-picker\"></mat-datepicker-toggle>\r\n                        <mat-datepicker #picker></mat-datepicker>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Type' | aswTranslate}}</label>\r\n                        <select formControlName=\"type\" class=\"asw-select\" matNativeControl\r\n                            matTooltip=\"{{'FormControl.SelectType' | aswTranslate}}\" \r\n                            (change)=\"onTypeChange($event)\">\r\n                            <option value=\"date\">Date</option>\r\n                            <option value=\"time\">Time</option>\r\n                            <option value=\"datetime\">Datetime</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Mode' | aswTranslate}}</label>\r\n                        <select formControlName=\"mode\" class=\"asw-select\" matNativeControl matTooltip=\"{{'FormControl.SelectMode' | aswTranslate}}\">\r\n                            <option value=\"auto\">Auto</option>\r\n                            <option value=\"portrait\">Portrait</option>\r\n                            <option value=\"landscape\">Landscape</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label class=\"asw-input-label\">{{'FormControl.Type' | aswTranslate}}</label>\r\n                        <select formControlName=\"defaultView\" class=\"asw-select\" matNativeControl matTooltip=\"{{'FormControl.SelectDefaultView' | aswTranslate}}\">\r\n                            <option value=\"clock\">Clock</option>\r\n                            <option value=\"month\">Month</option>\r\n                            <option value=\"year\">Year</option>\r\n                            <option value=\"multi-year\">Multi Year</option>\r\n                        </select>\r\n                    </div>\r\n                </div>\r\n                <ng-container *ngIf=\"isMinMaxEnabled\">\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.MinDate' | aswTranslate}}</label>\r\n                            <input name=\"minDate\" class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.MinDate' | aswTranslate}}\"\r\n                                formControlName=\"minDate\" [matDatepicker]=\"minDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"minDate\" class=\"asw-date-picker\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #minDate></mat-datepicker>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"asw-col-md-6\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.MaxDate' | aswTranslate}}</label>\r\n                            <input name=\"maxDate\" class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.MaxDate' | aswTranslate}}\"\r\n                                formControlName=\"maxDate\" [matDatepicker]=\"maxDate\">\r\n                            <mat-datepicker-toggle matSuffix [for]=\"maxDate\" class=\"asw-date-picker\"></mat-datepicker-toggle>\r\n                            <mat-datepicker #maxDate></mat-datepicker>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>                \r\n                <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n                    <div class=\"asw-col-md-12\">\r\n                        <div class=\"asw-mb-3\">\r\n                            <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n                            <input type=\"text\"\r\n                                name=\"customClass\"\r\n                                class=\"asw-input-control\"\r\n                                matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n                                formControlName=\"customClass\">\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <div class=\"asw-form-check asw-form-switch\">\r\n                            <input class=\"asw-form-check-input\" \r\n                                type=\"checkbox\" \r\n                                #isActive\r\n                                id=\"isActive\" \r\n                                formControlName=\"isRequired\"\r\n                                (change)=\"onStatusChange($event)\">\r\n                            <label class=\"asw-form-check-label\" for=\"isActive\">\r\n                                {{(status ? 'FormControl.Required' : 'FormControl.NotRequired') | aswTranslate}}\r\n                            </label>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <div class=\"asw-form-check asw-form-switch\">\r\n                            <input class=\"asw-form-check-input\" \r\n                                type=\"checkbox\"\r\n                                id=\"isDisable\" \r\n                                #isDisable\r\n                                formControlName=\"isDisabled\"\r\n                                (change)=\"onStatusChange($event)\">\r\n                            <label class=\"asw-form-check-label\" for=\"isDisable\">\r\n                                {{'FormControl.Readonly' | aswTranslate}}\r\n                            </label>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"asw-col-md-4\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <div class=\"asw-form-check asw-form-switch\">\r\n                            <input class=\"asw-form-check-input\" \r\n                                type=\"checkbox\"\r\n                                id=\"isDisableWeekendDates\" \r\n                                #isDisableWeekendDates\r\n                                formControlName=\"isDisableWeekendDates\"\r\n                                (change)=\"onChangeWeekendDateFilter($event)\">\r\n                            <label class=\"asw-form-check-label\" for=\"isDisableWeekendDates\">\r\n                                {{(isDisableWeekendDates ? 'FormControl.DisabledWeekend' : 'FormControl.EnabledWeekend') | aswTranslate}}\r\n                            </label>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </ng-template>\r\n        </div>\r\n    </mat-dialog-content>\r\n    <mat-divider></mat-divider>\r\n    <mat-dialog-actions align=\"end\">\r\n        <button type=\"button\" class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\" (click)=\"onNoClick()\">\r\n            {{'FormControl.No' | aswTranslate}}\r\n        </button>\r\n        <button type=\"submit\" class=\"asw-button asw-button-primary asw-mb-1\" cdkFocusInitial>\r\n            {{'FormControl.Yes' | aswTranslate}}\r\n        </button>\r\n    </mat-dialog-actions>\r\n</form>" }]
        }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.MatDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }]; } });

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
class AswDatepicker {
    dialog;
    constants = Constants;
    icons = Icons;
    multiYearSelector = true;
    touchUi = false;
    timeInterval = 1;
    timeInput = true;
    /**
     * Datepicker control
     */
    control = null;
    CSSFramework = CSSFrameworkEnum.Material;
    isPreviewTemplate = false;
    propertyPersonalization = [];
    datepickerUpdateEvent = new EventEmitter();
    datepickerDeleteEvent = new EventEmitter();
    dateChange = new EventEmitter();
    duplicateControl = new EventEmitter();
    constructor(dialog) {
        this.dialog = dialog;
    }
    /**
     * Delete datepicker control based on control index
     * @param control datepicker control items
     */
    deleteDatepickerDialog(control) {
        const dialogRef = this.dialog.open(AswConfirmDialog, {
            width: '350px',
            data: { name: control.controlType, message: this.constants.messages.waringMessage }
        });
        dialogRef.afterClosed().subscribe((result) => {
            if (result !== undefined) {
                this.datepickerDeleteEvent.emit(control);
            }
        });
    }
    editDatepickerDialog(control) {
        const dialogRef = this.dialog.open(AswDatepickerDialog, {
            width: '60%',
            disableClose: true,
            data: { control, CSSFramework: this.CSSFramework, propertyPersonalization: this.propertyPersonalization }
        });
        dialogRef.afterClosed().subscribe((result) => {
            if (result !== undefined) {
                this.datepickerUpdateEvent.emit(result);
            }
        });
    }
    onDateChange(control) {
        this.dateChange.emit(control);
    }
    duplicateDatepickerControl(control) {
        this.duplicateControl.emit(control);
    }
    weekendsDatesFilter = (date) => {
        if (date === null) {
            return true;
        }
        const day = date.day();
        // Prevent Saturday and Sunday from being selected.
        return day !== 0 && day !== 6;
    };
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepicker, deps: [{ token: i2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AswDatepicker, selector: "asw-datepicker", inputs: { control: "control", CSSFramework: "CSSFramework", isPreviewTemplate: "isPreviewTemplate", propertyPersonalization: "propertyPersonalization" }, outputs: { datepickerUpdateEvent: "datepickerUpdateEvent", datepickerDeleteEvent: "datepickerDeleteEvent", dateChange: "dateChange", duplicateControl: "duplicateControl" }, ngImport: i0, template: "<ng-container *ngIf=\"control as control\">\r\n    <ng-container *ngIf=\"CSSFramework === 'material'; else bootstrap\">\r\n        <ng-container [ngSwitch]=\"control.controlType\">\r\n            <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                <ng-container *ngIf=\"control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <asw-datetimepicker #picker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <input matInput \r\n                            [aswDatetimepicker]=\"picker\" \r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [aswDatetimepickerFilter]=\"weekendsDatesFilter\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"picker\" matSuffix></asw-datetimepicker-toggle>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"!control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <asw-datetimepicker #datetimePicker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <input matInput \r\n                            #input=\"ngModel\"\r\n                            [aswDatetimepicker]=\"datetimePicker\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"datetimePicker\" matSuffix></asw-datetimepicker-toggle>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n            </ng-container>\r\n        </ng-container>\r\n    </ng-container>\r\n    <ng-template #bootstrap>\r\n        <ng-container [ngSwitch]=\"control.controlType\">\r\n            <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                <ng-container *ngIf=\"control.isDisableWeekendDates\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label for=\"{{control.id}}\" \r\n                        class=\"asw-input-label {{(input.invalid && (input.dirty || input.touched)) ? 'asw-red-color' : ''}}\"\r\n                        [class.asw-invalid-label]=\"control.isRequired\">{{control.label}}</label>\r\n                        <asw-datetimepicker #picker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <input \r\n                            [aswDatetimepicker]=\"picker\" \r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            class=\"asw-input-control {{control.customClass}}\"\r\n                            [class.asw-is-invalid]=\"input.invalid && (input.dirty || input.touched)\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [aswDatetimepickerFilter]=\"weekendsDatesFilter\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"picker\" matSuffix class=\"asw-date-picker\"></asw-datetimepicker-toggle>\r\n                        <div *ngIf=\"input.invalid && (input.dirty || input.touched)\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"!control.isDisableWeekendDates\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label for=\"{{control.id}}\" \r\n                        class=\"asw-input-label {{(input.invalid && (input.dirty || input.touched)) ? 'asw-red-color' : ''}}\"\r\n                        [class.asw-invalid-label]=\"control.isRequired\">{{control.label}}</label>\r\n                        <input \r\n                            [aswDatetimepicker]=\"datetimePicker\" \r\n                            #input=\"ngModel\"\r\n                            class=\"asw-input-control {{control.customClass}}\"\r\n                            [class.asw-is-invalid]=\"input.invalid && (input.dirty || input.touched)\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"datetimePicker\" matSuffix class=\"asw-date-picker\"></asw-datetimepicker-toggle>\r\n                        <asw-datetimepicker #datetimePicker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <div *ngIf=\"input.invalid && (input.dirty || input.touched)\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n            </ng-container>\r\n            <!-- <ng-container *ngSwitchCase=\"'daterange'\">\r\n                <ng-container *ngIf=\"control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <mat-date-range-input [(ngModel)]=\"control.value\"\r\n                            [rangePicker]=\"picker\"\r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [dateFilter]=\"weekendsDatesFilter\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                            <input matStartDate >\r\n                            <input matEndDate >\r\n                        </mat-date-range-input>                    \r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n                        <mat-date-range-picker #picker></mat-date-range-picker>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"!control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <input matInput \r\n                            [matDatepicker]=\"picker\" \r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n                        <mat-datepicker #picker></mat-datepicker>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n            </ng-container> -->\r\n        </ng-container>\r\n    </ng-template>\r\n    <div class=\"asw-row\" *ngIf=\"isPreviewTemplate\">\r\n        <div class=\"asw-col-md-12\" align=\"right\">\r\n            <button mat-icon-button \r\n                    type=\"button\" \r\n                    matTooltip=\"{{'FormControl.Duplicate' | aswTranslate}}\" \r\n                    [matTooltipPosition]=\"'below'\" \r\n                    (click)=\"duplicateDatepickerControl(control)\">\r\n                <div [innerHTML]=\"icons.contentCopy | aswSafeHtml\"></div>\r\n            </button>\r\n            <button mat-icon-button \r\n                    type=\"button\" \r\n                    matTooltip=\"{{'FormControl.Edit' | aswTranslate}}\" \r\n                    [matTooltipPosition]=\"'below'\" \r\n                    (click)=\"editDatepickerDialog(control)\">\r\n                <div [innerHTML]=\"icons.edit | aswSafeHtml\"></div>\r\n            </button>\r\n            <button mat-icon-button \r\n                    type=\"button\" \r\n                    matTooltip=\"{{'FormControl.Delete' | aswTranslate}}\" \r\n                    [matTooltipPosition]=\"'below'\" \r\n                    (click)=\"deleteDatepickerDialog(control)\">\r\n                <div [innerHTML]=\"icons.delete2 | aswSafeHtml\"></div>\r\n            </button>\r\n        </div>\r\n    </div>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i8$1.AswDatetimepicker, selector: "asw-datetimepicker", inputs: ["multiYearSelector", "twelvehour", "startView", "mode", "timeInterval", "preventSameDateTimeSelection", "panelClass", "opened", "color", "startAt", "type", "touchUi", "timeInput", "disabled", "xPosition", "yPosition", "restoreFocus"], outputs: ["selectedChanged", "opened", "closed", "viewChanged"], exportAs: ["aswDatetimepicker"] }, { kind: "component", type: i8$1.AswDatetimepickerToggle, selector: "asw-datetimepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["aswDatetimepickerToggle"] }, { kind: "directive", type: i8$1.AswDatetimepickerInput, selector: "input[aswDatetimepicker]", inputs: ["aswDatetimepicker", "aswDatetimepickerFilter", "value", "min", "max", "disabled"], outputs: ["dateChange", "dateInput"], exportAs: ["aswDatetimepickerInput"] }, { kind: "pipe", type: i13.AswTranslatePipe, name: "aswTranslate" }, { kind: "pipe", type: i14.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepicker, decorators: [{
            type: Component,
            args: [{ selector: 'asw-datepicker', template: "<ng-container *ngIf=\"control as control\">\r\n    <ng-container *ngIf=\"CSSFramework === 'material'; else bootstrap\">\r\n        <ng-container [ngSwitch]=\"control.controlType\">\r\n            <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                <ng-container *ngIf=\"control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <asw-datetimepicker #picker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <input matInput \r\n                            [aswDatetimepicker]=\"picker\" \r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [aswDatetimepickerFilter]=\"weekendsDatesFilter\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"picker\" matSuffix></asw-datetimepicker-toggle>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"!control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <asw-datetimepicker #datetimePicker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <input matInput \r\n                            #input=\"ngModel\"\r\n                            [aswDatetimepicker]=\"datetimePicker\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"datetimePicker\" matSuffix></asw-datetimepicker-toggle>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n            </ng-container>\r\n        </ng-container>\r\n    </ng-container>\r\n    <ng-template #bootstrap>\r\n        <ng-container [ngSwitch]=\"control.controlType\">\r\n            <ng-container *ngSwitchCase=\"'datepicker'\">\r\n                <ng-container *ngIf=\"control.isDisableWeekendDates\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label for=\"{{control.id}}\" \r\n                        class=\"asw-input-label {{(input.invalid && (input.dirty || input.touched)) ? 'asw-red-color' : ''}}\"\r\n                        [class.asw-invalid-label]=\"control.isRequired\">{{control.label}}</label>\r\n                        <asw-datetimepicker #picker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <input \r\n                            [aswDatetimepicker]=\"picker\" \r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            class=\"asw-input-control {{control.customClass}}\"\r\n                            [class.asw-is-invalid]=\"input.invalid && (input.dirty || input.touched)\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [aswDatetimepickerFilter]=\"weekendsDatesFilter\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"picker\" matSuffix class=\"asw-date-picker\"></asw-datetimepicker-toggle>\r\n                        <div *ngIf=\"input.invalid && (input.dirty || input.touched)\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"!control.isDisableWeekendDates\">\r\n                    <div class=\"asw-mb-3\">\r\n                        <label for=\"{{control.id}}\" \r\n                        class=\"asw-input-label {{(input.invalid && (input.dirty || input.touched)) ? 'asw-red-color' : ''}}\"\r\n                        [class.asw-invalid-label]=\"control.isRequired\">{{control.label}}</label>\r\n                        <input \r\n                            [aswDatetimepicker]=\"datetimePicker\" \r\n                            #input=\"ngModel\"\r\n                            class=\"asw-input-control {{control.customClass}}\"\r\n                            [class.asw-is-invalid]=\"input.invalid && (input.dirty || input.touched)\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <asw-datetimepicker-toggle [for]=\"datetimePicker\" matSuffix class=\"asw-date-picker\"></asw-datetimepicker-toggle>\r\n                        <asw-datetimepicker #datetimePicker\r\n                            [type]=\"control.type\"\r\n                            [mode]=\"control.mode\"\r\n                            [multiYearSelector]=\"multiYearSelector\"\r\n                            [startView]=\"control.defaultView\"\r\n                            [twelvehour]=\"control.twelveHour\"\r\n                            [timeInterval]=\"timeInterval\"\r\n                            [touchUi]=\"touchUi\"\r\n                            [timeInput]=\"timeInput\">\r\n                        </asw-datetimepicker>\r\n                        <div *ngIf=\"input.invalid && (input.dirty || input.touched)\" class=\"invalid-feedback\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </div>\r\n                    </div>\r\n                </ng-container>\r\n            </ng-container>\r\n            <!-- <ng-container *ngSwitchCase=\"'daterange'\">\r\n                <ng-container *ngIf=\"control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <mat-date-range-input [(ngModel)]=\"control.value\"\r\n                            [rangePicker]=\"picker\"\r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [dateFilter]=\"weekendsDatesFilter\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                            <input matStartDate >\r\n                            <input matEndDate >\r\n                        </mat-date-range-input>                    \r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n                        <mat-date-range-picker #picker></mat-date-range-picker>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n                <ng-container *ngIf=\"!control.isDisableWeekendDates\">\r\n                    <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n                        <mat-label>{{control.label}}</mat-label>\r\n                        <input matInput \r\n                            [matDatepicker]=\"picker\" \r\n                            #input=\"ngModel\"\r\n                            [id]=\"control.id\"\r\n                            [(ngModel)]=\"control.value\"\r\n                            [matTooltip]=\"control.tooltip\"\r\n                            [placeholder]=\"control.label\"\r\n                            (dateChange)=\"onDateChange(control)\"\r\n                            [min]=\"control.minDate\" \r\n                            [max]=\"control.maxDate\"\r\n                            [required]=\"control.isRequired\"\r\n                            [disabled]=\"control.isDisabled ? true : false\">\r\n                        <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n                        <mat-datepicker #picker></mat-datepicker>\r\n                        <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n                            <ng-container *ngIf=\"input?.errors?.required\">\r\n                                {{control.label}}  {{'FormControl.IsRequired' | aswTranslate}}\r\n                            </ng-container>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                </ng-container>\r\n            </ng-container> -->\r\n        </ng-container>\r\n    </ng-template>\r\n    <div class=\"asw-row\" *ngIf=\"isPreviewTemplate\">\r\n        <div class=\"asw-col-md-12\" align=\"right\">\r\n            <button mat-icon-button \r\n                    type=\"button\" \r\n                    matTooltip=\"{{'FormControl.Duplicate' | aswTranslate}}\" \r\n                    [matTooltipPosition]=\"'below'\" \r\n                    (click)=\"duplicateDatepickerControl(control)\">\r\n                <div [innerHTML]=\"icons.contentCopy | aswSafeHtml\"></div>\r\n            </button>\r\n            <button mat-icon-button \r\n                    type=\"button\" \r\n                    matTooltip=\"{{'FormControl.Edit' | aswTranslate}}\" \r\n                    [matTooltipPosition]=\"'below'\" \r\n                    (click)=\"editDatepickerDialog(control)\">\r\n                <div [innerHTML]=\"icons.edit | aswSafeHtml\"></div>\r\n            </button>\r\n            <button mat-icon-button \r\n                    type=\"button\" \r\n                    matTooltip=\"{{'FormControl.Delete' | aswTranslate}}\" \r\n                    [matTooltipPosition]=\"'below'\" \r\n                    (click)=\"deleteDatepickerDialog(control)\">\r\n                <div [innerHTML]=\"icons.delete2 | aswSafeHtml\"></div>\r\n            </button>\r\n        </div>\r\n    </div>\r\n</ng-container>" }]
        }], ctorParameters: function () { return [{ type: i2.MatDialog }]; }, propDecorators: { control: [{
                type: Input
            }], CSSFramework: [{
                type: Input
            }], isPreviewTemplate: [{
                type: Input
            }], propertyPersonalization: [{
                type: Input
            }], datepickerUpdateEvent: [{
                type: Output
            }], datepickerDeleteEvent: [{
                type: Output
            }], dateChange: [{
                type: Output
            }], duplicateControl: [{
                type: Output
            }] } });

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
class AswDatepickerModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.2", ngImport: i0, type: AswDatepickerModule, declarations: [AswDatepicker, AswDatepickerDialog], imports: [CommonModule, FormsModule, AswMomentDatetimeModule, ReactiveFormsModule, MaterialModule, AswConfirmDialogModule, AswTranslateModule, AswPipeModule, AswDatetimepickerModule], exports: [AswDatepicker, AswDatepickerDialog] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepickerModule, providers: [
            { provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'fill' } },
            {
                provide: ASW_DATETIME_FORMATS,
                useValue: {
                    parse: {
                        dateInput: 'YYYY-MM-DD',
                        monthInput: 'MMMM',
                        yearInput: 'YYYY',
                        timeInput: 'HH:mm',
                        datetimeInput: 'YYYY-MM-DD HH:mm',
                    },
                    display: {
                        dateInput: 'YYYY-MM-DD',
                        monthInput: 'MMMM',
                        yearInput: 'YYYY',
                        timeInput: 'HH:mm',
                        datetimeInput: 'YYYY-MM-DD HH:mm',
                        monthYearLabel: 'YYYY MMMM',
                        dateA11yLabel: 'LL',
                        monthYearA11yLabel: 'MMMM YYYY',
                        popupHeaderDateLabel: 'MMM DD, ddd',
                    },
                },
            },
        ], imports: [CommonModule, FormsModule, AswMomentDatetimeModule, ReactiveFormsModule, MaterialModule, AswConfirmDialogModule, AswTranslateModule, AswPipeModule, AswDatetimepickerModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AswDatepickerModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, FormsModule, AswMomentDatetimeModule, ReactiveFormsModule, MaterialModule, AswConfirmDialogModule, AswTranslateModule, AswPipeModule, AswDatetimepickerModule],
                    declarations: [AswDatepicker, AswDatepickerDialog],
                    exports: [AswDatepicker, AswDatepickerDialog],
                    providers: [
                        { provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'fill' } },
                        {
                            provide: ASW_DATETIME_FORMATS,
                            useValue: {
                                parse: {
                                    dateInput: 'YYYY-MM-DD',
                                    monthInput: 'MMMM',
                                    yearInput: 'YYYY',
                                    timeInput: 'HH:mm',
                                    datetimeInput: 'YYYY-MM-DD HH:mm',
                                },
                                display: {
                                    dateInput: 'YYYY-MM-DD',
                                    monthInput: 'MMMM',
                                    yearInput: 'YYYY',
                                    timeInput: 'HH:mm',
                                    datetimeInput: 'YYYY-MM-DD HH:mm',
                                    monthYearLabel: 'YYYY MMMM',
                                    dateA11yLabel: 'LL',
                                    monthYearA11yLabel: 'MMMM YYYY',
                                    popupHeaderDateLabel: 'MMM DD, ddd',
                                },
                            },
                        },
                    ],
                }]
        }] });

/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */

/**
 * Generated bundle index. Do not edit.
 */

export { AswDatepicker, AswDatepickerDialog, AswDatepickerModule };
//# sourceMappingURL=asoftwareworld-form-builder-pro-form-control-datepicker.mjs.map
