import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { MonthPickerBaseComponent } from '@ironsource/fusion-ui/components/month-picker/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/directives/click-outside";
import * as i3 from "./components/month-picker-placeholder/month-picker-placeholder.component";
import * as i4 from "./components/month-picker-selector/month-picker-selector.component";
function MonthPickerComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 4);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.error);
} }
export class MonthPickerComponent extends MonthPickerBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵMonthPickerComponent_BaseFactory; return function MonthPickerComponent_Factory(__ngFactoryType__) { return (ɵMonthPickerComponent_BaseFactory || (ɵMonthPickerComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MonthPickerComponent)))(__ngFactoryType__ || MonthPickerComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MonthPickerComponent, selectors: [["fusion-month-picker"]], features: [i0.ɵɵProvidersFeature([
                {
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: forwardRef(() => MonthPickerComponent),
                    multi: true
                }
            ]), i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 16, consts: [[1, "fu-month-picker-wrapper", 3, "fusionClickOutside"], [3, "click", "placeholder", "selected"], [3, "selectedChange", "selected", "min", "max"], ["class", "error-msg", 4, "ngIf"], [1, "error-msg"]], template: function MonthPickerComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵlistener("fusionClickOutside", function MonthPickerComponent_Template_div_fusionClickOutside_0_listener() { return ctx.onOutsideClick(); });
            i0.ɵɵelementStart(1, "fusion-month-picker-placeholder", 1);
            i0.ɵɵpipe(2, "async");
            i0.ɵɵlistener("click", function MonthPickerComponent_Template_fusion_month_picker_placeholder_click_1_listener() { return ctx.onMonthPlaceholderClicked(); });
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(3, "fusion-month-picker-selector", 2);
            i0.ɵɵpipe(4, "async");
            i0.ɵɵlistener("selectedChange", function MonthPickerComponent_Template_fusion_month_picker_selector_selectedChange_3_listener($event) { return ctx.selectedChanged($event); });
            i0.ɵɵelementEnd()();
            i0.ɵɵtemplate(5, MonthPickerComponent_div_5_Template, 2, 1, "div", 3);
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵclassProp("fu-disabled", ctx.isDisabled)("fu-opened", i0.ɵɵpipeBind1(2, 12, ctx.isOpen$));
            i0.ɵɵproperty("placeholder", ctx.config == null ? null : ctx.config.placeholder)("selected", ctx.selected);
            i0.ɵɵadvance(2);
            i0.ɵɵclassProp("fu-opened", i0.ɵɵpipeBind1(4, 14, ctx.isOpen$));
            i0.ɵɵproperty("selected", ctx.selected)("min", ctx.config == null ? null : ctx.config.min)("max", ctx.config == null ? null : ctx.config.max);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.error);
        } }, dependencies: [i1.NgIf, i2.ClickOutsideDirective, i3.MonthPickerPlaceholderComponent, i4.MonthPickerSelectorComponent, i1.AsyncPipe], styles: ["[_nghost-%COMP%]   .error-msg[_ngcontent-%COMP%]{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .fu-month-picker-wrapper[_ngcontent-%COMP%]{position:relative;min-width:220px;max-width:300px;color:var(--fu-month-picker-color, var(--fu-dark-500, #0d148c))}[_nghost-%COMP%]   .error-msg[_ngcontent-%COMP%]{color:var(--fu-negative-500, #ff6a63)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MonthPickerComponent, [{
        type: Component,
        args: [{ selector: 'fusion-month-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                    {
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: forwardRef(() => MonthPickerComponent),
                        multi: true
                    }
                ], template: "<div class=\"fu-month-picker-wrapper\" (fusionClickOutside)=\"onOutsideClick()\">\n    <fusion-month-picker-placeholder\n        [placeholder]=\"config?.placeholder\"\n        [selected]=\"selected\"\n        [class.fu-disabled]=\"isDisabled\"\n        [class.fu-opened]=\"isOpen$ | async\"\n        (click)=\"onMonthPlaceholderClicked()\"\n    ></fusion-month-picker-placeholder>\n    <fusion-month-picker-selector\n        [class.fu-opened]=\"isOpen$ | async\"\n        [selected]=\"selected\"\n        [min]=\"config?.min\"\n        [max]=\"config?.max\"\n        (selectedChange)=\"selectedChanged($event)\"\n    ></fusion-month-picker-selector>\n</div>\n<div class=\"error-msg\" *ngIf=\"error\">{{ error }}</div>\n", styles: [":host .error-msg{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}:host *{box-sizing:border-box}:host .fu-month-picker-wrapper{position:relative;min-width:220px;max-width:300px;color:var(--fu-month-picker-color, var(--fu-dark-500, #0d148c))}:host .error-msg{color:var(--fu-negative-500, #ff6a63)}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MonthPickerComponent, { className: "MonthPickerComponent", filePath: "month-picker.component.ts", lineNumber: 18 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9udGgtcGlja2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Z1c2lvbi11aS9jb21wb25lbnRzL21vbnRoLXBpY2tlci92Mi9tb250aC1waWNrZXIuY29tcG9uZW50LnRzIiwiLi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