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

const _c0 = (a0, a2) => ({ id: a0, mode: "add", disabled: a2 });
function ChipFiltersV4Component_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 ChipFiltersV4Component extends ChipFiltersBaseComponent {
    constructor() {
        super(...arguments);
        this.addFilterIcon = 'ph/plus';
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵChipFiltersV4Component_BaseFactory; return function ChipFiltersV4Component_Factory(t) { return (ɵChipFiltersV4Component_BaseFactory || (ɵChipFiltersV4Component_BaseFactory = i0.ɵɵgetInheritedFactory(ChipFiltersV4Component)))(t || ChipFiltersV4Component); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChipFiltersV4Component, selectors: [["fusion-chip-filters"]], hostAttrs: [1, "fusion-v4"], standalone: true, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], 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 ChipFiltersV4Component_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵprojection(1);
            i0.ɵɵtemplate(2, ChipFiltersV4Component_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: [CommonModule, i1.NgIf, i1.AsyncPipe, ReactiveFormsModule, i2.NgControlStatus, i2.FormControlDirective, IconModule, i3.IconComponent, ChipFilterComponent, DropdownComponent], styles: [".fusion-v4[_ngcontent-%COMP%]{--spacing-tockenset: 0px;--spacing-25: 2px;--spacing-50: 4px;--spacing-75: 6px;--spacing-100: 8px;--spacing-125: 10px;--spacing-150: 12px;--spacing-200: 16px;--spacing-250: 20px;--spacing-300: 24px;--spacing-400: 32px;--spacing-500: 40px;--spacing-600: 48px;--spacing-700: 56px;--spacing-800: 64px;--spacing-900: 72px;--spacing-1000: 80px}[_nghost-%COMP%]{margin:0;padding:0;display:inline-flex}[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-50, 4px)}[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]   .fu-add-filter[_ngcontent-%COMP%]{order:100}[_nghost-%COMP%]   .chip-filters-container[_ngcontent-%COMP%]   .fu-add-filter[_ngcontent-%COMP%]   .fu-chip-content[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;gap:4px}[_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(ChipFiltersV4Component, [{
        type: Component,
        args: [{ selector: 'fusion-chip-filters', standalone: true, imports: [CommonModule, ReactiveFormsModule, IconModule, ChipFilterComponent, DropdownComponent], host: { class: 'fusion-v4' }, 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: [".fusion-v4{--spacing-tockenset: 0px;--spacing-25: 2px;--spacing-50: 4px;--spacing-75: 6px;--spacing-100: 8px;--spacing-125: 10px;--spacing-150: 12px;--spacing-200: 16px;--spacing-250: 20px;--spacing-300: 24px;--spacing-400: 32px;--spacing-500: 40px;--spacing-600: 48px;--spacing-700: 56px;--spacing-800: 64px;--spacing-900: 72px;--spacing-1000: 80px}:host{margin:0;padding:0;display:inline-flex}:host .chip-filters-container{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-50, 4px)}:host .chip-filters-container .fu-add-filter{order:100}:host .chip-filters-container .fu-add-filter .fu-chip-content>span{display:flex;gap:4px}: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(ChipFiltersV4Component, { className: "ChipFiltersV4Component", filePath: "chip-filters-v4.component.ts", lineNumber: 18 }); })();

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

export { ChipFiltersV4Component as ChipFiltersComponent };
//# sourceMappingURL=ironsource-fusion-ui-components-chip-filters-v4.mjs.map
