import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import { TagBaseComponent } from '@ironsource/fusion-ui/components/tag/common/base';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import * as i3 from '@ironsource/fusion-ui/components/flag/v1';
import { FlagModule } from '@ironsource/fusion-ui/components/flag/v1';
import * as i4 from '@ironsource/fusion-ui/components/tooltip/v2';
import { TooltipModule } from '@ironsource/fusion-ui/components/tooltip/v2';
export * from '@ironsource/fusion-ui/components/tag/common/entities';

function TagComponent_fusion_icon_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 4);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("name", ctx_r0.icon);
} }
function TagComponent_fusion_flag_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-flag", 5);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("name", ctx_r1.flag);
} }
function TagComponent_ng_content_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵprojection(0, 0, ["*ngIf", "!title"]);
} }
function TagComponent_ng_container_5_fusion_icon_1_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-icon", 7);
    i0.ɵɵlistener("click", function TagComponent_ng_container_5_fusion_icon_1_Template_fusion_icon_click_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r6.closeClicked($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const closeIconName_r4 = i0.ɵɵnextContext().ngIf;
    i0.ɵɵproperty("name", closeIconName_r4);
} }
function TagComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, TagComponent_ng_container_5_fusion_icon_1_Template, 1, 1, "fusion-icon", 6);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.close);
} }
const _c0 = ["*"];
class TagComponent extends TagBaseComponent {
    ngOnInit() {
        super.ngOnInit();
        this.closeIconName$.next({ iconName: 'close', iconVersion: 'v2' });
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵTagComponent_BaseFactory; return function TagComponent_Factory(t) { return (ɵTagComponent_BaseFactory || (ɵTagComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TagComponent)))(t || TagComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TagComponent, selectors: [["fusion-tag"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 7, vars: 9, consts: [["class", "tag-icon", 3, "name", 4, "ngIf"], [3, "name", 4, "ngIf"], [1, "truncate", 3, "tooltipWidth", "fusionTooltip"], [4, "ngIf"], [1, "tag-icon", 3, "name"], [3, "name"], ["class", "icon-close", 3, "name", "click", 4, "ngIf"], [1, "icon-close", 3, "name", "click"]], template: function TagComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵtemplate(0, TagComponent_fusion_icon_0_Template, 1, 1, "fusion-icon", 0)(1, TagComponent_fusion_flag_1_Template, 1, 1, "fusion-flag", 1);
            i0.ɵɵelementStart(2, "span", 2);
            i0.ɵɵtext(3);
            i0.ɵɵtemplate(4, TagComponent_ng_content_4_Template, 1, 0, "ng-content", 3);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(5, TagComponent_ng_container_5_Template, 2, 1, "ng-container", 3);
            i0.ɵɵpipe(6, "async");
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.icon);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.flag);
            i0.ɵɵadvance();
            i0.ɵɵproperty("tooltipWidth", ctx.tooltipWidth)("fusionTooltip", ctx.tooltipContent);
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(ctx.title);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.title);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(6, 7, ctx.closeIconName$));
        } }, dependencies: [i1.NgIf, i2.IconComponent, i3.FlagComponent, i4.TooltipDirective, i1.AsyncPipe], styles: ["[_nghost-%COMP%]{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}.tag-filter[_nghost-%COMP%]{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;font-weight:400;letter-spacing:.25px}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]{box-sizing:border-box;display:inline-flex;align-items:center;height:24px;line-height:24px;min-width:54px;max-width:260px;padding:0 12px;border-radius:12px;border:solid 1px var(--fu-light-300, #e5e7e9);color:var(--fu-dark-700, #1d1c64);background-color:var(--fu-white, #ffffff)}[_nghost-%COMP%] > span[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]{margin-right:5px;margin-left:-3px;padding-top:1px}[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]     svg{width:10px;height:10px}[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]     svg *{fill:var(--fu-dark-200, #4c548e)}[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]{margin-left:6px;margin-right:-3px;padding-top:1px}[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]     svg{width:9px;height:9px}[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]     svg *{fill:var(--fu-light-700, #a9afb4)}[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]:hover     svg{width:9px;height:9px}[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]:hover     svg *{fill:var(--fu-light-900, #7b838c)}[_nghost-%COMP%]   fusion-flag[_ngcontent-%COMP%]{margin-right:4px;margin-left:-3px}[_nghost-%COMP%]:hover{border-color:var(--fu-light-700, #a9afb4);cursor:default}.disabled[_nghost-%COMP%]{border-color:var(--fu-light-300, #e5e7e9);cursor:not-allowed;color:var(--fu-light-900, #7b838c);pointer-events:none}.disabled[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]     svg{width:10px;height:10px}.disabled[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]     svg *{fill:var(--fu-light-900, #7b838c)}.disabled[_nghost-%COMP%]   fusion-flag[_ngcontent-%COMP%]{opacity:.5}.disabled[_nghost-%COMP%]   .icon-close[_ngcontent-%COMP%]{display:none}.tag-filter[_nghost-%COMP%]{background-color:var(--fu-primary-100, #e2eeff);color:var(--fu-primary-500, #3083ff);border-color:transparent}.tag-filter[_nghost-%COMP%]:hover{background-color:var(--fu-primary-200, #c9dfff);cursor:pointer}.tag-filter.disabled[_nghost-%COMP%]{cursor:not-allowed;color:var(--fu-primary-400, #68a5ff)}.tag-filter.disabled[_nghost-%COMP%]:hover{background-color:var(--fu-primary-100, #e2eeff)}.tag-filter.selected[_nghost-%COMP%]{color:var(--fu-white, #ffffff);background-color:var(--fu-primary-500, #3083ff)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TagComponent, [{
        type: Component,
        args: [{ selector: 'fusion-tag', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fusion-icon class=\"tag-icon\" [name]=\"icon\" *ngIf=\"icon\"></fusion-icon>\n<fusion-flag [name]=\"flag\" *ngIf=\"flag\"></fusion-flag>\n<span class=\"truncate\" [tooltipWidth]=\"tooltipWidth\" [fusionTooltip]=\"tooltipContent\">{{ title }}<ng-content *ngIf=\"!title\"></ng-content></span>\n<ng-container *ngIf=\"closeIconName$ | async as closeIconName\">\n    <fusion-icon class=\"icon-close\" *ngIf=\"close\" (click)=\"closeClicked($event)\" [name]=\"closeIconName\"></fusion-icon>\n</ng-container>\n", styles: [":host{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}:host.tag-filter{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;font-weight:400;letter-spacing:.25px}:host *{box-sizing:border-box}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host{box-sizing:border-box;display:inline-flex;align-items:center;height:24px;line-height:24px;min-width:54px;max-width:260px;padding:0 12px;border-radius:12px;border:solid 1px var(--fu-light-300, #e5e7e9);color:var(--fu-dark-700, #1d1c64);background-color:var(--fu-white, #ffffff)}:host>span{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}:host fusion-icon[class^=tag-icon]{margin-right:5px;margin-left:-3px;padding-top:1px}:host fusion-icon[class^=tag-icon] ::ng-deep svg{width:10px;height:10px}:host fusion-icon[class^=tag-icon] ::ng-deep svg *{fill:var(--fu-dark-200, #4c548e)}:host fusion-icon[class^=icon-close]{margin-left:6px;margin-right:-3px;padding-top:1px}:host fusion-icon[class^=icon-close]:hover{cursor:pointer}:host fusion-icon[class^=icon-close] ::ng-deep svg{width:9px;height:9px}:host fusion-icon[class^=icon-close] ::ng-deep svg *{fill:var(--fu-light-700, #a9afb4)}:host fusion-icon[class^=icon-close]:hover ::ng-deep svg{width:9px;height:9px}:host fusion-icon[class^=icon-close]:hover ::ng-deep svg *{fill:var(--fu-light-900, #7b838c)}:host fusion-flag{margin-right:4px;margin-left:-3px}:host:hover{border-color:var(--fu-light-700, #a9afb4);cursor:default}:host.disabled{border-color:var(--fu-light-300, #e5e7e9);cursor:not-allowed;color:var(--fu-light-900, #7b838c);pointer-events:none}:host.disabled fusion-icon[class^=tag-icon] ::ng-deep svg{width:10px;height:10px}:host.disabled fusion-icon[class^=tag-icon] ::ng-deep svg *{fill:var(--fu-light-900, #7b838c)}:host.disabled fusion-flag{opacity:.5}:host.disabled .icon-close{display:none}:host.tag-filter{background-color:var(--fu-primary-100, #e2eeff);color:var(--fu-primary-500, #3083ff);border-color:transparent}:host.tag-filter:hover{background-color:var(--fu-primary-200, #c9dfff);cursor:pointer}:host.tag-filter.disabled{cursor:not-allowed;color:var(--fu-primary-400, #68a5ff)}:host.tag-filter.disabled:hover{background-color:var(--fu-primary-100, #e2eeff)}:host.tag-filter.selected{color:var(--fu-white, #ffffff);background-color:var(--fu-primary-500, #3083ff)}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TagComponent, { className: "TagComponent", filePath: "tag.component.ts", lineNumber: 10 }); })();

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

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

export { TagComponent, TagModule };
//# sourceMappingURL=ironsource-fusion-ui-components-tag-v2.mjs.map
