import { Input, Output, Component, EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "primeng-lts/listbox";
import * as i2 from "@angular/forms";
import * as i3 from "primeng-lts/api";
import * as i4 from "@angular/common";
import * as i5 from "primeng-lts/tooltip";
import * as i6 from "../pipes/al-prefix-multiplier.pipe";
var _c0 = function (a0) { return { "font-size": a0 }; };
function AlStateFilterComponent_ng_template_1_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "i", 7);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("ngClass", item_r1.value.iconClass)("ngStyle", i0.ɵɵpureFunction1(3, _c0, item_r1.value.iconSize ? item_r1.value.iconSize : null));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r1.value.icon, " ");
} }
function AlStateFilterComponent_ng_template_1_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 8);
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵclassMapInterpolate2("icon ", item_r1.value.iconClass, " ", item_r1.value.icon, "");
    i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(5, _c0, item_r1.value.iconSize ? item_r1.value.iconSize : null));
} }
function AlStateFilterComponent_ng_template_1_div_5_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "alPrefixMultiplier");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, item_r1.value.totalShowing));
} }
function AlStateFilterComponent_ng_template_1_div_5_ng_container_1_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1, "/");
    i0.ɵɵelementEnd();
} }
function AlStateFilterComponent_ng_template_1_div_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlStateFilterComponent_ng_template_1_div_5_ng_container_1_span_1_Template, 3, 3, "span", 11);
    i0.ɵɵtemplate(2, AlStateFilterComponent_ng_template_1_div_5_ng_container_1_span_2_Template, 2, 0, "span", 10);
    i0.ɵɵelementStart(3, "span", 12);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "alPrefixMultiplier");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.totalShowing !== undefined);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.totalShowing !== undefined);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, item_r1.value.total));
} }
function AlStateFilterComponent_ng_template_1_div_5_ng_container_2_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 16);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "alPrefixMultiplier");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵpropertyInterpolate2("pTooltip", "", item_r1.value.totalShowing, " ", item_r1.value.totalShowingText, "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 3, item_r1.value.totalShowing));
} }
function AlStateFilterComponent_ng_template_1_div_5_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1, "/");
    i0.ɵɵelementEnd();
} }
function AlStateFilterComponent_ng_template_1_div_5_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlStateFilterComponent_ng_template_1_div_5_ng_container_2_span_1_Template, 3, 5, "span", 14);
    i0.ɵɵtemplate(2, AlStateFilterComponent_ng_template_1_div_5_ng_container_2_span_2_Template, 2, 0, "span", 10);
    i0.ɵɵelementStart(3, "span", 15);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "alPrefixMultiplier");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.totalShowing !== undefined);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.totalShowing !== undefined);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate2("pTooltip", "", item_r1.value.total, " ", item_r1.value.totalText, "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 5, item_r1.value.total));
} }
function AlStateFilterComponent_ng_template_1_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9);
    i0.ɵɵtemplate(1, AlStateFilterComponent_ng_template_1_div_5_ng_container_1_Template, 6, 5, "ng-container", 10);
    i0.ɵɵtemplate(2, AlStateFilterComponent_ng_template_1_div_5_ng_container_2_Template, 6, 7, "ng-container", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var item_r1 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !item_r1.value.showToolTip);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.showToolTip);
} }
var _c1 = function (a0) { return { "item-active": a0 }; };
function AlStateFilterComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵtemplate(1, AlStateFilterComponent_ng_template_1_i_1_Template, 2, 5, "i", 3);
    i0.ɵɵtemplate(2, AlStateFilterComponent_ng_template_1_i_2_Template, 1, 7, "i", 4);
    i0.ɵɵelementStart(3, "span", 5);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, AlStateFilterComponent_ng_template_1_div_5_Template, 3, 2, "div", 6);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var item_r1 = ctx.$implicit;
    var ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.iconClass === "material-icons");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.iconClass !== "material-icons");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c1, ctx_r0.selectedState.label === item_r1.value.label));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r1.value.label);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r1.value.showTotal);
} }
var AlStateFilterComponent = /** @class */ (function () {
    function AlStateFilterComponent() {
        var _this = this;
        this.stateFilters = [];
        this.filterSelected = new EventEmitter();
        /*
        * State selected
        */
        this.selectState = function (event) {
            _this.filterSelected.emit(event);
        };
    }
    /** @nocollapse */ AlStateFilterComponent.ɵfac = function AlStateFilterComponent_Factory(t) { return new (t || AlStateFilterComponent)(); };
    /** @nocollapse */ AlStateFilterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlStateFilterComponent, selectors: [["al-state-filter"]], inputs: { selectedState: "selectedState", stateFilters: "stateFilters" }, outputs: { filterSelected: "filterSelected" }, decls: 2, vars: 2, consts: [[3, "options", "ngModel", "ngModelChange", "onChange"], ["pTemplate", "item"], ["data-cy", "state-filter-item", 1, "u-grid", "u-grid-nogutter", "u-items-center", "item-content"], ["class", "icon", 3, "ngClass", "ngStyle", 4, "ngIf"], [3, "class", "ngStyle", 4, "ngIf"], [1, "u-col", 3, "ngClass"], ["class", "u-self-end", 4, "ngIf"], [1, "icon", 3, "ngClass", "ngStyle"], [3, "ngStyle"], [1, "u-self-end"], [4, "ngIf"], ["class", "total-showing", 4, "ngIf"], [1, "show-total"], [1, "total-showing"], ["class", "u-flex-none u-pl-2", "class", "total-showing", "tooltipStyleClass", "tool-tip", 3, "pTooltip", 4, "ngIf"], ["tooltipStyleClass", "tool-tip", 1, "show-total", 3, "pTooltip"], ["tooltipStyleClass", "tool-tip", 1, "total-showing", 3, "pTooltip"]], template: function AlStateFilterComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "p-listbox", 0);
            i0.ɵɵlistener("ngModelChange", function AlStateFilterComponent_Template_p_listbox_ngModelChange_0_listener($event) { return ctx.selectedState = $event; })("onChange", function AlStateFilterComponent_Template_p_listbox_onChange_0_listener($event) { return ctx.selectState($event); });
            i0.ɵɵtemplate(1, AlStateFilterComponent_ng_template_1_Template, 6, 7, "ng-template", 1);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵproperty("options", ctx.stateFilters)("ngModel", ctx.selectedState);
        } }, directives: [i1.Listbox, i2.NgControlStatus, i2.NgModel, i3.PrimeTemplate, i4.NgIf, i4.NgClass, i4.NgStyle, i5.Tooltip], pipes: [i6.AlPrefixMultiplierPipe], styles: ["[_nghost-%COMP%]     .ui-listbox-list{border-bottom:1px solid #cbcbcb}[_nghost-%COMP%]     .ui-listbox-item.ui-state-highlight{background-color:#535353}.item-content[_ngcontent-%COMP%]{padding-left:34px;width:100%}.item-content[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{font-size:19px;margin-right:6px}.item-content[_ngcontent-%COMP%]   .total-showing[_ngcontent-%COMP%]{font-size:var(--ald-g-text-sm);font-weight:700}.item-content[_ngcontent-%COMP%]   .show-total[_ngcontent-%COMP%]{font-size:var(--ald-g-text-sm)}.item-content[_ngcontent-%COMP%]   .item-active[_ngcontent-%COMP%]{font-weight:700}"] });
    return AlStateFilterComponent;
}());
export { AlStateFilterComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlStateFilterComponent, [{
        type: Component,
        args: [{
                selector: 'al-state-filter',
                templateUrl: './al-state-filter.component.html',
                styleUrls: ['./al-state-filter.component.scss']
            }]
    }], null, { selectedState: [{
            type: Input
        }], stateFilters: [{
            type: Input
        }], filterSelected: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 