import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ControlContainer, FormGroupDirective } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/icon/v1";
function DatepickerHeaderComponent_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1("", ctx_r0.prefix, ": ");
} }
const _c0 = (a0, a1) => ({ "is-disabled": a0, opened: a1 });
const _c1 = () => ({ iconName: "calendar-2", iconVersion: "v2" });
const _c2 = () => ({ iconName: "arrow-right", iconVersion: "v1" });
export class DatepickerHeaderComponent {
    constructor() {
        this.inputFocus = new EventEmitter();
    }
    onInputFocus() {
        this.inputFocus.emit();
    }
    static { this.ɵfac = function DatepickerHeaderComponent_Factory(t) { return new (t || DatepickerHeaderComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatepickerHeaderComponent, selectors: [["fusion-datepicker-header"]], inputs: { prefix: "prefix", isDisabled: "isDisabled", label: "label", open: "open" }, outputs: { inputFocus: "inputFocus" }, features: [i0.ɵɵProvidersFeature([{ provide: ControlContainer, useExisting: FormGroupDirective }])], decls: 8, vars: 10, consts: [[1, "is-datepicker-header", 3, "ngClass", "click"], [1, "lable-container"], [1, "lable-with-icon"], [3, "name"], [4, "ngIf"]], template: function DatepickerHeaderComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵlistener("click", function DatepickerHeaderComponent_Template_div_click_0_listener() { return ctx.onInputFocus(); });
            i0.ɵɵelementStart(1, "div", 1)(2, "div", 2);
            i0.ɵɵelement(3, "fusion-icon", 3);
            i0.ɵɵelementStart(4, "span");
            i0.ɵɵtemplate(5, DatepickerHeaderComponent_span_5_Template, 2, 1, "span", 4);
            i0.ɵɵtext(6);
            i0.ɵɵelementEnd()();
            i0.ɵɵelement(7, "fusion-icon", 3);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(5, _c0, ctx.isDisabled, ctx.open));
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("name", i0.ɵɵpureFunction0(8, _c1));
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.prefix);
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(ctx.label);
            i0.ɵɵadvance();
            i0.ɵɵproperty("name", i0.ɵɵpureFunction0(9, _c2));
        } }, dependencies: [i1.NgClass, i1.NgIf, i2.IconComponent], styles: ["[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   .lable-container[_ngcontent-%COMP%]   .lable-with-icon[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:700}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   .lable-container[_ngcontent-%COMP%]   .lable-with-icon[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}[_nghost-%COMP%]{line-height:20px}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]{padding:10px 12px;width:250px;cursor:pointer}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   fusion-icon[class^=calendar-2][_ngcontent-%COMP%]     svg{width:14px;height:14px}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   fusion-icon[class^=calendar-2][_ngcontent-%COMP%]     svg *{fill:var(--light-color-800, #678099)}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   fusion-icon[class^=arrow-right][_ngcontent-%COMP%]     svg{height:8px;width:5px;transform:rotate(90deg)}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   fusion-icon[class^=arrow-right][_ngcontent-%COMP%]     svg *{fill:var(--light-color-800, #678099)}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   .lable-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]   .lable-container[_ngcontent-%COMP%]   .lable-with-icon[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-block;line-height:15px;vertical-align:text-top;margin-left:5px}[_nghost-%COMP%]   .is-datepicker-header[_ngcontent-%COMP%]:not(.opened):hover{background-color:var(--light-color-100, #F9FAFB);line-height:19px}[_nghost-%COMP%]   .is-datepicker-header.opened[_ngcontent-%COMP%]{border-top:2px solid var(--primary-color, #3091F6);padding-top:8px}[_nghost-%COMP%]   .is-datepicker-header.opened[_ngcontent-%COMP%]   fusion-icon[class^=arrow-right][_ngcontent-%COMP%]     svg{height:8px;width:5px;transform:rotate(270deg)}[_nghost-%COMP%]   .is-datepicker-header.opened[_ngcontent-%COMP%]   fusion-icon[class^=arrow-right][_ngcontent-%COMP%]     svg *{fill:var(--light-color-800, #678099)}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatepickerHeaderComponent, [{
        type: Component,
        args: [{ selector: 'fusion-datepicker-header', providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], template: "<div class=\"is-datepicker-header\"\n     (click)=\"onInputFocus()\"\n     [ngClass]=\"{'is-disabled': isDisabled, opened: open}\">\n  <div class=\"lable-container\">\n    <div class=\"lable-with-icon\">\n      <fusion-icon [name]=\"{iconName: 'calendar-2', iconVersion: 'v2'}\"></fusion-icon>\n      <span><span *ngIf=\"prefix\">{{prefix}}: </span>{{label}}</span>\n    </div>\n    <fusion-icon [name]=\"{iconName: 'arrow-right', iconVersion: 'v1'}\"></fusion-icon>\n  </div>\n</div>\n", styles: [":host .is-datepicker-header .lable-container .lable-with-icon>span{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:700}:host .is-datepicker-header .lable-container .lable-with-icon>span span{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}:host{line-height:20px}:host .is-datepicker-header{padding:10px 12px;width:250px;cursor:pointer}:host .is-datepicker-header fusion-icon[class^=calendar-2] ::ng-deep svg{width:14px;height:14px}:host .is-datepicker-header fusion-icon[class^=calendar-2] ::ng-deep svg *{fill:var(--light-color-800, #678099)}:host .is-datepicker-header fusion-icon[class^=arrow-right] ::ng-deep svg{height:8px;width:5px;transform:rotate(90deg)}:host .is-datepicker-header fusion-icon[class^=arrow-right] ::ng-deep svg *{fill:var(--light-color-800, #678099)}:host .is-datepicker-header .lable-container{display:flex;align-items:center;justify-content:space-between}:host .is-datepicker-header .lable-container .lable-with-icon>span{display:inline-block;line-height:15px;vertical-align:text-top;margin-left:5px}:host .is-datepicker-header:not(.opened):hover{background-color:var(--light-color-100, #F9FAFB);line-height:19px}:host .is-datepicker-header.opened{border-top:2px solid var(--primary-color, #3091F6);padding-top:8px}:host .is-datepicker-header.opened fusion-icon[class^=arrow-right] ::ng-deep svg{height:8px;width:5px;transform:rotate(270deg)}:host .is-datepicker-header.opened fusion-icon[class^=arrow-right] ::ng-deep svg *{fill:var(--light-color-800, #678099)}\n"] }]
    }], null, { prefix: [{
            type: Input
        }], isDisabled: [{
            type: Input
        }], label: [{
            type: Input
        }], open: [{
            type: Input
        }], inputFocus: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DatepickerHeaderComponent, { className: "DatepickerHeaderComponent", filePath: "datepicker-header/datepicker-header.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci1oZWFkZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4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