import { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, Input, Output, TemplateRef, ViewChild, ChangeDetectorRef } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DomSanitizer } from '@angular/platform-browser';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import { ApiBase } from '@ironsource/fusion-ui/components/api-base';
import { Subject } from 'rxjs';
import { takeUntil, tap } from 'rxjs/operators';
import { isNullOrUndefined, isObject, isString } from '@ironsource/fusion-ui/utils';
import { DEFAULT_IMAGE_HOLDER, TRIGGER_ICON } from './top-filter-trigger.config';
import { TooltipModule } from '@ironsource/fusion-ui/components/tooltip';
import * as i0 from "@angular/core";
import * as i1 from "@angular/platform-browser";
import * as i2 from "@angular/common";
import * as i3 from "@ironsource/fusion-ui/components/icon/v1";
import * as i4 from "@ironsource/fusion-ui/components/tooltip";
const _c0 = ["ref"];
function TopFilterTriggerComponent_ng_template_0_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 3);
} if (rf & 2) {
    i0.ɵɵnextContext(2);
    const _r4 = i0.ɵɵreference(5);
    i0.ɵɵproperty("ngTemplateOutlet", _r4);
} }
function TopFilterTriggerComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TopFilterTriggerComponent_ng_template_0_ng_container_0_Template, 1, 1, "ng-container", 1);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r0.apiBase);
} }
function TopFilterTriggerComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 3);
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r4 = i0.ɵɵreference(5);
    i0.ɵɵproperty("ngTemplateOutlet", _r4);
} }
function TopFilterTriggerComponent_ng_template_4_fusion_icon_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 16);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("name", ctx_r6.icon);
} }
function TopFilterTriggerComponent_ng_template_4_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("fusionTooltip", ctx_r7.selectedLabel);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r7.selectedLabel);
} }
function TopFilterTriggerComponent_ng_template_4_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r8.placeholder);
} }
function TopFilterTriggerComponent_ng_template_4_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 18);
    i0.ɵɵtext(1, "*");
    i0.ɵɵelementEnd();
} }
function TopFilterTriggerComponent_ng_template_4_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("fusionTooltip", ctx_r10.helper);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r10.helper);
} }
function TopFilterTriggerComponent_ng_template_4_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r11.error);
} }
function TopFilterTriggerComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 4);
    i0.ɵɵelement(1, "div", 5);
    i0.ɵɵtemplate(2, TopFilterTriggerComponent_ng_template_4_fusion_icon_2_Template, 1, 1, "fusion-icon", 6);
    i0.ɵɵelementStart(3, "div", 7)(4, "div", 8);
    i0.ɵɵtemplate(5, TopFilterTriggerComponent_ng_template_4_div_5_Template, 2, 2, "div", 9)(6, TopFilterTriggerComponent_ng_template_4_div_6_Template, 2, 1, "div", 10)(7, TopFilterTriggerComponent_ng_template_4_div_7_Template, 2, 0, "div", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(8, TopFilterTriggerComponent_ng_template_4_div_8_Template, 2, 2, "div", 12)(9, TopFilterTriggerComponent_ng_template_4_div_9_Template, 2, 1, "div", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "div", 14);
    i0.ɵɵelement(11, "fusion-icon", 15);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("fu-loading", ctx_r3.loading);
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("background-image", !ctx_r3.loading ? ctx_r3.appImage : "");
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.icon);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r3.selectedLabel);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !ctx_r3.selectedLabel && ctx_r3.placeholder);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.required);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.helper && !ctx_r3.error);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.error);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("name", ctx_r3.triggerIcon);
} }
const _c1 = [[["", 8, "filter-element"]]];
const _c2 = [".filter-element"];
export class TopFilterTriggerComponent {
    set label(value) {
        this.selectedLabel = value;
    }
    get appImage() {
        return this.sanitizer.bypassSecurityTrustStyle(this.imageApp ? `url(${this.imageApp})` : this.imageHolderBack);
    }
    constructor(sanitizer, cdr) {
        this.sanitizer = sanitizer;
        this.cdr = cdr;
        this.placeholder = 'Select';
        this.selectedChange = new EventEmitter();
        /** @internal */
        this.triggerIcon = TRIGGER_ICON;
        /** @internal */
        this.selectedLabel = '';
        this.onDestroy$ = new Subject();
        this.imageHolderBack = DEFAULT_IMAGE_HOLDER;
    }
    ngOnInit() {
        if (this.apiBase) {
            this.apiBase.templateRef = this.ref;
            this.apiBase.selectedTypeObject = true;
        }
    }
    ngAfterViewInit() {
        this.setValueSelectedListener();
    }
    ngOnDestroy() {
        this.onDestroy$.next();
        this.onDestroy$.complete();
    }
    setValueSelectedListener() {
        this.apiBase
            ?.valueSelected()
            .pipe(takeUntil(this.onDestroy$), tap(this.resetSelected.bind(this)))
            .subscribe(this.setSelected.bind(this));
    }
    resetSelected() {
        this.selectedLabel = this.placeholder;
        this.imageApp = null;
        this.icon = null;
        this.helper = null;
    }
    setSelected(selected) {
        if (!isNullOrUndefined(selected.value) && isObject(selected.value)) {
            const selectedItem = selected.value;
            this.selectedLabel = selectedItem.displayText || selectedItem.title;
            this.imageApp = selectedItem.image;
            this.icon = selectedItem.icon;
            this.helper = selectedItem.subText?.text;
        }
        else {
            this.selectedLabel = selected.value;
            if (isString(selected.value) && !selected.value.toLowerCase().startsWith('all ')) {
                this.helper =
                    selected.partialSelect.firstSelected.title ??
                        selected.partialSelect.firstSelected.displayText + ' and ' + (selected.selectedCount - 1) + ' more';
            }
            else {
                this.helper =
                    !isNullOrUndefined(selected.selectedCount) && selected.selectedCount !== 0
                        ? `${selected.selectedCount} selected`
                        : null;
            }
        }
        this.cdr.detectChanges();
        this.selectedChange.emit(selected);
    }
    static { this.ɵfac = function TopFilterTriggerComponent_Factory(t) { return new (t || TopFilterTriggerComponent)(i0.ɵɵdirectiveInject(i1.DomSanitizer), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TopFilterTriggerComponent, selectors: [["fusion-top-filter-trigger"]], contentQueries: function TopFilterTriggerComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
            i0.ɵɵcontentQuery(dirIndex, ApiBase, 7);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.apiBase = _t.first);
        } }, viewQuery: function TopFilterTriggerComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 7);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ref = _t.first);
        } }, inputs: { placeholder: "placeholder", label: "label", required: "required", helper: "helper", error: "error", icon: "icon", imageApp: "imageApp", loading: "loading" }, outputs: { selectedChange: "selectedChange" }, standalone: true, features: [i0.ɵɵStandaloneFeature], ngContentSelectors: _c2, decls: 6, vars: 1, consts: [["ref", ""], [3, "ngTemplateOutlet", 4, "ngIf"], ["chipComponent", ""], [3, "ngTemplateOutlet"], [1, "fu-top-filter-trigger-wrapper"], [1, "fu-app-image"], ["class", "fu-icon", 3, "name", 4, "ngIf"], [1, "fu-content"], [1, "fu-label"], ["class", "truncate", 3, "fusionTooltip", 4, "ngIf"], [4, "ngIf"], ["class", "fu-required", 4, "ngIf"], ["class", "fu-helper truncate", 3, "fusionTooltip", 4, "ngIf"], ["class", "fu-error", 4, "ngIf"], [1, "fu-trigger"], [1, "fu-trigger-icon", 3, "name"], [1, "fu-icon", 3, "name"], [1, "truncate", 3, "fusionTooltip"], [1, "fu-required"], [1, "fu-helper", "truncate", 3, "fusionTooltip"], [1, "fu-error"]], template: function TopFilterTriggerComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef(_c1);
            i0.ɵɵtemplate(0, TopFilterTriggerComponent_ng_template_0_Template, 1, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
            i0.ɵɵprojection(2);
            i0.ɵɵtemplate(3, TopFilterTriggerComponent_ng_container_3_Template, 1, 1, "ng-container", 1)(4, TopFilterTriggerComponent_ng_template_4_Template, 12, 11, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", !ctx.apiBase);
        } }, dependencies: [CommonModule, i2.NgIf, i2.NgTemplateOutlet, IconModule, i3.IconComponent, TooltipModule, i4.TooltipDirective], styles: ["@font-face{font-family:NHaasGroteskDSPro;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.ttf) format(\"truetype\")}@font-face{font-family:NHaasGroteskDSPro-65Md;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue-Medium;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.ttf) format(\"truetype\")}.font-heading-6[_ngcontent-%COMP%], .font-heading-5[_ngcontent-%COMP%], .font-heading-4[_ngcontent-%COMP%], .font-heading-3[_ngcontent-%COMP%], .font-heading-2[_ngcontent-%COMP%], .font-heading-1[_ngcontent-%COMP%]{font-family:NHaasGroteskDSPro,sans-serif}.font-heading-1[_ngcontent-%COMP%]{font-size:60px}.font-heading-2[_ngcontent-%COMP%]{font-size:32px}.font-heading-3[_ngcontent-%COMP%]{font-size:22px}.font-heading-4[_ngcontent-%COMP%]{font-size:18px}.font-heading-5[_ngcontent-%COMP%]{font-size:15px}.font-heading-6[_ngcontent-%COMP%]{font-size:13px}.font-heading-label[_ngcontent-%COMP%]{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;letter-spacing:.25px}.font-caption[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-helper[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-error[_ngcontent-%COMP%], .font-bodyXSmall[_ngcontent-%COMP%], .font-bodySmall[_ngcontent-%COMP%], .font-bodyMedium[_ngcontent-%COMP%], .font-bodyLarge[_ngcontent-%COMP%]{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}.font-bodyXSmallStrong[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-label[_ngcontent-%COMP%], .font-bodySmallStrong[_ngcontent-%COMP%], .font-bodyMediumStrong[_ngcontent-%COMP%], .font-bodyLargeStrong[_ngcontent-%COMP%]{font-family:HelveticaNeue-Medium,helvetica,sans-serif;line-height:1.5}.font-bodyLarge[_ngcontent-%COMP%], .font-bodyLargeStrong[_ngcontent-%COMP%]{font-size:16px}.font-bodyMedium[_ngcontent-%COMP%], .font-bodyMediumStrong[_ngcontent-%COMP%]{font-size:14px}.font-bodySmall[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-label[_ngcontent-%COMP%], .font-bodySmallStrong[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-helper[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-error[_ngcontent-%COMP%], .font-bodyXSmall[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.24px}.font-bodyXSmallStrong[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.24px}.font-caption[_ngcontent-%COMP%]{font-size:11px}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-helper.truncate[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-error.truncate[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-label[_ngcontent-%COMP%]   .truncate[_ngcontent-%COMP%]{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-app-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-app-image[_ngcontent-%COMP%]{mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C2 0 0 2 0 10s2 10 10 10 10-2 10-10S18 0 10 0Zm0 0' fill='%23a5a5a5'/%3E%3C/svg%3E\");-webkit-mask-size:cover;mask-size:cover}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}[_nghost-%COMP%]{display:inline-block}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%]:has(.fu-loading){pointer-events:none}[_nghost-%COMP%]:has(.fu-loading):hover{cursor:default}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]{width:287px;height:64px;background-color:var(--fu-white, #ffffff);border-width:0px 1px 1px 1px;border-style:solid;border-color:var(--fu-light-400, #DDDFE1);display:flex;flex-direction:row;align-items:center;padding:12px 16px 12px 12px;gap:8px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-app-image[_ngcontent-%COMP%]{margin:0;width:32px;height:32px;background-repeat:no-repeat;background-position:center;background-size:cover}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-app-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:32px;height:32px;background-color:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   fusion-icon.fu-icon[_ngcontent-%COMP%]{width:24px;height:24px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   fusion-icon.fu-icon[_ngcontent-%COMP%]     svg{width:24px;height:24px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   fusion-icon.fu-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-900, #7B838C)}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-label[_ngcontent-%COMP%]{line-height:16px;display:flex;gap:4px;color:var(--fu-black-900, #41454D)}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-label[_ngcontent-%COMP%]   .truncate[_ngcontent-%COMP%]{max-width:140px;width:unset}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-label[_ngcontent-%COMP%]   .fu-required[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-helper[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-error[_ngcontent-%COMP%]{line-height:14px;color:var(--fu-light-900, #7B838C)}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-helper.truncate[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-error.truncate[_ngcontent-%COMP%]{max-width:180px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   .fu-error[_ngcontent-%COMP%]{color:var(--fu-negative-700, #DA564F)}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-trigger[_ngcontent-%COMP%]{width:24px;height:24px;background-color:var(--fu-light-200, #EDEFF0);border-radius:16px;margin-left:auto;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-trigger[_ngcontent-%COMP%]   fusion-icon.fu-trigger-icon[_ngcontent-%COMP%]{width:16px;height:16px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-trigger[_ngcontent-%COMP%]   fusion-icon.fu-trigger-icon[_ngcontent-%COMP%]     svg{width:16px;height:16px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper[_ngcontent-%COMP%]   .fu-trigger[_ngcontent-%COMP%]   fusion-icon.fu-trigger-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-900, #7B838C)}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper.fu-loading[_ngcontent-%COMP%]   .fu-app-image[_ngcontent-%COMP%]{width:100%;animation:_ngcontent-%COMP%_shine-animation 1s linear infinite alternate;width:32px;height:32px;mask:none;border-radius:8px}@keyframes _ngcontent-%COMP%_shine-animation{0%{background-color:var(--fu-light-300, #E5E7E9)}to{background-color:var(--fu-light-100, #F1F3F4)}}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper.fu-loading[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]{width:100%;height:16px;border-radius:8px;animation:_ngcontent-%COMP%_shine-animation 1s linear infinite alternate;width:218px}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper.fu-loading[_ngcontent-%COMP%]   .fu-content[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:none}@keyframes _ngcontent-%COMP%_shine-animation{0%{background-color:#e5e7e9}to{background-color:#f1f3f4}}[_nghost-%COMP%]   .fu-top-filter-trigger-wrapper.fu-loading[_ngcontent-%COMP%]   .fu-icon[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-top-filter-trigger-wrapper.fu-loading[_ngcontent-%COMP%]   .fu-trigger[_ngcontent-%COMP%]{display:none}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TopFilterTriggerComponent, [{
        type: Component,
        args: [{ selector: 'fusion-top-filter-trigger', standalone: true, imports: [CommonModule, IconModule, TooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #ref>\n    <ng-container *ngIf=\"apiBase\" [ngTemplateOutlet]=\"chipComponent\"></ng-container>\n</ng-template>\n\n<ng-content select=\".filter-element\"></ng-content>\n\n<ng-container *ngIf=\"!apiBase\" [ngTemplateOutlet]=\"chipComponent\"></ng-container>\n\n<ng-template #chipComponent>\n    <div class=\"fu-top-filter-trigger-wrapper\" [class.fu-loading]=\"loading\">\n        <div class=\"fu-app-image\" [style.background-image]=\"!loading ? appImage : ''\"></div>\n        <fusion-icon *ngIf=\"icon\" class=\"fu-icon\" [name]=\"icon\"></fusion-icon>\n        <div class=\"fu-content\">\n            <div class=\"fu-label\">\n                <div *ngIf=\"selectedLabel\" class=\"truncate\" [fusionTooltip]=\"selectedLabel\">{{selectedLabel}}</div>\n                <div *ngIf=\"!selectedLabel && placeholder\">{{placeholder}}</div>\n                <div *ngIf=\"required\" class=\"fu-required\">*</div>\n            </div>\n            <div *ngIf=\"helper && !error\" class=\"fu-helper truncate\" [fusionTooltip]=\"helper\">{{helper}}</div>\n            <div *ngIf=\"error\" class=\"fu-error\">{{error}}</div>\n        </div>\n        <div class=\"fu-trigger\">\n            <fusion-icon class=\"fu-trigger-icon\" [name]=\"triggerIcon\"></fusion-icon>\n        </div>\n    </div>\n</ng-template>\n", styles: ["@font-face{font-family:NHaasGroteskDSPro;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.ttf) format(\"truetype\")}@font-face{font-family:NHaasGroteskDSPro-65Md;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue-Medium;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.ttf) format(\"truetype\")}.font-heading-6,.font-heading-5,.font-heading-4,.font-heading-3,.font-heading-2,.font-heading-1{font-family:NHaasGroteskDSPro,sans-serif}.font-heading-1{font-size:60px}.font-heading-2{font-size:32px}.font-heading-3{font-size:22px}.font-heading-4{font-size:18px}.font-heading-5{font-size:15px}.font-heading-6{font-size:13px}.font-heading-label{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;letter-spacing:.25px}.font-caption,:host .fu-top-filter-trigger-wrapper .fu-content .fu-helper,:host .fu-top-filter-trigger-wrapper .fu-content .fu-error,.font-bodyXSmall,.font-bodySmall,.font-bodyMedium,.font-bodyLarge{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}.font-bodyXSmallStrong,:host .fu-top-filter-trigger-wrapper .fu-content .fu-label,.font-bodySmallStrong,.font-bodyMediumStrong,.font-bodyLargeStrong{font-family:HelveticaNeue-Medium,helvetica,sans-serif;line-height:1.5}.font-bodyLarge,.font-bodyLargeStrong{font-size:16px}.font-bodyMedium,.font-bodyMediumStrong{font-size:14px}.font-bodySmall{font-size:13px;letter-spacing:.24px}:host .fu-top-filter-trigger-wrapper .fu-content .fu-label,.font-bodySmallStrong{font-size:13px;letter-spacing:.24px}:host .fu-top-filter-trigger-wrapper .fu-content .fu-helper,:host .fu-top-filter-trigger-wrapper .fu-content .fu-error,.font-bodyXSmall{font-size:12px;letter-spacing:.24px}.font-bodyXSmallStrong{font-size:12px;letter-spacing:.24px}.font-caption{font-size:11px}:host *{box-sizing:border-box}:host .fu-top-filter-trigger-wrapper .fu-content .fu-helper.truncate,:host .fu-top-filter-trigger-wrapper .fu-content .fu-error.truncate,:host .fu-top-filter-trigger-wrapper .fu-content .fu-label .truncate{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}:host .fu-top-filter-trigger-wrapper .fu-app-image img,:host .fu-top-filter-trigger-wrapper .fu-app-image{mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C2 0 0 2 0 10s2 10 10 10 10-2 10-10S18 0 10 0Zm0 0' fill='%23a5a5a5'/%3E%3C/svg%3E\");-webkit-mask-size:cover;mask-size:cover}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}:host{display:inline-block}:host:hover{cursor:pointer}:host:has(.fu-loading){pointer-events:none}:host:has(.fu-loading):hover{cursor:default}:host .fu-top-filter-trigger-wrapper{width:287px;height:64px;background-color:var(--fu-white, #ffffff);border-width:0px 1px 1px 1px;border-style:solid;border-color:var(--fu-light-400, #DDDFE1);display:flex;flex-direction:row;align-items:center;padding:12px 16px 12px 12px;gap:8px}:host .fu-top-filter-trigger-wrapper .fu-app-image{margin:0;width:32px;height:32px;background-repeat:no-repeat;background-position:center;background-size:cover}:host .fu-top-filter-trigger-wrapper .fu-app-image img{width:32px;height:32px;background-color:var(--fu-white, #ffffff)}:host .fu-top-filter-trigger-wrapper fusion-icon.fu-icon{width:24px;height:24px}:host .fu-top-filter-trigger-wrapper fusion-icon.fu-icon ::ng-deep svg{width:24px;height:24px}:host .fu-top-filter-trigger-wrapper fusion-icon.fu-icon ::ng-deep svg *{fill:var(--fu-light-900, #7B838C)}:host .fu-top-filter-trigger-wrapper .fu-content{display:flex;flex-direction:column;gap:4px}:host .fu-top-filter-trigger-wrapper .fu-content .fu-label{line-height:16px;display:flex;gap:4px;color:var(--fu-black-900, #41454D)}:host .fu-top-filter-trigger-wrapper .fu-content .fu-label .truncate{max-width:140px;width:unset}:host .fu-top-filter-trigger-wrapper .fu-content .fu-label .fu-required{font-size:24px}:host .fu-top-filter-trigger-wrapper .fu-content .fu-helper,:host .fu-top-filter-trigger-wrapper .fu-content .fu-error{line-height:14px;color:var(--fu-light-900, #7B838C)}:host .fu-top-filter-trigger-wrapper .fu-content .fu-helper.truncate,:host .fu-top-filter-trigger-wrapper .fu-content .fu-error.truncate{max-width:180px}:host .fu-top-filter-trigger-wrapper .fu-content .fu-error{color:var(--fu-negative-700, #DA564F)}:host .fu-top-filter-trigger-wrapper .fu-trigger{width:24px;height:24px;background-color:var(--fu-light-200, #EDEFF0);border-radius:16px;margin-left:auto;display:flex;align-items:center;justify-content:center}:host .fu-top-filter-trigger-wrapper .fu-trigger fusion-icon.fu-trigger-icon{width:16px;height:16px}:host .fu-top-filter-trigger-wrapper .fu-trigger fusion-icon.fu-trigger-icon ::ng-deep svg{width:16px;height:16px}:host .fu-top-filter-trigger-wrapper .fu-trigger fusion-icon.fu-trigger-icon ::ng-deep svg *{fill:var(--fu-light-900, #7B838C)}:host .fu-top-filter-trigger-wrapper.fu-loading .fu-app-image{width:100%;animation:shine-animation 1s linear infinite alternate;width:32px;height:32px;mask:none;border-radius:8px}@keyframes shine-animation{0%{background-color:var(--fu-light-300, #E5E7E9)}to{background-color:var(--fu-light-100, #F1F3F4)}}:host .fu-top-filter-trigger-wrapper.fu-loading .fu-content{width:100%;height:16px;border-radius:8px;animation:shine-animation 1s linear infinite alternate;width:218px}:host .fu-top-filter-trigger-wrapper.fu-loading .fu-content div{display:none}@keyframes shine-animation{0%{background-color:#e5e7e9}to{background-color:#f1f3f4}}:host .fu-top-filter-trigger-wrapper.fu-loading .fu-icon,:host .fu-top-filter-trigger-wrapper.fu-loading .fu-trigger{display:none}\n"] }]
    }], () => [{ type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }], { apiBase: [{
            type: ContentChild,
            args: [ApiBase, { static: true }]
        }], ref: [{
            type: ViewChild,
            args: ['ref', { static: true }]
        }], placeholder: [{
            type: Input
        }], label: [{
            type: Input
        }], required: [{
            type: Input
        }], helper: [{
            type: Input
        }], error: [{
            type: Input
        }], icon: [{
            type: Input
        }], imageApp: [{
            type: Input
        }], loading: [{
            type: Input
        }], selectedChange: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TopFilterTriggerComponent, { className: "TopFilterTriggerComponent", filePath: "v3/top-filter-trigger.component.ts", lineNumber: 35 }); })();
//# sourceMappingURL=data:application/json;base64, 