import { __extends } 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
 */
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, Host, Input, Optional, ViewEncapsulation } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { NzNoAnimationDirective } from 'ng-zorro-antd/core';
import { DateHelperService, NzI18nService } from 'ng-zorro-antd/i18n';
import { AbstractPickerComponent } from './abstract-picker.component';
import { DatePickerService } from './date-picker.service';
import * as i0 from "@angular/core";
import * as i1 from "./date-picker.service";
import * as i2 from "ng-zorro-antd/i18n";
import * as i3 from "ng-zorro-antd/core";
import * as i4 from "./picker.component";
import * as i5 from "@angular/common";
import * as i6 from "./date-range-popup.component";
function NzMonthPickerComponent_date_range_popup_1_Template(rf, ctx) { if (rf & 1) {
    var _r1894 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "date-range-popup", 2);
    i0.ɵɵlistener("panelModeChange", function NzMonthPickerComponent_date_range_popup_1_Template_date_range_popup_panelModeChange_0_listener($event) { i0.ɵɵrestoreView(_r1894); var ctx_r1893 = i0.ɵɵnextContext(); return ctx_r1893.onPanelModeChange($event); })("calendarChange", function NzMonthPickerComponent_date_range_popup_1_Template_date_range_popup_calendarChange_0_listener($event) { i0.ɵɵrestoreView(_r1894); var ctx_r1895 = i0.ɵɵnextContext(); return ctx_r1895.onCalendarChange($event); })("resultOk", function NzMonthPickerComponent_date_range_popup_1_Template_date_range_popup_resultOk_0_listener() { i0.ɵɵrestoreView(_r1894); var ctx_r1896 = i0.ɵɵnextContext(); return ctx_r1896.onResultOk(); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r1892 = i0.ɵɵnextContext();
    i0.ɵɵproperty("isRange", ctx_r1892.isRange)("defaultPickerValue", ctx_r1892.nzDefaultPickerValue)("showWeek", ctx_r1892.showWeek)("panelMode", ctx_r1892.nzMode)("locale", ctx_r1892.nzLocale == null ? null : ctx_r1892.nzLocale.lang)("showToday", ctx_r1892.realShowToday)("showTime", ctx_r1892.nzShowTime)("format", ctx_r1892.nzFormat)("dateRender", ctx_r1892.nzDateRender)("disabledDate", ctx_r1892.nzDisabledDate)("disabledTime", ctx_r1892.nzDisabledTime)("placeholder", ctx_r1892.nzPlaceHolder)("dropdownClassName", ctx_r1892.nzDropdownClassName)("popupStyle", ctx_r1892.nzPopupStyle)("extraFooter", ctx_r1892.extraFooter)("ranges", ctx_r1892.nzRanges);
} }
var NzMonthPickerComponent = /** @class */ (function (_super) {
    __extends(NzMonthPickerComponent, _super);
    function NzMonthPickerComponent(datePickerService, i18n, cdr, dateHelper, noAnimation) {
        var _this = _super.call(this, datePickerService, i18n, cdr, dateHelper, noAnimation) || this;
        _this.noAnimation = noAnimation;
        _this.nzFormat = 'yyyy-MM';
        _this.nzMode = 'month';
        return _this;
    }
    /** @nocollapse */ NzMonthPickerComponent.ɵfac = function NzMonthPickerComponent_Factory(t) { return new (t || NzMonthPickerComponent)(i0.ɵɵdirectiveInject(i1.DatePickerService), i0.ɵɵdirectiveInject(i2.NzI18nService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2.DateHelperService), i0.ɵɵdirectiveInject(i3.NzNoAnimationDirective, 9)); };
    /** @nocollapse */ NzMonthPickerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NzMonthPickerComponent, selectors: [["nz-month-picker"]], hostVars: 2, hostBindings: function NzMonthPickerComponent_HostBindings(rf, ctx) { if (rf & 2) {
            i0.ɵɵclassMap(ctx.hostClassMap);
        } }, inputs: { nzFormat: "nzFormat", nzMode: "nzMode" }, exportAs: ["nzMonthPicker"], features: [i0.ɵɵProvidersFeature([
                DatePickerService,
                {
                    provide: NG_VALUE_ACCESSOR,
                    multi: true,
                    useExisting: forwardRef((function () { return NzMonthPickerComponent; }))
                }
            ]), i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 14, consts: [["nz-picker", "", 3, "isRange", "open", "separator", "disabled", "disabledDate", "format", "allowClear", "autoFocus", "placeholder", "ngClass", "noAnimation", "openChange", "focusChange"], [3, "isRange", "defaultPickerValue", "showWeek", "panelMode", "locale", "showToday", "showTime", "format", "dateRender", "disabledDate", "disabledTime", "placeholder", "dropdownClassName", "popupStyle", "extraFooter", "ranges", "panelModeChange", "calendarChange", "resultOk", 4, "ngIf"], [3, "isRange", "defaultPickerValue", "showWeek", "panelMode", "locale", "showToday", "showTime", "format", "dateRender", "disabledDate", "disabledTime", "placeholder", "dropdownClassName", "popupStyle", "extraFooter", "ranges", "panelModeChange", "calendarChange", "resultOk"]], template: function NzMonthPickerComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵlistener("openChange", function NzMonthPickerComponent_Template_div_openChange_0_listener($event) { return ctx.onOpenChange($event); })("focusChange", function NzMonthPickerComponent_Template_div_focusChange_0_listener($event) { return ctx.onFocusChange($event); });
            i0.ɵɵtemplate(1, NzMonthPickerComponent_date_range_popup_1_Template, 1, 16, "date-range-popup", 1);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵstyleMap(ctx.nzStyle);
            i0.ɵɵproperty("isRange", ctx.isRange)("open", ctx.nzOpen)("separator", ctx.nzSeparator)("disabled", ctx.nzDisabled)("disabledDate", ctx.nzDisabledDate)("format", ctx.nzFormat)("allowClear", ctx.nzAllowClear)("autoFocus", ctx.nzAutoFocus)("placeholder", ctx.nzPlaceHolder)("ngClass", ctx.nzClassName)("noAnimation", ctx.noAnimation == null ? null : ctx.noAnimation.nzNoAnimation);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.realOpenState);
        } }, directives: [i4.NzPickerComponent, i5.NgClass, i5.NgIf, i6.DateRangePopupComponent], encapsulation: 2, changeDetection: 0 });
    return NzMonthPickerComponent;
}(AbstractPickerComponent));
export { NzMonthPickerComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(NzMonthPickerComponent, [{
        type: Component,
        args: [{
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-month-picker',
                exportAs: 'nzMonthPicker',
                templateUrl: './abstract-picker.component.html',
                host: {
                    '[class]': 'hostClassMap'
                },
                providers: [
                    DatePickerService,
                    {
                        provide: NG_VALUE_ACCESSOR,
                        multi: true,
                        useExisting: forwardRef((function () { return NzMonthPickerComponent; }))
                    }
                ]
            }]
    }], function () { return [{ type: i1.DatePickerService }, { type: i2.NzI18nService }, { type: i0.ChangeDetectorRef }, { type: i2.DateHelperService }, { type: i3.NzNoAnimationDirective, decorators: [{
                type: Host
            }, {
                type: Optional
            }] }]; }, { nzFormat: [{
            type: Input
        }], nzMode: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 