import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CalendarBaseComponent } from '@ironsource/fusion-ui/components/calendar/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
function CalendarComponent_th_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const dow_r2 = ctx.$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(dow_r2);
} }
const _c0 = a0 => [a0];
function CalendarComponent_ng_container_10_tr_1_ng_container_1_td_1_Template(rf, ctx) { if (rf & 1) {
    const _r15 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "td", 8, 9);
    i0.ɵɵlistener("mouseenter", function CalendarComponent_ng_container_10_tr_1_ng_container_1_td_1_Template_td_mouseenter_0_listener($event) { i0.ɵɵrestoreView(_r15); const day_r7 = i0.ɵɵnextContext().$implicit; const ctx_r13 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r13.dayHovered(day_r7, $event)); })("click", function CalendarComponent_ng_container_10_tr_1_ng_container_1_td_1_Template_td_click_0_listener() { i0.ɵɵrestoreView(_r15); const day_r7 = i0.ɵɵnextContext().$implicit; const ctx_r16 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r16.selectDay(day_r7)); });
    i0.ɵɵelement(2, "span", 10);
    i0.ɵɵelementStart(3, "span", 11);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const dayInMonth_r11 = ctx.ngIf;
    const day_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r8 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("ngClass", ctx_r8.getDayClasses(day_r7));
    i0.ɵɵattribute("data-datetime", i0.ɵɵpureFunction1(3, _c0, day_r7.date.getTime()));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(dayInMonth_r11);
} }
function CalendarComponent_ng_container_10_tr_1_ng_container_1_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td");
    i0.ɵɵtext(1, "\u00A0");
    i0.ɵɵelementEnd();
} }
function CalendarComponent_ng_container_10_tr_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, CalendarComponent_ng_container_10_tr_1_ng_container_1_td_1_Template, 5, 5, "td", 6);
    i0.ɵɵpipe(2, "date");
    i0.ɵɵtemplate(3, CalendarComponent_ng_container_10_tr_1_ng_container_1_ng_template_3_Template, 2, 0, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const day_r7 = ctx.$implicit;
    const _r10 = i0.ɵɵreference(4);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind2(2, 2, day_r7.date, "d"))("ngIfElse", _r10);
} }
function CalendarComponent_ng_container_10_tr_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, CalendarComponent_ng_container_10_tr_1_ng_container_1_Template, 5, 5, "ng-container", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const week_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", week_r3);
} }
function CalendarComponent_ng_container_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, CalendarComponent_ng_container_10_tr_1_Template, 2, 1, "tr", 5);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const week_r3 = ctx.$implicit;
    const last_r4 = ctx.last;
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !last_r4 || last_r4 && week_r3[0].date);
} }
const _c1 = a0 => ({ waitingForDateSelection: a0 });
export class CalendarComponent extends CalendarBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCalendarComponent_BaseFactory; return function CalendarComponent_Factory(t) { return (ɵCalendarComponent_BaseFactory || (ɵCalendarComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CalendarComponent)))(t || CalendarComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CalendarComponent, selectors: [["fusion-calendar"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 13, consts: [[1, "calendar", 3, "mouseleave"], ["colspan", "7", 1, "month"], [1, "day-in-week"], [4, "ngFor", "ngForOf"], [3, "ngClass"], [4, "ngIf"], ["class", "day", 3, "ngClass", "mouseenter", "click", 4, "ngIf", "ngIfElse"], ["notThisMonthDay", ""], [1, "day", 3, "ngClass", "mouseenter", "click"], ["date", ""], [1, "selected-range"], [1, "date-text"]], template: function CalendarComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "table", 0);
            i0.ɵɵlistener("mouseleave", function CalendarComponent_Template_table_mouseleave_0_listener() { return ctx.hoverEnd(); });
            i0.ɵɵelementStart(1, "thead")(2, "tr")(3, "th", 1);
            i0.ɵɵtext(4);
            i0.ɵɵpipe(5, "date");
            i0.ɵɵpipe(6, "date");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(7, "tr", 2);
            i0.ɵɵtemplate(8, CalendarComponent_th_8_Template, 2, 1, "th", 3);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(9, "tbody", 4);
            i0.ɵɵtemplate(10, CalendarComponent_ng_container_10_Template, 2, 1, "ng-container", 3);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind2(5, 5, ctx.configuration.month, "MMMM"), " ", i0.ɵɵpipeBind2(6, 8, ctx.configuration.month, "y"), "");
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("ngForOf", ctx.daysOfTheWeek);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c1, (ctx.configuration.selection == null ? null : ctx.configuration.selection.startDate == null ? null : ctx.configuration.selection.startDate.getTime()) === (ctx.configuration.selection == null ? null : ctx.configuration.selection.endDate == null ? null : ctx.configuration.selection.endDate.getTime())));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngForOf", ctx.calendarService.getParsedMonth(ctx.configuration.month, ctx.configuration.maxDate).weeks);
        } }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.DatePipe], styles: ["[_nghost-%COMP%]   .month[_ngcontent-%COMP%]{font-size:15px;font-family:var(--bold-font-family, \"NHaasGroteskTXPro-75Bd\");font-weight:600}[_nghost-%COMP%]   .day-in-week[_ngcontent-%COMP%]{font-size:11px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:700}[_nghost-%COMP%]   .day[_ngcontent-%COMP%]{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .day.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;touch-callout:none;-webkit-user-select:none;user-select:none}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]   .day-in-week[_ngcontent-%COMP%]{border-bottom:1px solid var(--light-color, #E1E6EB)}[_nghost-%COMP%]   .calendar[_ngcontent-%COMP%]{display:inline-block;border-collapse:collapse;width:196px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}[_nghost-%COMP%]   .day-in-week[_ngcontent-%COMP%]{line-height:14px;text-transform:uppercase}[_nghost-%COMP%]   .day-in-week[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding-top:6px;padding-bottom:6px}[_nghost-%COMP%]   .day[_ngcontent-%COMP%]{text-align:center;width:28px;height:28px;cursor:pointer}[_nghost-%COMP%]   .day[_ngcontent-%COMP%]:hover{background-color:var(--primary-color-200, #C3DFFC)}[_nghost-%COMP%]   .day.today[_ngcontent-%COMP%]{-webkit-text-decoration:var(--calendar-today-text-decoration, underline);text-decoration:var(--calendar-today-text-decoration, underline)}[_nghost-%COMP%]   .day.selected[_ngcontent-%COMP%]{background-color:var(--primary-color-100, #F3F9FF);font-weight:700}[_nghost-%COMP%]   .day.selected[_ngcontent-%COMP%]:hover{background-color:var(--primary-color-200, #C3DFFC)}[_nghost-%COMP%]   .day.active[_ngcontent-%COMP%]{color:#fff;background-color:var(--primary-color, #3091F6);font-weight:700}[_nghost-%COMP%]   .day.active[_ngcontent-%COMP%]:hover{background-color:var(--primary-color, #3091F6)}[_nghost-%COMP%]   .day.disabled[_ngcontent-%COMP%]{color:var(--light-color-700, #95A6B8)}[_nghost-%COMP%]   .day.disabled[_ngcontent-%COMP%]:hover{background-color:transparent}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CalendarComponent, [{
        type: Component,
        args: [{ selector: 'fusion-calendar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table class=\"calendar\" (mouseleave)=\"hoverEnd()\">\n    <thead>\n        <tr>\n            <th class=\"month\" colspan=\"7\">{{ configuration.month | date: 'MMMM' }} {{ configuration.month | date: 'y' }}</th>\n        </tr>\n        <tr class=\"day-in-week\">\n            <th *ngFor=\"let dow of daysOfTheWeek\">{{ dow }}</th>\n        </tr>\n    </thead>\n    <tbody\n        [ngClass]=\"{waitingForDateSelection: configuration.selection?.startDate?.getTime() === configuration.selection?.endDate?.getTime()}\"\n    >\n        <ng-container\n            *ngFor=\"let week of calendarService.getParsedMonth(configuration.month, configuration.maxDate).weeks; let last = last\"\n        >\n            <tr *ngIf=\"!last || (last && week[0].date)\">\n                <ng-container *ngFor=\"let day of week\">\n                    <td\n                        #date\n                        class=\"day\"\n                        *ngIf=\"day.date | date: 'd' as dayInMonth; else notThisMonthDay\"\n                        [ngClass]=\"getDayClasses(day)\"\n                        (mouseenter)=\"dayHovered(day, $event)\"\n                        [attr.data-datetime]=\"[day.date.getTime()]\"\n                        (click)=\"selectDay(day)\"\n                    >\n                        <span class=\"selected-range\"></span>\n                        <span class=\"date-text\">{{ dayInMonth }}</span>\n                    </td>\n                    <ng-template #notThisMonthDay><td>&nbsp;</td></ng-template>\n                </ng-container>\n            </tr>\n        </ng-container>\n    </tbody>\n</table>\n", styles: [":host .month{font-size:15px;font-family:var(--bold-font-family, \"NHaasGroteskTXPro-75Bd\");font-weight:600}:host .day-in-week{font-size:11px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:700}:host .day{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}:host *{box-sizing:border-box}:host .day.disabled{pointer-events:none;cursor:default;touch-callout:none;-webkit-user-select:none;user-select:none}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host .day-in-week{border-bottom:1px solid var(--light-color, #E1E6EB)}:host .calendar{display:inline-block;border-collapse:collapse;width:196px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}:host .day-in-week{line-height:14px;text-transform:uppercase}:host .day-in-week th{padding-top:6px;padding-bottom:6px}:host .day{text-align:center;width:28px;height:28px;cursor:pointer}:host .day:hover{background-color:var(--primary-color-200, #C3DFFC)}:host .day.today{-webkit-text-decoration:var(--calendar-today-text-decoration, underline);text-decoration:var(--calendar-today-text-decoration, underline)}:host .day.selected{background-color:var(--primary-color-100, #F3F9FF);font-weight:700}:host .day.selected:hover{background-color:var(--primary-color-200, #C3DFFC)}:host .day.active{color:#fff;background-color:var(--primary-color, #3091F6);font-weight:700}:host .day.active:hover{background-color:var(--primary-color, #3091F6)}:host .day.disabled{color:var(--light-color-700, #95A6B8)}:host .day.disabled:hover{background-color:transparent}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CalendarComponent, { className: "CalendarComponent", filePath: "calendar.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64, 