import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ChipFiltersBaseComponent } from '@ironsource/fusion-ui/components/chip-filters/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/chip-filter";
import * as i3 from "@ironsource/fusion-ui/components/icon/v1";
import * as i4 from "@angular/forms";
import * as i5 from "@ironsource/fusion-ui/components/dropdown/v3";
const _c0 = ["*"];
const _c1 = (a0, a1) => ({ id: a0, mode: "add", disabled: a1 });
function ChipFiltersComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "fusion-chip-filter", 3);
    i0.ɵɵpipe(2, "async");
    i0.ɵɵelementStart(3, "div", 4)(4, "span");
    i0.ɵɵelement(5, "fusion-icon", 5);
    i0.ɵɵtext(6, " Add filters ");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(7, "div", 6, 0);
    i0.ɵɵelement(9, "fusion-dropdown", 7);
    i0.ɵɵpipe(10, "async");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("isDynamicContent", true)("testId", ctx_r0.testId)("configuration", i0.ɵɵpureFunction2(13, _c1, ctx_r0.addFilterIndex, i0.ɵɵpipeBind1(2, 9, ctx_r0.disableAddFilter$)));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("name", ctx_r0.addFilterIcon);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("testId", ctx_r0.testId)("optionsTitle", ctx_r0.addFiltersTitle)("search", ctx_r0.isSearch)("options", i0.ɵɵpipeBind1(10, 11, ctx_r0.options$))("formControl", ctx_r0.addFilterControl);
} }
export class ChipFiltersComponent extends ChipFiltersBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵChipFiltersComponent_BaseFactory; return function ChipFiltersComponent_Factory(__ngFactoryType__) { return (ɵChipFiltersComponent_BaseFactory || (ɵChipFiltersComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ChipFiltersComponent)))(__ngFactoryType__ || ChipFiltersComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChipFiltersComponent, selectors: [["fusion-chip-filters"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 4, vars: 4, consts: [["addFilter", ""], [1, "chip-filters-container", 2, "color", "#1a7f37"], [4, "ngIf"], [3, "isDynamicContent", "testId", "configuration"], [1, "fu-chip-content"], [3, "name"], [1, "filter-element"], [3, "testId", "optionsTitle", "search", "options", "formControl"]], template: function ChipFiltersComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 1);
            i0.ɵɵprojection(1);
            i0.ɵɵtemplate(2, ChipFiltersComponent_ng_container_2_Template, 11, 16, "ng-container", 2);
            i0.ɵɵpipe(3, "async");
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵattribute("data-testid", ctx.testId);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(3, 2, ctx.options$).length);
        } }, dependencies: [i1.NgIf, i2.ChipFilterComponent, i3.IconComponent, i4.NgControlStatus, i4.FormControlDirective, i5.DropdownComponent, i1.AsyncPipe], styles: ["[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:4px;padding:16px 24px;background-color:var(--fu-white, #ffffff);width:100%;min-height:64px;border-radius:8px}[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]   .fu-add-filter[_ngcontent-%COMP%]{order:100;min-width:112px}[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]   .fu-add-filter[_ngcontent-%COMP%]   .fu-chip-content[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;gap:3px}[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]   .fu-add-filter[_ngcontent-%COMP%]   .fu-chip-content[_ngcontent-%COMP%]   fusion-icon[_ngcontent-%COMP%]{width:16px;height:16px}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChipFiltersComponent, [{
        type: Component,
        args: [{ selector: 'fusion-chip-filters', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"chip-filters-container\" style=\"color: #1a7f37\"\n     [attr.data-testid]=\"testId\">\n    <ng-content></ng-content>\n    <ng-container *ngIf=\"(options$ | async).length\">\n        <fusion-chip-filter [isDynamicContent]=\"true\" [testId]=\"testId\"\n                            [configuration]=\"{id: addFilterIndex,mode:'add', disabled: (disableAddFilter$ | async)}\">\n            <div class=\"fu-chip-content\">\n                <span>\n                    <fusion-icon [name]=\"addFilterIcon\"></fusion-icon>\n                    Add filters\n                </span>\n            </div>\n            <div class=\"filter-element\" #addFilter>\n                <fusion-dropdown\n                    [testId]=\"testId\"\n                    [optionsTitle]=\"addFiltersTitle\"\n                    [search]=\"isSearch\"\n                    [options]=\"options$ | async\"\n                    [formControl]=\"addFilterControl\"\n                >\n                </fusion-dropdown>\n            </div>\n        </fusion-chip-filter>\n    </ng-container>\n</div>\n", styles: [":host .chip-filters-container{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:4px;padding:16px 24px;background-color:var(--fu-white, #ffffff);width:100%;min-height:64px;border-radius:8px}:host .chip-filters-container .fu-add-filter{order:100;min-width:112px}:host .chip-filters-container .fu-add-filter .fu-chip-content>span{display:flex;gap:3px}:host .chip-filters-container .fu-add-filter .fu-chip-content fusion-icon{width:16px;height:16px}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChipFiltersComponent, { className: "ChipFiltersComponent", filePath: "chip-filters.component.ts", lineNumber: 10 }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NvbnRhaW5lciAqbmdJZj1cIihvcHRpb25zJCB8IGFzeW5jKS5sZW5ndGhcIj5cbiAgICAgICAgPGZ1c2lvbi1jaGlwLWZpbHRlciBbaXNEeW5hbWljQ29udGVudF09XCJ0cnVlXCIgW3Rlc3RJZF09XCJ0ZXN0SWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtjb25maWd1cmF0aW9uXT1cIntpZDogYWRkRmlsdGVySW5kZXgsbW9kZTonYWRkJywgZGlzYWJsZWQ6IChkaXNhYmxlQWRkRmlsdGVyJCB8IGFzeW5jKX1cIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJmdS1jaGlwLWNvbnRlbnRcIj5cbiAgICAgICAgICAgICAgICA8c3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgPGZ1c2lvbi1pY29uIFtuYW1lXT1cImFkZEZpbHRlckljb25cIj48L2Z1c2lvbi1pY29uPlxuICAgICAgICAgICAgICAgICAgICBBZGQgZmlsdGVyc1xuICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZpbHRlci1lbGVtZW50XCIgI2FkZEZpbHRlcj5cbiAgICAgICAgICAgICAgICA8ZnVzaW9uLWRyb3Bkb3duXG4gICAgICAgICAgICAgICAgICAgIFt0ZXN0SWRdPVwidGVzdElkXCJcbiAgICAgICAgICAgICAgICAgICAgW29wdGlvbnNUaXRsZV09XCJhZGRGaWx0ZXJzVGl0bGVcIlxuICAgICAgICAgICAgICAgICAgICBbc2VhcmNoXT1cImlzU2VhcmNoXCJcbiAgICAgICAgICAgICAgICAgICAgW29wdGlvbnNdPVwib3B0aW9ucyQgfCBhc3luY1wiXG4gICAgICAgICAgICAgICAgICAgIFtmb3JtQ29udHJvbF09XCJhZGRGaWx0ZXJDb250cm9sXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPC9mdXNpb24tZHJvcGRvd24+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9mdXNpb24tY2hpcC1maWx0ZXI+XG4gICAgPC9uZy1jb250YWluZXI+XG48L2Rpdj5cbiJdfQ==