import { ChangeDetectionStrategy, Component } from '@angular/core';
import { TagBaseComponent } from '@ironsource/fusion-ui/components/tag/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/icon/v1";
import * as i3 from "@ironsource/fusion-ui/components/flag/v1";
import * as i4 from "@ironsource/fusion-ui/components/tooltip/v1";
const _c0 = ["*"];
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_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("name", ctx_r0.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 _r2 = 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(_r2); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.closeClicked($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const closeIconName_r3 = i0.ɵɵnextContext().ngIf;
    i0.ɵɵproperty("name", closeIconName_r3);
} }
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_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.close);
} }
export class TagComponent extends TagBaseComponent {
    ngOnInit() {
        super.ngOnInit();
        this.closeIconName$.next({ iconName: 'clear-full-circle', iconVersion: 'v1' });
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵTagComponent_BaseFactory; return function TagComponent_Factory(__ngFactoryType__) { return (ɵTagComponent_BaseFactory || (ɵTagComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TagComponent)))(__ngFactoryType__ || 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, "click", "name"]], 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:12px;font-family:var(--regular-font-family, \"Open Sans\");font-weight:600}[_nghost-%COMP%] > span[_ngcontent-%COMP%]{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%] > span[_ngcontent-%COMP%]{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}.disabled[_nghost-%COMP%]{pointer-events:none;cursor:default;touch-callout:none;-webkit-user-select:none;user-select:none}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]{height:24px;line-height:23px;position:relative;background-color:var(--light-color-300, #EAEEF1);display:inline-block;padding:0 8px;border-radius:24px;border:solid 1px transparent;color:var(--dark-color-300, #172D4C);margin-right:4px}[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]{vertical-align:middle}[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]     svg{width:13px;height:13px}[_nghost-%COMP%]   fusion-icon[class^=tag-icon][_ngcontent-%COMP%]     svg *{fill:var(--light-color-900, #52677B)}[_nghost-%COMP%] > span[_ngcontent-%COMP%]{min-width:54px;max-width:250px;color:var(--dark-color-300, #172D4C);margin-left:2px;vertical-align:top;display:inline-block}.disabled[_nghost-%COMP%]{background-color:var(--light-color-300, #EAEEF1)}.disabled[_nghost-%COMP%] > span[_ngcontent-%COMP%]{color:var(--light-color-800, #678099)}[_nghost-%COMP%]:hover{color:var(--dark-color-300, #172D4C);background-color:var(--light-color, #E1E6EB);border:solid 1px var(--light-color-700, #95A6B8)}.selected[_nghost-%COMP%]{background-color:var(--primary-color, #3091F6);color:#fff;border:solid 1px var(--primary-color, #3091F6);cursor:pointer}.selected[_nghost-%COMP%]   fusion-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{fill:#fff}.with-closed-icon[_nghost-%COMP%]{padding-right:20px;cursor:default}.with-closed-icon[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]{position:absolute;vertical-align:middle;right:5px;top:1px;cursor:pointer}.with-closed-icon[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]     svg{width:12px;height:12px}.with-closed-icon[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]     svg .background{fill:var(--light-color-700, #95A6B8)}.with-closed-icon[_nghost-%COMP%]   fusion-icon[class^=icon-close][_ngcontent-%COMP%]     svg .inner{fill:#fff}.with-closed-icon[_nghost-%COMP%] > span[_ngcontent-%COMP%]{width:calc(100% - 30px)}"], 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:12px;font-family:var(--regular-font-family, \"Open Sans\");font-weight:600}:host>span{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}:host *{box-sizing:border-box}:host>span{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}:host.disabled{pointer-events:none;cursor:default;touch-callout:none;-webkit-user-select:none;user-select:none}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host{height:24px;line-height:23px;position:relative;background-color:var(--light-color-300, #EAEEF1);display:inline-block;padding:0 8px;border-radius:24px;border:solid 1px transparent;color:var(--dark-color-300, #172D4C);margin-right:4px}:host fusion-icon[class^=tag-icon]{vertical-align:middle}:host fusion-icon[class^=tag-icon] ::ng-deep svg{width:13px;height:13px}:host fusion-icon[class^=tag-icon] ::ng-deep svg *{fill:var(--light-color-900, #52677B)}:host>span{min-width:54px;max-width:250px;color:var(--dark-color-300, #172D4C);margin-left:2px;vertical-align:top;display:inline-block}:host.disabled{background-color:var(--light-color-300, #EAEEF1)}:host.disabled>span{color:var(--light-color-800, #678099)}:host:hover{color:var(--dark-color-300, #172D4C);background-color:var(--light-color, #E1E6EB);border:solid 1px var(--light-color-700, #95A6B8)}:host.selected{background-color:var(--primary-color, #3091F6);color:#fff;border:solid 1px var(--primary-color, #3091F6);cursor:pointer}:host.selected fusion-icon svg *{fill:#fff}:host.with-closed-icon{padding-right:20px;cursor:default}:host.with-closed-icon fusion-icon[class^=icon-close]{position:absolute;vertical-align:middle;right:5px;top:1px;cursor:pointer}:host.with-closed-icon fusion-icon[class^=icon-close] ::ng-deep svg{width:12px;height:12px}:host.with-closed-icon fusion-icon[class^=icon-close] ::ng-deep svg .background{fill:var(--light-color-700, #95A6B8)}:host.with-closed-icon fusion-icon[class^=icon-close] ::ng-deep svg .inner{fill:#fff}:host.with-closed-icon>span{width:calc(100% - 30px)}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TagComponent, { className: "TagComponent", filePath: "tag.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFnLmNvbXBvbmVudC5qcyI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