import { createDropdownOverlay, DropdownTriggerDirective } from '@agorapulse/ui-components/dropdown-base';
import * as i0 from '@angular/core';
import { input, EventEmitter, Output, Input, ViewChild, ChangeDetectionStrategy, Component, viewChild, computed, output, signal, effect } from '@angular/core';
import * as i1 from '@agorapulse/ui-symbol';
import { apArrowLeft, apArrowRight, SymbolComponent, withSymbols, apCalendar, apChevronDown } from '@agorapulse/ui-symbol';
import * as i2 from '@agorapulse/ngx-daterangepicker-material';
import { NgxDaterangepickerMd } from '@agorapulse/ngx-daterangepicker-material';
import dayjs from 'dayjs';
import 'dayjs/locale/de';
import 'dayjs/locale/en';
import 'dayjs/locale/es';
import 'dayjs/locale/fr';
import 'dayjs/locale/pt';
import localeData from 'dayjs/plugin/localeData';
import { FormFieldComponent } from '@agorapulse/ui-components/form-field';
import { InputDirective } from '@agorapulse/ui-components/input';
import { InputGroupComponent } from '@agorapulse/ui-components/input-group';

var DatepickerMode;
(function (DatepickerMode) {
    DatepickerMode["Single"] = "Single";
    DatepickerMode["Multiple"] = "Multiple";
    DatepickerMode["Range"] = "Range";
})(DatepickerMode || (DatepickerMode = {}));
var SideEnum;
(function (SideEnum) {
    SideEnum["left"] = "left";
    SideEnum["right"] = "right";
})(SideEnum || (SideEnum = {}));
const RangesConfigPreset = {
    yesterday: [dayjs().subtract(1, 'days'), dayjs().subtract(1, 'days')],
    lastWeek: [dayjs().subtract(7, 'days'), dayjs().subtract(1, 'days')],
    last30Days: [dayjs().subtract(30, 'days'), dayjs().subtract(1, 'days')],
    lastMonth: [dayjs().subtract(1, 'month').startOf('month'), dayjs().subtract(1, 'month').endOf('month')],
    thisMonth: [dayjs().startOf('month'), dayjs().endOf('month')],
    lastWeekFromToday: [dayjs().subtract(6, 'days'), dayjs()],
    lastMonthFromToday: [dayjs().subtract(1, 'month').add(1, 'days'), dayjs()],
    last3MonthsFromToday: [dayjs().subtract(3, 'month').add(1, 'days'), dayjs()],
    last6MonthsFromToday: [dayjs().subtract(6, 'month').add(1, 'days'), dayjs()],
    lastYearFromToday: [dayjs().subtract(1, 'year').add(1, 'days'), dayjs()],
};
// TODO fix css for range mode (more lateral padding)
class DatepickerComponent {
    changeDetectorRef;
    symbolRegistry;
    datepickerRef;
    firstDayOfWeek = 'monday';
    i18n = {
        ranges: {
            yesterday: 'Yesterday',
            lastWeek: 'Last Week',
            last30Days: 'Last 30 days',
            lastMonth: 'Previous month',
            thisMonth: 'This month',
        },
    };
    locale = 'en';
    set maxDate(maxDate) {
        if (maxDate) {
            this.maxDateStr = maxDate.toISOString();
        }
        else {
            this.maxDateStr = '';
        }
    }
    set minDate(minDate) {
        if (minDate) {
            this.minDateStr = minDate.toISOString();
        }
        else {
            this.minDateStr = '';
        }
    }
    mode;
    selectedDate = undefined;
    selectedDates = [];
    selectedPeriod = { startDate: undefined, endDate: undefined };
    showRanges = false;
    showCustomRangeLabel = input(false, ...(ngDevMode ? [{ debugName: "showCustomRangeLabel" }] : /* istanbul ignore next */ []));
    dateSelected = new EventEmitter();
    periodSelected = new EventEmitter();
    DatepickerMode = DatepickerMode;
    doubleCalendarWidth = 528; // 231px calendar table * 2 = 462 (+ 16px x-padding * 4 = 64)
    localeConfig;
    rangesConfig = input(null, ...(ngDevMode ? [{ debugName: "rangesConfig" }] : /* istanbul ignore next */ []));
    ranges = {};
    rangePickerWidth = 150;
    width = 0;
    pageSet = false;
    maxDateStr = '';
    minDateStr = '';
    constructor(changeDetectorRef, symbolRegistry) {
        this.changeDetectorRef = changeDetectorRef;
        this.symbolRegistry = symbolRegistry;
        this.symbolRegistry.registerSymbols([apArrowLeft, apArrowRight]);
    }
    ngOnInit() {
        dayjs.extend(localeData);
        const rangesConfig = this.rangesConfig();
        if (rangesConfig) {
            this.ranges = rangesConfig;
        }
        else {
            // if config not defined - init default ranges
            this.initRanges();
        }
        this.initDatePickerLocale();
    }
    ngOnChanges(changes) {
        this.setWidth();
        if (this.datepickerRef) {
            setTimeout(() => {
                this.datepickerRef.updateCalendars();
                this.changeDetectorRef.detectChanges();
            }, 100);
        }
        if (changes.selectedPeriod?.currentValue && this.datepickerRef) {
            if (this.selectedPeriod.startDate === null && this.selectedPeriod.endDate === null) {
                this.datepickerRef.clear();
            }
            else {
                this.datepickerRef.setStartDate(this.selectedPeriod?.startDate ?? dayjs(undefined));
                this.datepickerRef.setEndDate(this.selectedPeriod.endDate ?? dayjs(undefined));
            }
        }
        if (changes.mode?.currentValue === DatepickerMode.Single && this.datepickerRef) {
            this.setCalendarCurrentPage();
        }
    }
    ngAfterViewInit() {
        if (this.datepickerRef) {
            setTimeout(() => {
                if (this.mode === DatepickerMode.Range && this.selectedPeriod?.startDate) {
                    this.datepickerRef.setStartDate(this.selectedPeriod.startDate);
                    this.datepickerRef.setEndDate(this.selectedPeriod.endDate ?? this.selectedPeriod.startDate);
                }
                this.datepickerRef.updateCalendars();
                this.setCalendarCurrentPage();
            }, 100);
        }
    }
    initDatePickerLocale() {
        if (this.locale) {
            dayjs.locale(this.locale);
        }
        let firstDayOfWeekIndex;
        if (this.firstDayOfWeek === 'sunday') {
            firstDayOfWeekIndex = 0;
        }
        else if (this.firstDayOfWeek === 'monday') {
            firstDayOfWeekIndex = 1;
        }
        else {
            firstDayOfWeekIndex = dayjs.localeData().firstDayOfWeek();
        }
        this.localeConfig = {
            customRangeLabel: 'Custom',
            daysOfWeek: dayjs.weekdaysMin(),
            monthNames: dayjs.months(),
            firstDay: firstDayOfWeekIndex,
        };
    }
    initRanges() {
        this.ranges[this.i18n.ranges.yesterday] = RangesConfigPreset.yesterday;
        this.ranges[this.i18n.ranges.lastWeek] = RangesConfigPreset.lastWeek;
        this.ranges[this.i18n.ranges.last30Days] = RangesConfigPreset.last30Days;
        this.ranges[this.i18n.ranges.lastMonth] = RangesConfigPreset.lastMonth;
        this.ranges[this.i18n.ranges.thisMonth] = RangesConfigPreset.thisMonth;
    }
    isCustomDate = (date) => {
        const classes = [];
        if (this.mode === DatepickerMode.Multiple) {
            classes.push(this.isSelected(date) ? 'active' : 'force-inactive');
        }
        else if (this.mode === DatepickerMode.Single) {
            classes.push(this.selectedDate && this.selectedDate.isSame(date, 'day') ? 'active' : 'force-inactive');
        }
        else if (this.mode === DatepickerMode.Range) {
            classes.push('range-picker-mode');
            // Workaround to fix the auto-active today date when no date is selected
            if (dayjs().isSame(date, 'day') && !this.selectedPeriod?.startDate && !this.selectedPeriod?.endDate) {
                classes.push('force-inactive');
            }
        }
        return classes;
    };
    isSelected(date) {
        return this.selectedDates && this.selectedDates.some(selectedDate => selectedDate.isSame(date, 'day'));
    }
    onStartDateChanged(event) {
        const date = event.startDate.toDate();
        const dateLocalTime = new Date(date.getTime());
        const dayJsDate = dayjs(dateLocalTime);
        if (this.mode !== DatepickerMode.Range) {
            this.selectedDate = dayJsDate;
            this.datepickerRef.setEndDate(dayJsDate);
            if (this.pageSet) {
                this.pageSet = false;
            }
            else {
                this.dateSelected.emit(dayJsDate.clone());
                if (this.mode === DatepickerMode.Multiple) {
                    this.selectedDates.push(dayJsDate);
                }
            }
            if (this.datepickerRef) {
                this.datepickerRef.updateCalendars();
            }
        }
    }
    onDatesUpdated(event) {
        if (this.mode === DatepickerMode.Range) {
            const startDate = event.startDate?.toDate();
            const startDateLocalTime = startDate ? new Date(startDate.getTime()) : new Date();
            const endDate = event.endDate?.toDate();
            const endDateLocalTime = endDate ? new Date(endDate.getTime()) : new Date();
            this.periodSelected.emit({
                startDate: dayjs(startDateLocalTime).startOf('day'),
                endDate: dayjs(endDateLocalTime).endOf('day'),
            });
        }
        if (this.datepickerRef) {
            this.datepickerRef.updateCalendars();
        }
    }
    onNextMonth() {
        this.datepickerRef.clickNext(SideEnum.right);
    }
    onPreviousMonth() {
        this.datepickerRef.clickPrev(SideEnum.left);
    }
    /**
     * Ugly hack used here to open the calendar on the right day if they are selected dates
     *      * https://github.com/fetrarij/ngx-daterangepicker-material/issues/139
     */
    setCalendarCurrentPage() {
        const selectedFirstDate = this.selectedDates.length > 0 ? this.selectedDates[0] : this.selectedDate;
        if (selectedFirstDate && selectedFirstDate.isValid() && this.mode !== DatepickerMode.Range) {
            const endDate = selectedFirstDate.clone();
            endDate.add(1, 'month');
            this.pageSet = true;
            this.datepickerRef.setStartDate(selectedFirstDate);
            this.datepickerRef.setEndDate(endDate);
            this.datepickerRef.updateView();
        }
        this.changeDetectorRef.detectChanges();
    }
    setWidth() {
        this.width =
            this.showRanges && this.mode === DatepickerMode.Range
                ? this.doubleCalendarWidth + this.rangePickerWidth
                : this.doubleCalendarWidth;
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: DatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SymbolRegistry }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: DatepickerComponent, isStandalone: true, selector: "ap-datepicker", inputs: { firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: false, isRequired: false, transformFunction: null }, i18n: { classPropertyName: "i18n", publicName: "i18n", isSignal: false, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: false, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: false, isRequired: false, transformFunction: null }, selectedDates: { classPropertyName: "selectedDates", publicName: "selectedDates", isSignal: false, isRequired: false, transformFunction: null }, selectedPeriod: { classPropertyName: "selectedPeriod", publicName: "selectedPeriod", isSignal: false, isRequired: false, transformFunction: null }, showRanges: { classPropertyName: "showRanges", publicName: "showRanges", isSignal: false, isRequired: false, transformFunction: null }, showCustomRangeLabel: { classPropertyName: "showCustomRangeLabel", publicName: "showCustomRangeLabel", isSignal: true, isRequired: false, transformFunction: null }, rangesConfig: { classPropertyName: "rangesConfig", publicName: "rangesConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateSelected: "dateSelected", periodSelected: "periodSelected" }, viewQueries: [{ propertyName: "datepickerRef", first: true, predicate: ["datepickerRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n    class=\"custom-calendar\"\n    [style.width]=\"width + 'px'\">\n    <div class=\"custom-header\">\n        @if (datepickerRef.leftCalendar.month) {\n            <div class=\"month-header\">\n                <div\n                    class=\"month-arrow-button\"\n                    aria-label=\"Previous month\"\n                    tabindex=\"0\"\n                    (click)=\"onPreviousMonth()\">\n                    <ap-symbol\n                        symbolId=\"arrow-left\"\n                        [color]=\"'#858FA1'\"\n                        [size]=\"14\" />\n                </div>\n                <div class=\"month-label\">\n                    {{ datepickerRef.leftCalendar.month.locale(locale).format('MMMM YYYY') }}\n                </div>\n            </div>\n        }\n        @if (datepickerRef.rightCalendar.month) {\n            <div class=\"month-header\">\n                <div class=\"month-label\">\n                    {{ datepickerRef.rightCalendar.month.locale(locale).format('MMMM YYYY') }}\n                </div>\n                <div\n                    class=\"month-arrow-button\"\n                    aria-label=\"Next month\"\n                    tabindex=\"-1\"\n                    (click)=\"onNextMonth()\">\n                    <ap-symbol\n                        symbolId=\"arrow-right\"\n                        [color]=\"'#858FA1'\"\n                        [size]=\"14\" />\n                </div>\n            </div>\n        }\n        @if (showRanges && mode === DatepickerMode.Range) {\n            <div class=\"header-filler\"></div>\n        }\n    </div>\n    <ngx-daterangepicker-material\n        #datepickerRef\n        [class.hide-ranges]=\"!showRanges\"\n        [alwaysShowCalendars]=\"true\"\n        [autoApply]=\"true\"\n        [customRangeDirection]=\"true\"\n        [linkedCalendars]=\"true\"\n        [isCustomDate]=\"$any(isCustomDate)\"\n        [locale]=\"localeConfig\"\n        [maxDate]=\"maxDateStr\"\n        [minDate]=\"minDateStr\"\n        [ranges]=\"showRanges && mode === DatepickerMode.Range ? ranges : $any(null)\"\n        [showCustomRangeLabel]=\"showCustomRangeLabel()\"\n        (datesUpdated)=\"onDatesUpdated($event)\"\n        (startDateChanged)=\"onStartDateChanged($event)\" />\n</div>\n", styles: ["[color=facebook]{color:#0866ff}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#0866ff}[border=facebook]{border:1px solid #0866ff}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=reddit]{color:#ff4500}[bgcolor=reddit],[hcolor=reddit]:hover{background-color:#ff4500}[border=reddit]{border:1px solid #ff4500}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #a566a5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #c7ab82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #f2713c}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #ffd006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94c5aa}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2a9d8f}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78acd8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525a9e}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6a2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729e}::ng-deep .custom-calendar{background-color:#fff;display:flex;flex-direction:column;justify-content:center;border-radius:4px;height:fit-content}::ng-deep .custom-calendar .custom-header{display:flex;align-items:center;justify-content:center;color:#344563;font-size:12px;font-weight:700;height:55px;text-transform:capitalize}::ng-deep .custom-calendar .custom-header .month-header{height:30px;width:255px;display:flex;align-items:center}::ng-deep .custom-calendar .custom-header .month-header .month-arrow-button{padding:10px;border-radius:2em;cursor:pointer}::ng-deep .custom-calendar .custom-header .month-header .month-arrow-button:hover{background-color:#eaecef}::ng-deep .custom-calendar .custom-header .month-header .month-label{flex:1;text-align:center}::ng-deep .custom-calendar .custom-header .header-filler{width:150px}::ng-deep .custom-calendar .md-drppicker{font-family:Averta;width:unset;height:219px;padding:0;margin:0 0 16px;box-shadow:none!important;z-index:0!important}::ng-deep .custom-calendar .md-drppicker .ranges{border-left:1px solid #eaecef;float:right!important;max-width:150px;height:100%}::ng-deep .custom-calendar .md-drppicker .ranges ul li{margin-left:12px}::ng-deep .custom-calendar .md-drppicker .ranges ul li:hover{background:unset}::ng-deep .custom-calendar .md-drppicker .ranges ul li button{font-family:Averta;font-size:14px;border-radius:4px;color:#5d6a82}::ng-deep .custom-calendar .md-drppicker .ranges ul li button:hover:not(.active):not(:disabled){color:#178dfe;background:#e8f4ff}::ng-deep .custom-calendar .md-drppicker .ranges ul li button.active{color:#fff;background:#178dfe}::ng-deep .custom-calendar .md-drppicker .ranges ul li button.active:hover{background:#3a9efe}::ng-deep .custom-calendar .md-drppicker .ranges ul li button:disabled{color:#d6dae0;background:none;cursor:default}::ng-deep .custom-calendar .md-drppicker .month{cursor:auto}::ng-deep .custom-calendar .md-drppicker .calendar{margin:0!important;padding:0 16px}::ng-deep .custom-calendar .md-drppicker .calendar.left{border-right:1px solid #eaecef}::ng-deep .custom-calendar .md-drppicker .calendar-table{width:231px;padding:0!important;border:none!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table{border-spacing:0 5px!important;height:184px}::ng-deep .custom-calendar .md-drppicker .calendar-table table td,::ng-deep .custom-calendar .md-drppicker .calendar-table table th{height:unset;border:none}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead{line-height:10px}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr:first-child{display:none}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th{color:#aeb5c1;font-weight:700;font-size:12px;text-transform:capitalize;padding-bottom:10px}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.month,::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.prev,::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.next{color:#344563}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.prev,::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.next{font-size:16px}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody tr td:last-child.in-range{border-radius:0 2em 2em 0}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody tr td:first-child.in-range{border-radius:2em 0 0 2em}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td{opacity:1!important;border-spacing:0;height:27px}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td span{width:27px!important;height:27px!important;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-left:3px}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.in-range:not(.off):not(.force-inactive){background-color:#e8f4ff!important;color:#344563!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active.start-date:not(.end-date).range-picker-mode:not(.off){border-radius:2em 0 0 2em;background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active.end-date:not(.start-date).range-picker-mode:not(.off){border-radius:0 2em 2em 0;background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.force-inactive).start-date.end-date.range-picker-mode:not(.off){background-color:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.force-inactive).start-date.end-date.range-picker-mode:not(.off) span{border-radius:2em;background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available:not(.start-date):not(.end-date):hover span,::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available.today.force-inactive:hover span{background-color:#d1e8ff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available:not(.start-date):not(.end-date):hover:not(.in-range),::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available.today.force-inactive:hover:not(.in-range){background-color:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available.in-range:not(.start-date):not(.end-date):hover{border-radius:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.off{background-color:unset!important;color:#d6dae0!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.off):not(.range-picker-mode):not(.force-inactive),::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:hover:not(.off):not(.range-picker-mode){background-color:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.off):not(.range-picker-mode):not(.force-inactive) span,::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:hover:not(.off):not(.range-picker-mode) span{background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.force-inactive{background-color:unset!important;color:#5d6a82}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.today:not(.off) span{border:1px solid #178dfe;color:#5d6a82;height:25px!important;width:25px!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.today:not(.off).start-date:not(.force-inactive) span,::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.today:not(.off).end-date:not(.force-inactive) span{color:#fff}.hide-ranges ::ng-deep .ranges{display:none}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: NgxDaterangepickerMd }, { kind: "component", type: i2.DaterangepickerComponent, selector: "ngx-daterangepicker-material", inputs: ["startDate", "endDate", "dateLimit", "autoApply", "singleDatePicker", "showDropdowns", "showWeekNumbers", "showISOWeekNumbers", "linkedCalendars", "autoUpdateInput", "alwaysShowCalendars", "maxSpan", "lockStartDate", "timePicker", "timePicker24Hour", "timePickerIncrement", "timePickerSeconds", "showClearButton", "firstMonthDayClass", "lastMonthDayClass", "emptyWeekRowClass", "emptyWeekColumnClass", "firstDayOfNextMonthClass", "lastDayOfPreviousMonthClass", "showCustomRangeLabel", "showCancel", "keepCalendarOpeningWithRange", "showRangeLabelOnInput", "customRangeDirection", "drops", "opens", "closeOnAutoApply", "minDate", "locale", "ranges", "maxDate", "isInvalidDate", "isCustomDate", "isTooltipDate"], outputs: ["choosedDate", "rangeClicked", "datesUpdated", "startDateChanged", "endDateChanged", "cancelClicked", "clearClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: DatepickerComponent, decorators: [{
            type: Component,
            args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-datepicker', imports: [SymbolComponent, NgxDaterangepickerMd], template: "<div\n    class=\"custom-calendar\"\n    [style.width]=\"width + 'px'\">\n    <div class=\"custom-header\">\n        @if (datepickerRef.leftCalendar.month) {\n            <div class=\"month-header\">\n                <div\n                    class=\"month-arrow-button\"\n                    aria-label=\"Previous month\"\n                    tabindex=\"0\"\n                    (click)=\"onPreviousMonth()\">\n                    <ap-symbol\n                        symbolId=\"arrow-left\"\n                        [color]=\"'#858FA1'\"\n                        [size]=\"14\" />\n                </div>\n                <div class=\"month-label\">\n                    {{ datepickerRef.leftCalendar.month.locale(locale).format('MMMM YYYY') }}\n                </div>\n            </div>\n        }\n        @if (datepickerRef.rightCalendar.month) {\n            <div class=\"month-header\">\n                <div class=\"month-label\">\n                    {{ datepickerRef.rightCalendar.month.locale(locale).format('MMMM YYYY') }}\n                </div>\n                <div\n                    class=\"month-arrow-button\"\n                    aria-label=\"Next month\"\n                    tabindex=\"-1\"\n                    (click)=\"onNextMonth()\">\n                    <ap-symbol\n                        symbolId=\"arrow-right\"\n                        [color]=\"'#858FA1'\"\n                        [size]=\"14\" />\n                </div>\n            </div>\n        }\n        @if (showRanges && mode === DatepickerMode.Range) {\n            <div class=\"header-filler\"></div>\n        }\n    </div>\n    <ngx-daterangepicker-material\n        #datepickerRef\n        [class.hide-ranges]=\"!showRanges\"\n        [alwaysShowCalendars]=\"true\"\n        [autoApply]=\"true\"\n        [customRangeDirection]=\"true\"\n        [linkedCalendars]=\"true\"\n        [isCustomDate]=\"$any(isCustomDate)\"\n        [locale]=\"localeConfig\"\n        [maxDate]=\"maxDateStr\"\n        [minDate]=\"minDateStr\"\n        [ranges]=\"showRanges && mode === DatepickerMode.Range ? ranges : $any(null)\"\n        [showCustomRangeLabel]=\"showCustomRangeLabel()\"\n        (datesUpdated)=\"onDatesUpdated($event)\"\n        (startDateChanged)=\"onStartDateChanged($event)\" />\n</div>\n", styles: ["[color=facebook]{color:#0866ff}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#0866ff}[border=facebook]{border:1px solid #0866ff}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=reddit]{color:#ff4500}[bgcolor=reddit],[hcolor=reddit]:hover{background-color:#ff4500}[border=reddit]{border:1px solid #ff4500}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #a566a5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #c7ab82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #f2713c}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #ffd006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94c5aa}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2a9d8f}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78acd8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525a9e}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6a2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729e}::ng-deep .custom-calendar{background-color:#fff;display:flex;flex-direction:column;justify-content:center;border-radius:4px;height:fit-content}::ng-deep .custom-calendar .custom-header{display:flex;align-items:center;justify-content:center;color:#344563;font-size:12px;font-weight:700;height:55px;text-transform:capitalize}::ng-deep .custom-calendar .custom-header .month-header{height:30px;width:255px;display:flex;align-items:center}::ng-deep .custom-calendar .custom-header .month-header .month-arrow-button{padding:10px;border-radius:2em;cursor:pointer}::ng-deep .custom-calendar .custom-header .month-header .month-arrow-button:hover{background-color:#eaecef}::ng-deep .custom-calendar .custom-header .month-header .month-label{flex:1;text-align:center}::ng-deep .custom-calendar .custom-header .header-filler{width:150px}::ng-deep .custom-calendar .md-drppicker{font-family:Averta;width:unset;height:219px;padding:0;margin:0 0 16px;box-shadow:none!important;z-index:0!important}::ng-deep .custom-calendar .md-drppicker .ranges{border-left:1px solid #eaecef;float:right!important;max-width:150px;height:100%}::ng-deep .custom-calendar .md-drppicker .ranges ul li{margin-left:12px}::ng-deep .custom-calendar .md-drppicker .ranges ul li:hover{background:unset}::ng-deep .custom-calendar .md-drppicker .ranges ul li button{font-family:Averta;font-size:14px;border-radius:4px;color:#5d6a82}::ng-deep .custom-calendar .md-drppicker .ranges ul li button:hover:not(.active):not(:disabled){color:#178dfe;background:#e8f4ff}::ng-deep .custom-calendar .md-drppicker .ranges ul li button.active{color:#fff;background:#178dfe}::ng-deep .custom-calendar .md-drppicker .ranges ul li button.active:hover{background:#3a9efe}::ng-deep .custom-calendar .md-drppicker .ranges ul li button:disabled{color:#d6dae0;background:none;cursor:default}::ng-deep .custom-calendar .md-drppicker .month{cursor:auto}::ng-deep .custom-calendar .md-drppicker .calendar{margin:0!important;padding:0 16px}::ng-deep .custom-calendar .md-drppicker .calendar.left{border-right:1px solid #eaecef}::ng-deep .custom-calendar .md-drppicker .calendar-table{width:231px;padding:0!important;border:none!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table{border-spacing:0 5px!important;height:184px}::ng-deep .custom-calendar .md-drppicker .calendar-table table td,::ng-deep .custom-calendar .md-drppicker .calendar-table table th{height:unset;border:none}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead{line-height:10px}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr:first-child{display:none}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th{color:#aeb5c1;font-weight:700;font-size:12px;text-transform:capitalize;padding-bottom:10px}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.month,::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.prev,::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.next{color:#344563}::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.prev,::ng-deep .custom-calendar .md-drppicker .calendar-table table thead tr th.next{font-size:16px}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody tr td:last-child.in-range{border-radius:0 2em 2em 0}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody tr td:first-child.in-range{border-radius:2em 0 0 2em}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td{opacity:1!important;border-spacing:0;height:27px}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td span{width:27px!important;height:27px!important;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-left:3px}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.in-range:not(.off):not(.force-inactive){background-color:#e8f4ff!important;color:#344563!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active.start-date:not(.end-date).range-picker-mode:not(.off){border-radius:2em 0 0 2em;background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active.end-date:not(.start-date).range-picker-mode:not(.off){border-radius:0 2em 2em 0;background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.force-inactive).start-date.end-date.range-picker-mode:not(.off){background-color:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.force-inactive).start-date.end-date.range-picker-mode:not(.off) span{border-radius:2em;background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available:not(.start-date):not(.end-date):hover span,::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available.today.force-inactive:hover span{background-color:#d1e8ff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available:not(.start-date):not(.end-date):hover:not(.in-range),::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available.today.force-inactive:hover:not(.in-range){background-color:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.available.in-range:not(.start-date):not(.end-date):hover{border-radius:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.off{background-color:unset!important;color:#d6dae0!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.off):not(.range-picker-mode):not(.force-inactive),::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:hover:not(.off):not(.range-picker-mode){background-color:unset!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:not(.off):not(.range-picker-mode):not(.force-inactive) span,::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.active:hover:not(.off):not(.range-picker-mode) span{background-color:#178dfe!important;color:#fff!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.force-inactive{background-color:unset!important;color:#5d6a82}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.today:not(.off) span{border:1px solid #178dfe;color:#5d6a82;height:25px!important;width:25px!important}::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.today:not(.off).start-date:not(.force-inactive) span,::ng-deep .custom-calendar .md-drppicker .calendar-table table tbody td.today:not(.off).end-date:not(.force-inactive) span{color:#fff}.hide-ranges ::ng-deep .ranges{display:none}\n"] }]
        }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.SymbolRegistry }], propDecorators: { datepickerRef: [{
                type: ViewChild,
                args: ['datepickerRef']
            }], firstDayOfWeek: [{
                type: Input
            }], i18n: [{
                type: Input
            }], locale: [{
                type: Input
            }], maxDate: [{
                type: Input
            }], minDate: [{
                type: Input
            }], mode: [{
                type: Input,
                args: [{
                        required: true,
                    }]
            }], selectedDate: [{
                type: Input
            }], selectedDates: [{
                type: Input
            }], selectedPeriod: [{
                type: Input
            }], showRanges: [{
                type: Input
            }], showCustomRangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCustomRangeLabel", required: false }] }], dateSelected: [{
                type: Output
            }], periodSelected: [{
                type: Output
            }], rangesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangesConfig", required: false }] }] } });

const DEFAULT_I18N = {
    ranges: {
        yesterday: 'Yesterday',
        lastWeek: 'Last Week',
        last30Days: 'Last 30 days',
        lastMonth: 'Previous month',
        thisMonth: 'This month',
    },
};
/**
 * A dropdown component that displays a datepicker (single, multiple, or range mode)
 * in an overlay. Exposes open/close/toggle so it can be driven by apDropdownTrigger.
 */
class DatepickerDropdownComponent {
    datepickerDropdownTemplate = viewChild('datepickerDropdownTemplate', ...(ngDevMode ? [{ debugName: "datepickerDropdownTemplate" }] : /* istanbul ignore next */ []));
    mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
    selectedDate = input(undefined, ...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
    selectedDates = input([], ...(ngDevMode ? [{ debugName: "selectedDates" }] : /* istanbul ignore next */ []));
    selectedPeriod = input({ startDate: undefined, endDate: undefined }, ...(ngDevMode ? [{ debugName: "selectedPeriod" }] : /* istanbul ignore next */ []));
    minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
    maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
    firstDayOfWeek = input('monday', ...(ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
    locale = input('en', ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
    i18n = input(undefined, ...(ngDevMode ? [{ debugName: "i18n" }] : /* istanbul ignore next */ []));
    effectiveI18n = computed(() => this.i18n() ?? DEFAULT_I18N, ...(ngDevMode ? [{ debugName: "effectiveI18n" }] : /* istanbul ignore next */ []));
    showRanges = input(false, ...(ngDevMode ? [{ debugName: "showRanges" }] : /* istanbul ignore next */ []));
    showCustomRangeLabel = input(false, ...(ngDevMode ? [{ debugName: "showCustomRangeLabel" }] : /* istanbul ignore next */ []));
    rangesConfig = input(null, ...(ngDevMode ? [{ debugName: "rangesConfig" }] : /* istanbul ignore next */ []));
    showBackdrop = input(true, ...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
    disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
    defaultPosition = input('right', ...(ngDevMode ? [{ debugName: "defaultPosition" }] : /* istanbul ignore next */ []));
    opened = output();
    closed = output();
    dateSelected = output();
    periodSelected = output();
    overlay = createDropdownOverlay();
    isOpen = this.overlay.isOpen;
    open(triggerElement) {
        const template = this.datepickerDropdownTemplate();
        if (this.disabled() || this.isOpen() || !template)
            return;
        this.overlay.open(template, triggerElement, {
            showBackdrop: this.showBackdrop(),
            defaultPosition: this.defaultPosition(),
            onClose: () => this.close(),
        });
        this.opened.emit();
    }
    close() {
        if (!this.isOpen())
            return;
        this.overlay.close();
        this.closed.emit();
    }
    toggle(triggerElement) {
        if (this.isOpen()) {
            this.close();
        }
        else {
            this.open(triggerElement);
        }
    }
    onDateSelected(date) {
        this.dateSelected.emit(date);
        if (this.mode() !== DatepickerMode.Multiple) {
            this.close();
        }
    }
    onPeriodSelected(period) {
        this.periodSelected.emit(period);
        if (period.startDate && period.endDate) {
            this.close();
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: DatepickerDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: DatepickerDropdownComponent, isStandalone: true, selector: "ap-datepicker-dropdown", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: false, transformFunction: null }, selectedDates: { classPropertyName: "selectedDates", publicName: "selectedDates", isSignal: true, isRequired: false, transformFunction: null }, selectedPeriod: { classPropertyName: "selectedPeriod", publicName: "selectedPeriod", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, i18n: { classPropertyName: "i18n", publicName: "i18n", isSignal: true, isRequired: false, transformFunction: null }, showRanges: { classPropertyName: "showRanges", publicName: "showRanges", isSignal: true, isRequired: false, transformFunction: null }, showCustomRangeLabel: { classPropertyName: "showCustomRangeLabel", publicName: "showCustomRangeLabel", isSignal: true, isRequired: false, transformFunction: null }, rangesConfig: { classPropertyName: "rangesConfig", publicName: "rangesConfig", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", dateSelected: "dateSelected", periodSelected: "periodSelected" }, viewQueries: [{ propertyName: "datepickerDropdownTemplate", first: true, predicate: ["datepickerDropdownTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #datepickerDropdownTemplate>\n    <div\n        class=\"ap-datepicker-dropdown__content\"\n        role=\"dialog\"\n        aria-label=\"Datepicker\"\n        tabindex=\"-1\">\n        <ap-datepicker\n            [firstDayOfWeek]=\"firstDayOfWeek()\"\n            [i18n]=\"effectiveI18n()\"\n            [locale]=\"locale()\"\n            [maxDate]=\"maxDate()\"\n            [minDate]=\"minDate()\"\n            [mode]=\"mode()\"\n            [rangesConfig]=\"rangesConfig()\"\n            [selectedDate]=\"selectedDate()\"\n            [selectedDates]=\"selectedDates()\"\n            [selectedPeriod]=\"selectedPeriod()\"\n            [showCustomRangeLabel]=\"showCustomRangeLabel()\"\n            (click)=\"$event.stopPropagation()\"\n            (dateSelected)=\"onDateSelected($event)\"\n            (periodSelected)=\"onPeriodSelected($event)\"\n            [showRanges]=\"showRanges()\" />\n    </div>\n</ng-template>\n", styles: [":host{display:none}.ap-datepicker-dropdown__content{background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);padding:var(--comp-action-dropdown-padding);outline:none;overflow:hidden;z-index:1000}.ap-datepicker-dropdown__content:focus{outline:2px solid var(--comp-action-dropdown-item-background-color-focused);outline-offset:2px}\n"], dependencies: [{ kind: "component", type: DatepickerComponent, selector: "ap-datepicker", inputs: ["firstDayOfWeek", "i18n", "locale", "maxDate", "minDate", "mode", "selectedDate", "selectedDates", "selectedPeriod", "showRanges", "showCustomRangeLabel", "rangesConfig"], outputs: ["dateSelected", "periodSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: DatepickerDropdownComponent, decorators: [{
            type: Component,
            args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-datepicker-dropdown', imports: [DatepickerComponent], template: "<ng-template #datepickerDropdownTemplate>\n    <div\n        class=\"ap-datepicker-dropdown__content\"\n        role=\"dialog\"\n        aria-label=\"Datepicker\"\n        tabindex=\"-1\">\n        <ap-datepicker\n            [firstDayOfWeek]=\"firstDayOfWeek()\"\n            [i18n]=\"effectiveI18n()\"\n            [locale]=\"locale()\"\n            [maxDate]=\"maxDate()\"\n            [minDate]=\"minDate()\"\n            [mode]=\"mode()\"\n            [rangesConfig]=\"rangesConfig()\"\n            [selectedDate]=\"selectedDate()\"\n            [selectedDates]=\"selectedDates()\"\n            [selectedPeriod]=\"selectedPeriod()\"\n            [showCustomRangeLabel]=\"showCustomRangeLabel()\"\n            (click)=\"$event.stopPropagation()\"\n            (dateSelected)=\"onDateSelected($event)\"\n            (periodSelected)=\"onPeriodSelected($event)\"\n            [showRanges]=\"showRanges()\" />\n    </div>\n</ng-template>\n", styles: [":host{display:none}.ap-datepicker-dropdown__content{background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);padding:var(--comp-action-dropdown-padding);outline:none;overflow:hidden;z-index:1000}.ap-datepicker-dropdown__content:focus{outline:2px solid var(--comp-action-dropdown-item-background-color-focused);outline-offset:2px}\n"] }]
        }], propDecorators: { datepickerDropdownTemplate: [{ type: i0.ViewChild, args: ['datepickerDropdownTemplate', { isSignal: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: false }] }], selectedDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDates", required: false }] }], selectedPeriod: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedPeriod", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], i18n: [{ type: i0.Input, args: [{ isSignal: true, alias: "i18n", required: false }] }], showRanges: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRanges", required: false }] }], showCustomRangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCustomRangeLabel", required: false }] }], rangesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangesConfig", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], defaultPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPosition", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], dateSelected: [{ type: i0.Output, args: ["dateSelected"] }], periodSelected: [{ type: i0.Output, args: ["periodSelected"] }] } });

const defaultPeriodSelected = { startDate: undefined, endDate: undefined };
class InputDatepickerComponent {
    mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
    label = input('Select date', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
    placeholder = input('Select date', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
    firstDayOfWeek = input('monday', ...(ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
    locale = input('en', ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
    dateFormat = input('MM/DD/YYYY', ...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
    disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
    minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
    maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
    selectedDate = input(undefined, ...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
    selectedDates = input([], ...(ngDevMode ? [{ debugName: "selectedDates" }] : /* istanbul ignore next */ []));
    selectedPeriod = input(undefined, ...(ngDevMode ? [{ debugName: "selectedPeriod" }] : /* istanbul ignore next */ []));
    i18n = input(undefined, ...(ngDevMode ? [{ debugName: "i18n" }] : /* istanbul ignore next */ []));
    showRanges = input(false, ...(ngDevMode ? [{ debugName: "showRanges" }] : /* istanbul ignore next */ []));
    showCustomRangeLabel = input(false, ...(ngDevMode ? [{ debugName: "showCustomRangeLabel" }] : /* istanbul ignore next */ []));
    rangesConfig = input(null, ...(ngDevMode ? [{ debugName: "rangesConfig" }] : /* istanbul ignore next */ []));
    showBackdrop = input(true, ...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
    defaultPosition = input('right', ...(ngDevMode ? [{ debugName: "defaultPosition" }] : /* istanbul ignore next */ []));
    periodRange = signal(defaultPeriodSelected, ...(ngDevMode ? [{ debugName: "periodRange" }] : /* istanbul ignore next */ []));
    isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
    periodChanged = output();
    dateSelected = output();
    displayedDate = computed(() => {
        const { startDate, endDate } = this.periodRange();
        const dateFormat = this.dateFormat() ?? 'MM/DD/YYYY';
        if (startDate && endDate) {
            return `${dayjs(startDate).format(dateFormat)} - ${dayjs(endDate).format(dateFormat)}`;
        }
        return '';
    }, ...(ngDevMode ? [{ debugName: "displayedDate" }] : /* istanbul ignore next */ []));
    initPeriodRange = effect(() => {
        const selected = this.selectedPeriod();
        if (selected && selected.startDate && selected.endDate) {
            this.periodRange.set({
                startDate: dayjs(selected.startDate),
                endDate: dayjs(selected.endDate),
            });
        }
        else {
            this.periodRange.set(defaultPeriodSelected);
        }
    }, ...(ngDevMode ? [{ debugName: "initPeriodRange" }] : /* istanbul ignore next */ []));
    onTouched = () => { };
    onChange = () => { };
    onPeriodSelected(period) {
        if (period.startDate && period.endDate) {
            this.periodRange.set(period);
            this.onChange(period);
            this.periodChanged.emit(period);
        }
        else {
            this.periodRange.set(defaultPeriodSelected);
            this.onChange(defaultPeriodSelected);
        }
    }
    writeValue(value) {
        if (value && value.startDate && value.endDate) {
            this.periodRange.set({
                startDate: dayjs(value.startDate),
                endDate: dayjs(value.endDate),
            });
        }
        else {
            this.periodRange.set(defaultPeriodSelected);
        }
    }
    registerOnChange(fn) {
        this.onChange = fn;
    }
    registerOnTouched(fn) {
        this.onTouched = fn;
    }
    setDisabledState(isDisabled) {
        this.isDisabled.set(isDisabled);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: InputDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: InputDatepickerComponent, isStandalone: true, selector: "ap-input-datepicker", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: false, transformFunction: null }, selectedDates: { classPropertyName: "selectedDates", publicName: "selectedDates", isSignal: true, isRequired: false, transformFunction: null }, selectedPeriod: { classPropertyName: "selectedPeriod", publicName: "selectedPeriod", isSignal: true, isRequired: false, transformFunction: null }, i18n: { classPropertyName: "i18n", publicName: "i18n", isSignal: true, isRequired: false, transformFunction: null }, showRanges: { classPropertyName: "showRanges", publicName: "showRanges", isSignal: true, isRequired: false, transformFunction: null }, showCustomRangeLabel: { classPropertyName: "showCustomRangeLabel", publicName: "showCustomRangeLabel", isSignal: true, isRequired: false, transformFunction: null }, rangesConfig: { classPropertyName: "rangesConfig", publicName: "rangesConfig", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { periodChanged: "periodChanged", dateSelected: "dateSelected" }, providers: [withSymbols(apCalendar, apChevronDown)], ngImport: i0, template: "<ap-form-field>\n    @let vLabel = label();\n    @if (vLabel) {\n        <label for=\"datepicker\">\n            {{ vLabel }}\n        </label>\n    }\n    <ap-input-group [apDropdownTrigger]=\"datepickerDropdown\" symbolPosition=\"left\">\n        <ap-symbol size=\"sm\" symbolId=\"calendar\" />\n        <input\n            apInput\n            id=\"datepicker\"\n            readonly\n            (blur)=\"onTouched()\"\n            [disabled]=\"disabled() || isDisabled()\"\n            [placeholder]=\"placeholder()\"\n            [value]=\"displayedDate()\"\n            type=\"text\" />\n    </ap-input-group>\n\n</ap-form-field>\n\n<ap-datepicker-dropdown\n    #datepickerDropdown\n    [defaultPosition]=\"defaultPosition()\"\n    [disabled]=\"disabled() || isDisabled()\"\n    [firstDayOfWeek]=\"firstDayOfWeek()\"\n    [i18n]=\"i18n()\"\n    [locale]=\"locale()\"\n    [maxDate]=\"maxDate()\"\n    [minDate]=\"minDate()\"\n    [mode]=\"mode()\"\n    [rangesConfig]=\"rangesConfig()\"\n    [selectedDate]=\"selectedDate()\"\n    [selectedDates]=\"selectedDates()\"\n    [selectedPeriod]=\"periodRange()\"\n    [showBackdrop]=\"showBackdrop()\"\n    [showCustomRangeLabel]=\"showCustomRangeLabel()\"\n    (dateSelected)=\"dateSelected.emit($event)\"\n    (periodSelected)=\"onPeriodSelected($event)\"\n    [showRanges]=\"showRanges()\" />\n", dependencies: [{ kind: "component", type: DatepickerDropdownComponent, selector: "ap-datepicker-dropdown", inputs: ["mode", "selectedDate", "selectedDates", "selectedPeriod", "minDate", "maxDate", "firstDayOfWeek", "locale", "i18n", "showRanges", "showCustomRangeLabel", "rangesConfig", "showBackdrop", "disabled", "defaultPosition"], outputs: ["opened", "closed", "dateSelected", "periodSelected"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[apDropdownTrigger]", inputs: ["apDropdownTrigger"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: FormFieldComponent, selector: "ap-form-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: InputDatepickerComponent, decorators: [{
            type: Component,
            args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-input-datepicker', imports: [
                        DatepickerDropdownComponent,
                        DropdownTriggerDirective,
                        InputDirective,
                        InputGroupComponent,
                        SymbolComponent,
                        FormFieldComponent,
                        SymbolComponent,
                    ], providers: [withSymbols(apCalendar, apChevronDown)], template: "<ap-form-field>\n    @let vLabel = label();\n    @if (vLabel) {\n        <label for=\"datepicker\">\n            {{ vLabel }}\n        </label>\n    }\n    <ap-input-group [apDropdownTrigger]=\"datepickerDropdown\" symbolPosition=\"left\">\n        <ap-symbol size=\"sm\" symbolId=\"calendar\" />\n        <input\n            apInput\n            id=\"datepicker\"\n            readonly\n            (blur)=\"onTouched()\"\n            [disabled]=\"disabled() || isDisabled()\"\n            [placeholder]=\"placeholder()\"\n            [value]=\"displayedDate()\"\n            type=\"text\" />\n    </ap-input-group>\n\n</ap-form-field>\n\n<ap-datepicker-dropdown\n    #datepickerDropdown\n    [defaultPosition]=\"defaultPosition()\"\n    [disabled]=\"disabled() || isDisabled()\"\n    [firstDayOfWeek]=\"firstDayOfWeek()\"\n    [i18n]=\"i18n()\"\n    [locale]=\"locale()\"\n    [maxDate]=\"maxDate()\"\n    [minDate]=\"minDate()\"\n    [mode]=\"mode()\"\n    [rangesConfig]=\"rangesConfig()\"\n    [selectedDate]=\"selectedDate()\"\n    [selectedDates]=\"selectedDates()\"\n    [selectedPeriod]=\"periodRange()\"\n    [showBackdrop]=\"showBackdrop()\"\n    [showCustomRangeLabel]=\"showCustomRangeLabel()\"\n    (dateSelected)=\"dateSelected.emit($event)\"\n    (periodSelected)=\"onPeriodSelected($event)\"\n    [showRanges]=\"showRanges()\" />\n" }]
        }], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: false }] }], selectedDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDates", required: false }] }], selectedPeriod: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedPeriod", required: false }] }], i18n: [{ type: i0.Input, args: [{ isSignal: true, alias: "i18n", required: false }] }], showRanges: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRanges", required: false }] }], showCustomRangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCustomRangeLabel", required: false }] }], rangesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangesConfig", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], defaultPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPosition", required: false }] }], periodChanged: [{ type: i0.Output, args: ["periodChanged"] }], dateSelected: [{ type: i0.Output, args: ["dateSelected"] }] } });

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

export { DatepickerComponent, DatepickerDropdownComponent, DatepickerMode, InputDatepickerComponent, RangesConfigPreset, defaultPeriodSelected };
//# sourceMappingURL=agorapulse-ui-components-datepicker.mjs.map
