import { NgForOf, NgIf, CommonModule } from '@angular/common';
import { ɵɵdefineDirective, ɵsetClassMetadata, Directive, ɵɵelement, ɵɵproperty, ɵɵgetCurrentView, ɵɵelementStart, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵtemplate, ɵɵelementEnd, ɵɵadvance, EventEmitter, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵstyleProp, ɵɵclassProp, ɵɵtext, ɵɵtextInterpolate, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ɵɵelementContainer, ChangeDetectorRef, ɵɵcontentQuery, TemplateRef, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵProvidersFeature, forwardRef, ɵɵNgOnChangesFeature, ɵɵtemplateRefExtractor, ɵɵreference, ɵɵclassMapInterpolate1, ContentChild, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
import { NgControlStatus, NgModel, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
import { ɵDateTableComponent, ɵMonthTableComponent, LibPackerModule } from 'ng-zorro-antd/date-picker';
import { NzI18nService, DateHelperService, NzI18nModule } from 'ng-zorro-antd/i18n';
import { NzRadioGroupComponent, NzRadioComponent, NzRadioButtonDirective, NzRadioModule } from 'ng-zorro-antd/radio';
import { NzSelectComponent, NzOptionComponent, NzSelectModule } from 'ng-zorro-antd/select';
import { CandyDate, InputBoolean } from 'ng-zorro-antd/core';
import { __decorate, __metadata } from 'tslib';

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var NzDateCellDirective = /** @class */ (function () {
    function NzDateCellDirective() {
    }
    /** @nocollapse */ NzDateCellDirective.ɵfac = function NzDateCellDirective_Factory(t) { return new (t || NzDateCellDirective)(); };
    /** @nocollapse */ NzDateCellDirective.ɵdir = ɵɵdefineDirective({ type: NzDateCellDirective, selectors: [["", "nzDateCell", ""]], exportAs: ["nzDateCell"] });
    return NzDateCellDirective;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzDateCellDirective, [{
        type: Directive,
        args: [{
                selector: '[nzDateCell]',
                exportAs: 'nzDateCell'
            }]
    }], null, null); })();
var NzMonthCellDirective = /** @class */ (function () {
    function NzMonthCellDirective() {
    }
    /** @nocollapse */ NzMonthCellDirective.ɵfac = function NzMonthCellDirective_Factory(t) { return new (t || NzMonthCellDirective)(); };
    /** @nocollapse */ NzMonthCellDirective.ɵdir = ɵɵdefineDirective({ type: NzMonthCellDirective, selectors: [["", "nzMonthCell", ""]], exportAs: ["nzMonthCell"] });
    return NzMonthCellDirective;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzMonthCellDirective, [{
        type: Directive,
        args: [{
                selector: '[nzMonthCell]',
                exportAs: 'nzMonthCell'
            }]
    }], null, null); })();
var NzDateFullCellDirective = /** @class */ (function () {
    function NzDateFullCellDirective() {
    }
    /** @nocollapse */ NzDateFullCellDirective.ɵfac = function NzDateFullCellDirective_Factory(t) { return new (t || NzDateFullCellDirective)(); };
    /** @nocollapse */ NzDateFullCellDirective.ɵdir = ɵɵdefineDirective({ type: NzDateFullCellDirective, selectors: [["", "nzDateFullCell", ""]], exportAs: ["nzDateFullCell"] });
    return NzDateFullCellDirective;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzDateFullCellDirective, [{
        type: Directive,
        args: [{
                selector: '[nzDateFullCell]',
                exportAs: 'nzDateFullCell'
            }]
    }], null, null); })();
var NzMonthFullCellDirective = /** @class */ (function () {
    function NzMonthFullCellDirective() {
    }
    /** @nocollapse */ NzMonthFullCellDirective.ɵfac = function NzMonthFullCellDirective_Factory(t) { return new (t || NzMonthFullCellDirective)(); };
    /** @nocollapse */ NzMonthFullCellDirective.ɵdir = ɵɵdefineDirective({ type: NzMonthFullCellDirective, selectors: [["", "nzMonthFullCell", ""]], exportAs: ["nzMonthFullCell"] });
    return NzMonthFullCellDirective;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzMonthFullCellDirective, [{
        type: Directive,
        args: [{
                selector: '[nzMonthFullCell]',
                exportAs: 'nzMonthFullCell'
            }]
    }], null, null); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
function NzCalendarHeaderComponent_nz_option_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "nz-option", 7);
} if (rf & 2) {
    var year_r2732 = ctx.$implicit;
    ɵɵproperty("nzLabel", year_r2732.label)("nzValue", year_r2732.value);
} }
function NzCalendarHeaderComponent_nz_select_3_nz_option_1_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "nz-option", 7);
} if (rf & 2) {
    var month_r2734 = ctx.$implicit;
    ɵɵproperty("nzLabel", month_r2734.label)("nzValue", month_r2734.value);
} }
function NzCalendarHeaderComponent_nz_select_3_Template(rf, ctx) { if (rf & 1) {
    var _r2736 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "nz-select", 8);
    ɵɵlistener("ngModelChange", function NzCalendarHeaderComponent_nz_select_3_Template_nz_select_ngModelChange_0_listener($event) { ɵɵrestoreView(_r2736); var ctx_r2735 = ɵɵnextContext(); return ctx_r2735.monthChange.emit($event); });
    ɵɵtemplate(1, NzCalendarHeaderComponent_nz_select_3_nz_option_1_Template, 1, 2, "nz-option", 2);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2731 = ɵɵnextContext();
    ɵɵproperty("nzSize", ctx_r2731.size)("nzDropdownMatchSelectWidth", false)("ngModel", ctx_r2731.activeMonth);
    ɵɵadvance(1);
    ɵɵproperty("ngForOf", ctx_r2731.months);
} }
var NzCalendarHeaderComponent = /** @class */ (function () {
    function NzCalendarHeaderComponent(i18n, dateHelper) {
        this.i18n = i18n;
        this.dateHelper = dateHelper;
        this.mode = 'month';
        this.fullscreen = true;
        this.activeDate = new CandyDate();
        this.modeChange = new EventEmitter();
        this.yearChange = new EventEmitter();
        this.monthChange = new EventEmitter();
        // @Output() readonly valueChange: EventEmitter<CandyDate> = new EventEmitter();
        this.yearOffset = 10;
        this.yearTotal = 20;
    }
    Object.defineProperty(NzCalendarHeaderComponent.prototype, "activeYear", {
        get: function () {
            return this.activeDate.getYear();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarHeaderComponent.prototype, "activeMonth", {
        get: function () {
            return this.activeDate.getMonth();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarHeaderComponent.prototype, "size", {
        get: function () {
            return this.fullscreen ? 'default' : 'small';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarHeaderComponent.prototype, "yearTypeText", {
        get: function () {
            return this.i18n.getLocale().Calendar.year;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarHeaderComponent.prototype, "monthTypeText", {
        get: function () {
            return this.i18n.getLocale().Calendar.month;
        },
        enumerable: true,
        configurable: true
    });
    NzCalendarHeaderComponent.prototype.ngOnInit = function () {
        this.setUpYears();
        this.setUpMonths();
    };
    NzCalendarHeaderComponent.prototype.updateYear = function (year) {
        this.yearChange.emit(year);
        this.setUpYears(year);
    };
    NzCalendarHeaderComponent.prototype.setUpYears = function (year) {
        var start = (year || this.activeYear) - this.yearOffset;
        var end = start + this.yearTotal;
        this.years = [];
        for (var i = start; i < end; i++) {
            this.years.push({ label: "" + i, value: i });
        }
    };
    NzCalendarHeaderComponent.prototype.setUpMonths = function () {
        this.months = [];
        for (var i = 0; i < 12; i++) {
            var dateInMonth = this.activeDate.setMonth(i);
            var monthText = this.dateHelper.format(dateInMonth.nativeDate, 'MMM');
            this.months.push({ label: monthText, value: i });
        }
    };
    /** @nocollapse */ NzCalendarHeaderComponent.ɵfac = function NzCalendarHeaderComponent_Factory(t) { return new (t || NzCalendarHeaderComponent)(ɵɵdirectiveInject(NzI18nService), ɵɵdirectiveInject(DateHelperService)); };
    /** @nocollapse */ NzCalendarHeaderComponent.ɵcmp = ɵɵdefineComponent({ type: NzCalendarHeaderComponent, selectors: [["nz-calendar-header"]], hostVars: 4, hostBindings: function NzCalendarHeaderComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵstyleProp("display", "block");
            ɵɵclassProp("ant-fullcalendar-header", true);
        } }, inputs: { mode: "mode", fullscreen: "fullscreen", activeDate: "activeDate" }, outputs: { modeChange: "modeChange", yearChange: "yearChange", monthChange: "monthChange" }, exportAs: ["nzCalendarHeader"], decls: 9, vars: 9, consts: [[1, "ant-picker-calendar-header"], [1, "ant-picker-calendar-year-select", 3, "nzSize", "nzDropdownMatchSelectWidth", "ngModel", "ngModelChange"], [3, "nzLabel", "nzValue", 4, "ngFor", "ngForOf"], ["class", "ant-picker-calendar-month-select", 3, "nzSize", "nzDropdownMatchSelectWidth", "ngModel", "ngModelChange", 4, "ngIf"], [1, "ant-picker-calendar-mode-switch", 3, "ngModel", "nzSize", "ngModelChange"], ["nz-radio-button", "", "nzValue", "month"], ["nz-radio-button", "", "nzValue", "year"], [3, "nzLabel", "nzValue"], [1, "ant-picker-calendar-month-select", 3, "nzSize", "nzDropdownMatchSelectWidth", "ngModel", "ngModelChange"]], template: function NzCalendarHeaderComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵelementStart(0, "div", 0);
            ɵɵelementStart(1, "nz-select", 1);
            ɵɵlistener("ngModelChange", function NzCalendarHeaderComponent_Template_nz_select_ngModelChange_1_listener($event) { return ctx.updateYear($event); });
            ɵɵtemplate(2, NzCalendarHeaderComponent_nz_option_2_Template, 1, 2, "nz-option", 2);
            ɵɵelementEnd();
            ɵɵtemplate(3, NzCalendarHeaderComponent_nz_select_3_Template, 2, 4, "nz-select", 3);
            ɵɵelementStart(4, "nz-radio-group", 4);
            ɵɵlistener("ngModelChange", function NzCalendarHeaderComponent_Template_nz_radio_group_ngModelChange_4_listener($event) { return ctx.mode = $event; })("ngModelChange", function NzCalendarHeaderComponent_Template_nz_radio_group_ngModelChange_4_listener($event) { return ctx.modeChange.emit($event); });
            ɵɵelementStart(5, "label", 5);
            ɵɵtext(6);
            ɵɵelementEnd();
            ɵɵelementStart(7, "label", 6);
            ɵɵtext(8);
            ɵɵelementEnd();
            ɵɵelementEnd();
            ɵɵelementEnd();
        } if (rf & 2) {
            ɵɵadvance(1);
            ɵɵproperty("nzSize", ctx.size)("nzDropdownMatchSelectWidth", false)("ngModel", ctx.activeYear);
            ɵɵadvance(1);
            ɵɵproperty("ngForOf", ctx.years);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", ctx.mode === "month");
            ɵɵadvance(1);
            ɵɵproperty("ngModel", ctx.mode)("nzSize", ctx.size);
            ɵɵadvance(2);
            ɵɵtextInterpolate(ctx.monthTypeText);
            ɵɵadvance(2);
            ɵɵtextInterpolate(ctx.yearTypeText);
        } }, directives: [NzSelectComponent, NgControlStatus, NgModel, NgForOf, NgIf, NzRadioGroupComponent, NzRadioComponent, NzRadioButtonDirective, NzOptionComponent], encapsulation: 2, changeDetection: 0 });
    return NzCalendarHeaderComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzCalendarHeaderComponent, [{
        type: Component,
        args: [{
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-calendar-header',
                exportAs: 'nzCalendarHeader',
                template: "\n    <div class=\"ant-picker-calendar-header\">\n      <nz-select\n        class=\"ant-picker-calendar-year-select\"\n        [nzSize]=\"size\"\n        [nzDropdownMatchSelectWidth]=\"false\"\n        [ngModel]=\"activeYear\"\n        (ngModelChange)=\"updateYear($event)\"\n      >\n        <nz-option *ngFor=\"let year of years\" [nzLabel]=\"year.label\" [nzValue]=\"year.value\"></nz-option>\n      </nz-select>\n\n      <nz-select\n        *ngIf=\"mode === 'month'\"\n        class=\"ant-picker-calendar-month-select\"\n        [nzSize]=\"size\"\n        [nzDropdownMatchSelectWidth]=\"false\"\n        [ngModel]=\"activeMonth\"\n        (ngModelChange)=\"monthChange.emit($event)\"\n      >\n        <nz-option *ngFor=\"let month of months\" [nzLabel]=\"month.label\" [nzValue]=\"month.value\"></nz-option>\n      </nz-select>\n\n      <nz-radio-group class=\"ant-picker-calendar-mode-switch\" [(ngModel)]=\"mode\" (ngModelChange)=\"modeChange.emit($event)\" [nzSize]=\"size\">\n        <label nz-radio-button nzValue=\"month\">{{ monthTypeText }}</label>\n        <label nz-radio-button nzValue=\"year\">{{ yearTypeText }}</label>\n      </nz-radio-group>\n    </div>\n  ",
                host: {
                    '[style.display]': "'block'",
                    '[class.ant-fullcalendar-header]': "true"
                }
            }]
    }], function () { return [{ type: NzI18nService }, { type: DateHelperService }]; }, { mode: [{
            type: Input
        }], fullscreen: [{
            type: Input
        }], activeDate: [{
            type: Input
        }], modeChange: [{
            type: Output
        }], yearChange: [{
            type: Output
        }], monthChange: [{
            type: Output
        }] }); })();

function NzCalendarComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainer(0);
} }
function NzCalendarComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    var _r2743 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "date-table", 6);
    ɵɵlistener("valueChange", function NzCalendarComponent_ng_template_5_Template_date_table_valueChange_0_listener($event) { ɵɵrestoreView(_r2743); var ctx_r2742 = ɵɵnextContext(); return ctx_r2742.onDateSelect($event); });
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2739 = ɵɵnextContext();
    ɵɵproperty("prefixCls", ctx_r2739.prefixCls)("value", ctx_r2739.activeDate)("activeDate", ctx_r2739.activeDate)("cellRender", ctx_r2739.dateCell)("fullCellRender", ctx_r2739.dateFullCell);
} }
function NzCalendarComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    var _r2745 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "month-table", 6);
    ɵɵlistener("valueChange", function NzCalendarComponent_ng_template_7_Template_month_table_valueChange_0_listener($event) { ɵɵrestoreView(_r2745); var ctx_r2744 = ɵɵnextContext(); return ctx_r2744.onDateSelect($event); });
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2741 = ɵɵnextContext();
    ɵɵproperty("prefixCls", ctx_r2741.prefixCls)("value", ctx_r2741.activeDate)("activeDate", ctx_r2741.activeDate)("cellRender", ctx_r2741.monthCell)("fullCellRender", ctx_r2741.monthFullCell);
} }
var NzCalendarComponent = /** @class */ (function () {
    function NzCalendarComponent(cdr) {
        this.cdr = cdr;
        this.activeDate = new CandyDate();
        this.prefixCls = 'ant-picker-calendar';
        this.onChangeFn = function () { };
        this.onTouchFn = function () { };
        this.nzMode = 'month';
        this.nzModeChange = new EventEmitter();
        this.nzPanelChange = new EventEmitter();
        this.nzSelectChange = new EventEmitter();
        this.nzValueChange = new EventEmitter();
        this.nzFullscreen = true;
    }
    Object.defineProperty(NzCalendarComponent.prototype, "dateCell", {
        get: function () {
            return this.nzDateCell || this.nzDateCellChild;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarComponent.prototype, "dateFullCell", {
        get: function () {
            return this.nzDateFullCell || this.nzDateFullCellChild;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarComponent.prototype, "monthCell", {
        get: function () {
            return this.nzMonthCell || this.nzMonthCellChild;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzCalendarComponent.prototype, "monthFullCell", {
        get: function () {
            return this.nzMonthFullCell || this.nzMonthFullCellChild;
        },
        enumerable: true,
        configurable: true
    });
    NzCalendarComponent.prototype.onModeChange = function (mode) {
        this.nzModeChange.emit(mode);
        this.nzPanelChange.emit({ date: this.activeDate.nativeDate, mode: mode });
    };
    NzCalendarComponent.prototype.onYearSelect = function (year) {
        var date = this.activeDate.setYear(year);
        this.updateDate(date);
    };
    NzCalendarComponent.prototype.onMonthSelect = function (month) {
        var date = this.activeDate.setMonth(month);
        this.updateDate(date);
    };
    NzCalendarComponent.prototype.onDateSelect = function (date) {
        // Only activeDate is enough in calendar
        // this.value = date;
        this.updateDate(date);
    };
    NzCalendarComponent.prototype.writeValue = function (value) {
        this.updateDate(new CandyDate(value), false);
        this.cdr.markForCheck();
    };
    NzCalendarComponent.prototype.registerOnChange = function (fn) {
        this.onChangeFn = fn;
    };
    NzCalendarComponent.prototype.registerOnTouched = function (fn) {
        this.onTouchFn = fn;
    };
    NzCalendarComponent.prototype.updateDate = function (date, touched) {
        if (touched === void 0) { touched = true; }
        this.activeDate = date;
        if (touched) {
            this.onChangeFn(date.nativeDate);
            this.onTouchFn();
            this.nzSelectChange.emit(date.nativeDate);
            this.nzValueChange.emit(date.nativeDate);
        }
    };
    NzCalendarComponent.prototype.ngOnChanges = function (changes) {
        if (changes.nzValue) {
            this.updateDate(new CandyDate(this.nzValue), false);
        }
    };
    /** @nocollapse */ NzCalendarComponent.ɵfac = function NzCalendarComponent_Factory(t) { return new (t || NzCalendarComponent)(ɵɵdirectiveInject(ChangeDetectorRef)); };
    /** @nocollapse */ NzCalendarComponent.ɵcmp = ɵɵdefineComponent({ type: NzCalendarComponent, selectors: [["nz-calendar"]], contentQueries: function NzCalendarComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
            ɵɵcontentQuery(dirIndex, NzDateCellDirective, true, TemplateRef);
            ɵɵcontentQuery(dirIndex, NzDateFullCellDirective, true, TemplateRef);
            ɵɵcontentQuery(dirIndex, NzMonthCellDirective, true, TemplateRef);
            ɵɵcontentQuery(dirIndex, NzMonthFullCellDirective, true, TemplateRef);
        } if (rf & 2) {
            var _t;
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.nzDateCellChild = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.nzDateFullCellChild = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.nzMonthCellChild = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.nzMonthFullCellChild = _t.first);
        } }, hostVars: 6, hostBindings: function NzCalendarComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵclassProp("ant-picker-calendar", true)("ant-picker-calendar-full", ctx.nzFullscreen)("ant-picker-calendar-mini", !ctx.nzFullscreen);
        } }, inputs: { nzMode: "nzMode", nzValue: "nzValue", nzDateCell: "nzDateCell", nzDateFullCell: "nzDateFullCell", nzMonthCell: "nzMonthCell", nzMonthFullCell: "nzMonthFullCell", nzFullscreen: "nzFullscreen" }, outputs: { nzModeChange: "nzModeChange", nzPanelChange: "nzPanelChange", nzSelectChange: "nzSelectChange", nzValueChange: "nzValueChange" }, exportAs: ["nzCalendar"], features: [ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((function () { return NzCalendarComponent; })), multi: true }]), ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: [[3, "fullscreen", "activeDate", "mode", "modeChange", "yearChange", "monthChange"], [1, "ant-picker-panel"], [1, "ant-picker-body"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["monthModeTable", ""], ["yearModeTable", ""], [3, "prefixCls", "value", "activeDate", "cellRender", "fullCellRender", "valueChange"]], template: function NzCalendarComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵelementStart(0, "nz-calendar-header", 0);
            ɵɵlistener("modeChange", function NzCalendarComponent_Template_nz_calendar_header_modeChange_0_listener($event) { return ctx.nzMode = $event; })("modeChange", function NzCalendarComponent_Template_nz_calendar_header_modeChange_0_listener($event) { return ctx.onModeChange($event); })("yearChange", function NzCalendarComponent_Template_nz_calendar_header_yearChange_0_listener($event) { return ctx.onYearSelect($event); })("monthChange", function NzCalendarComponent_Template_nz_calendar_header_monthChange_0_listener($event) { return ctx.onMonthSelect($event); });
            ɵɵelementEnd();
            ɵɵelementStart(1, "div", 1);
            ɵɵelementStart(2, "div");
            ɵɵelementStart(3, "div", 2);
            ɵɵtemplate(4, NzCalendarComponent_ng_container_4_Template, 1, 0, "ng-container", 3);
            ɵɵelementEnd();
            ɵɵelementEnd();
            ɵɵelementEnd();
            ɵɵtemplate(5, NzCalendarComponent_ng_template_5_Template, 1, 5, "ng-template", null, 4, ɵɵtemplateRefExtractor);
            ɵɵtemplate(7, NzCalendarComponent_ng_template_7_Template, 1, 5, "ng-template", null, 5, ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            var _r2738 = ɵɵreference(6);
            var _r2740 = ɵɵreference(8);
            ɵɵproperty("fullscreen", ctx.nzFullscreen)("activeDate", ctx.activeDate)("mode", ctx.nzMode);
            ɵɵadvance(2);
            ɵɵclassMapInterpolate1("ant-picker-", ctx.nzMode === "month" ? "date" : "month", "-panel");
            ɵɵadvance(2);
            ɵɵproperty("ngIf", ctx.nzMode === "month")("ngIfThen", _r2738)("ngIfElse", _r2740);
        } }, directives: [NzCalendarHeaderComponent, NgIf, ɵDateTableComponent, ɵMonthTableComponent], encapsulation: 2, changeDetection: 0 });
    __decorate([
        InputBoolean(),
        __metadata("design:type", Boolean)
    ], NzCalendarComponent.prototype, "nzFullscreen", void 0);
    return NzCalendarComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzCalendarComponent, [{
        type: Component,
        args: [{
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-calendar',
                exportAs: 'nzCalendar',
                template: "\n    <nz-calendar-header\n      [fullscreen]=\"nzFullscreen\"\n      [activeDate]=\"activeDate\"\n      [(mode)]=\"nzMode\"\n      (modeChange)=\"onModeChange($event)\"\n      (yearChange)=\"onYearSelect($event)\"\n      (monthChange)=\"onMonthSelect($event)\"\n    >\n    </nz-calendar-header>\n\n    <div class=\"ant-picker-panel\">\n      <div class=\"ant-picker-{{ nzMode === 'month' ? 'date' : 'month' }}-panel\">\n        <div class=\"ant-picker-body\">\n          <ng-container *ngIf=\"nzMode === 'month'; then monthModeTable; else yearModeTable\"></ng-container>\n        </div>\n      </div>\n    </div>\n    <ng-template #monthModeTable>\n      <date-table\n        [prefixCls]=\"prefixCls\"\n        [value]=\"activeDate\"\n        [activeDate]=\"activeDate\"\n        [cellRender]=\"dateCell\"\n        [fullCellRender]=\"dateFullCell\"\n        (valueChange)=\"onDateSelect($event)\"\n      ></date-table>\n    </ng-template>\n\n    <ng-template #yearModeTable>\n      <month-table\n        [prefixCls]=\"prefixCls\"\n        [value]=\"activeDate\"\n        [activeDate]=\"activeDate\"\n        [cellRender]=\"monthCell\"\n        [fullCellRender]=\"monthFullCell\"\n        (valueChange)=\"onDateSelect($event)\"\n      ></month-table>\n    </ng-template>\n  ",
                host: {
                    '[class.ant-picker-calendar]': 'true',
                    '[class.ant-picker-calendar-full]': 'nzFullscreen',
                    '[class.ant-picker-calendar-mini]': '!nzFullscreen'
                },
                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((function () { return NzCalendarComponent; })), multi: true }]
            }]
    }], function () { return [{ type: ChangeDetectorRef }]; }, { nzMode: [{
            type: Input
        }], nzValue: [{
            type: Input
        }], nzModeChange: [{
            type: Output
        }], nzPanelChange: [{
            type: Output
        }], nzSelectChange: [{
            type: Output
        }], nzValueChange: [{
            type: Output
        }], nzDateCell: [{
            type: Input
        }], nzDateCellChild: [{
            type: ContentChild,
            args: [NzDateCellDirective, { static: false, read: TemplateRef }]
        }], nzDateFullCell: [{
            type: Input
        }], nzDateFullCellChild: [{
            type: ContentChild,
            args: [NzDateFullCellDirective, { static: false, read: TemplateRef }]
        }], nzMonthCell: [{
            type: Input
        }], nzMonthCellChild: [{
            type: ContentChild,
            args: [NzMonthCellDirective, { static: false, read: TemplateRef }]
        }], nzMonthFullCell: [{
            type: Input
        }], nzMonthFullCellChild: [{
            type: ContentChild,
            args: [NzMonthFullCellDirective, { static: false, read: TemplateRef }]
        }], nzFullscreen: [{
            type: Input
        }] }); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var NzCalendarModule = /** @class */ (function () {
    function NzCalendarModule() {
    }
    /** @nocollapse */ NzCalendarModule.ɵmod = ɵɵdefineNgModule({ type: NzCalendarModule });
    /** @nocollapse */ NzCalendarModule.ɵinj = ɵɵdefineInjector({ factory: function NzCalendarModule_Factory(t) { return new (t || NzCalendarModule)(); }, imports: [[CommonModule, FormsModule, NzI18nModule, NzRadioModule, NzSelectModule, LibPackerModule]] });
    return NzCalendarModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(NzCalendarModule, { declarations: [NzCalendarHeaderComponent,
        NzCalendarComponent,
        NzDateCellDirective,
        NzDateFullCellDirective,
        NzMonthCellDirective,
        NzMonthFullCellDirective], imports: [CommonModule, FormsModule, NzI18nModule, NzRadioModule, NzSelectModule, LibPackerModule], exports: [NzCalendarComponent, NzDateCellDirective, NzDateFullCellDirective, NzMonthCellDirective, NzMonthFullCellDirective] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzCalendarModule, [{
        type: NgModule,
        args: [{
                declarations: [
                    NzCalendarHeaderComponent,
                    NzCalendarComponent,
                    NzDateCellDirective,
                    NzDateFullCellDirective,
                    NzMonthCellDirective,
                    NzMonthFullCellDirective
                ],
                exports: [NzCalendarComponent, NzDateCellDirective, NzDateFullCellDirective, NzMonthCellDirective, NzMonthFullCellDirective],
                imports: [CommonModule, FormsModule, NzI18nModule, NzRadioModule, NzSelectModule, LibPackerModule]
            }]
    }], null, null); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

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

export { NzCalendarComponent, NzCalendarHeaderComponent, NzCalendarModule, NzDateCellDirective, NzDateFullCellDirective, NzMonthCellDirective, NzMonthFullCellDirective };
//# sourceMappingURL=ng-zorro-antd-calendar.js.map
