import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import { ChipFiltersBaseComponent } from '@ironsource/fusion-ui/components/chip-filters/common/base';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from '@ironsource/fusion-ui/components/chip-filter';
import { ChipFilterModule } from '@ironsource/fusion-ui/components/chip-filter';
import * as i3 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import * as i4 from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import * as i5 from '@ironsource/fusion-ui/components/dropdown/v3';
import { DropdownModule } from '@ironsource/fusion-ui/components/dropdown/v3';

const _c0 = (a0, a2) => ({ id: a0, mode: "add", disabled: a2 });
function ChipFiltersComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "fusion-chip-filter", 2);
    i0.ɵɵpipe(2, "async");
    i0.ɵɵelementStart(3, "div", 3)(4, "span");
    i0.ɵɵelement(5, "fusion-icon", 4);
    i0.ɵɵtext(6, " Add filters ");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(7, "div", 5, 6);
    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, _c0, 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);
} }
const _c1 = ["*"];
class ChipFiltersComponent extends ChipFiltersBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵChipFiltersComponent_BaseFactory; return function ChipFiltersComponent_Factory(t) { return (ɵChipFiltersComponent_BaseFactory || (ɵChipFiltersComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ChipFiltersComponent)))(t || ChipFiltersComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChipFiltersComponent, selectors: [["fusion-chip-filters"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls: 4, vars: 4, consts: [[1, "chip-filters-container", 2, "color", "#1a7f37"], [4, "ngIf"], [3, "isDynamicContent", "testId", "configuration"], [1, "fu-chip-content"], [3, "name"], [1, "filter-element"], ["addFilter", ""], [3, "testId", "optionsTitle", "search", "options", "formControl"]], template: function ChipFiltersComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵprojection(1);
            i0.ɵɵtemplate(2, ChipFiltersComponent_ng_container_2_Template, 11, 16, "ng-container", 1);
            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: "v3/chip-filters.component.ts", lineNumber: 10 }); })();

class ChipFiltersModule {
    static { this.ɵfac = function ChipFiltersModule_Factory(t) { return new (t || ChipFiltersModule)(); }; }
    static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ChipFiltersModule }); }
    static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, ChipFilterModule, IconModule, ReactiveFormsModule, DropdownModule] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChipFiltersModule, [{
        type: NgModule,
        args: [{
                declarations: [ChipFiltersComponent],
                exports: [ChipFiltersComponent],
                imports: [CommonModule, ChipFilterModule, IconModule, ReactiveFormsModule, DropdownModule]
            }]
    }], null, null); })();
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ChipFiltersModule, { declarations: [ChipFiltersComponent], imports: [CommonModule, ChipFilterModule, IconModule, ReactiveFormsModule, DropdownModule], exports: [ChipFiltersComponent] }); })();

/**
 * Generated bundle index. Do not edit.
 */

export { ChipFiltersComponent, ChipFiltersModule };
//# sourceMappingURL=ironsource-fusion-ui-components-chip-filters.mjs.map
