import { ChangeDetectionStrategy, Component } from '@angular/core';
import { TooltipBaseComponent } from '@ironsource/fusion-ui/components/tooltip/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/dynamic-components/v1";
import * as i3 from "@ironsource/fusion-ui/components/icon/v1";
function TooltipComponent_ng_container_0_fusion_icon_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 4);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("has-icon", ctx_r3.hasIcon);
    i0.ɵɵproperty("name", ctx_r3.icon);
} }
function TooltipComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, TooltipComponent_ng_container_0_fusion_icon_1_Template, 1, 3, "fusion-icon", 2);
    i0.ɵɵelement(2, "div", 3);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.icon);
    i0.ɵɵadvance();
    i0.ɵɵproperty("innerHTML", ctx_r0.content, i0.ɵɵsanitizeHtml);
} }
function TooltipComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-dynamic-components", 5);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("component", ctx_r1.content)("componentData", ctx_r1.componentData);
} }
export class TooltipComponent extends TooltipBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵTooltipComponent_BaseFactory; return function TooltipComponent_Factory(t) { return (ɵTooltipComponent_BaseFactory || (ɵTooltipComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TooltipComponent)))(t || TooltipComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TooltipComponent, selectors: [["fusion-tooltip"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[4, "ngIf", "ngIfElse"], ["component", ""], ["class", "tooltip-icon", 3, "has-icon", "name", 4, "ngIf"], [1, "is-tooltip-content", 3, "innerHTML"], [1, "tooltip-icon", 3, "name"], [3, "component", "componentData"]], template: function TooltipComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, TooltipComponent_ng_container_0_Template, 3, 2, "ng-container", 0)(1, TooltipComponent_ng_template_1_Template, 1, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            const _r2 = i0.ɵɵreference(2);
            i0.ɵɵproperty("ngIf", ctx.isHtml)("ngIfElse", _r2);
        } }, dependencies: [i1.NgIf, i2.DynamicComponentsComponent, i3.IconComponent], styles: ["[_nghost-%COMP%]{font-size:12px;font-family:var(--regular-font-family, \"Open Sans\");font-weight:600}.is-position-bottom[_nghost-%COMP%]:after, .is-position-top[_nghost-%COMP%]:after{margin-left:0;position:absolute;left:50%;transform:translate(-50%)}[_nghost-%COMP%]{display:flex;position:absolute;color:#fff;border-radius:3px;background-color:var(--dark-color-300, #172D4C);padding:7px;z-index:3020;word-wrap:break-word}[_nghost-%COMP%] > .is-tooltip-content[_ngcontent-%COMP%]{white-space:normal;line-height:16px;max-width:250px;text-align:left}[_nghost-%COMP%]   fusion-icon.tooltip-icon[_ngcontent-%COMP%]{margin-right:6px;margin-top:1px;height:16px;display:block}[_nghost-%COMP%]   fusion-icon.tooltip-icon[_ngcontent-%COMP%]     svg{width:13px;height:13px}[_nghost-%COMP%]   fusion-icon.tooltip-icon[_ngcontent-%COMP%]     svg *{fill:currentColor}[_nghost-%COMP%]   .tooltip-icon[_ngcontent-%COMP%]{display:none}.is-position-top[_nghost-%COMP%]:after{border:solid;border-color:var(--dark-color-300, #172D4C) transparent transparent transparent;border-width:4px 7px 0;content:\"\";position:absolute;top:100%}.is-position-bottom[_nghost-%COMP%]:after{border:solid;border-color:transparent transparent var(--dark-color-300, #172D4C) transparent;border-width:0 7px 4px;content:\"\";position:absolute;bottom:100%}.is-position-left[_nghost-%COMP%]:after{border:solid;border-color:transparent transparent transparent var(--dark-color-300, #172D4C);border-width:7px 4px 7px;content:\"\";position:absolute;top:35%;left:100%}.is-position-right[_nghost-%COMP%]:after{border:solid;border-color:transparent var(--dark-color-300, #172D4C) transparent transparent;border-width:7px 4px 7px;content:\"\";position:absolute;top:35%;right:100%}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TooltipComponent, [{
        type: Component,
        args: [{ selector: 'fusion-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"isHtml; else component\">\n  <fusion-icon *ngIf=\"icon\" [class.has-icon]=\"hasIcon\" class=\"tooltip-icon\" [name]=\"icon\"></fusion-icon>\n  <div class=\"is-tooltip-content\" [innerHTML]=\"content\"></div>\n</ng-container>\n<ng-template #component>\n  <fusion-dynamic-components [component]=\"content\" [componentData]=\"componentData\"></fusion-dynamic-components>\n</ng-template>\n", styles: [":host{font-size:12px;font-family:var(--regular-font-family, \"Open Sans\");font-weight:600}:host.is-position-bottom:after,:host.is-position-top:after{margin-left:0;position:absolute;left:50%;transform:translate(-50%)}:host{display:flex;position:absolute;color:#fff;border-radius:3px;background-color:var(--dark-color-300, #172D4C);padding:7px;z-index:3020;word-wrap:break-word}:host>.is-tooltip-content{white-space:normal;line-height:16px;max-width:250px;text-align:left}:host fusion-icon.tooltip-icon{margin-right:6px;margin-top:1px;height:16px;display:block}:host fusion-icon.tooltip-icon ::ng-deep svg{width:13px;height:13px}:host fusion-icon.tooltip-icon ::ng-deep svg *{fill:currentColor}:host .tooltip-icon{display:none}:host.is-position-top:after{border:solid;border-color:var(--dark-color-300, #172D4C) transparent transparent transparent;border-width:4px 7px 0;content:\"\";position:absolute;top:100%}:host.is-position-bottom:after{border:solid;border-color:transparent transparent var(--dark-color-300, #172D4C) transparent;border-width:0 7px 4px;content:\"\";position:absolute;bottom:100%}:host.is-position-left:after{border:solid;border-color:transparent transparent transparent var(--dark-color-300, #172D4C);border-width:7px 4px 7px;content:\"\";position:absolute;top:35%;left:100%}:host.is-position-right:after{border:solid;border-color:transparent var(--dark-color-300, #172D4C) transparent transparent;border-width:7px 4px 7px;content:\"\";position:absolute;top:35%;right:100%}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TooltipComponent, { className: "TooltipComponent", filePath: "tooltip.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbHRpcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9mdXNpb24tdWkvY29tcG9uZW50cy90b29sdGlwL3YxL3Rvb2x0aXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvdG9vbHRpcC92MS90b29sdGlwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyx1QkFBdUIsRUFBRSxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDakUsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sc0RBQXNELENBQUM7Ozs7OztJQ0F4RixpQ0FBc0c7OztJQUE1RSwwQ0FBMEI7SUFBc0Isa0NBQWE7OztJQUR6Riw2QkFBNkM7SUFDM0MsZ0dBQXNHO0lBQ3RHLHlCQUE0RDtJQUM5RCwwQkFBZTs7O0lBRkMsY0FBVTtJQUFWLGtDQUFVO0lBQ1EsY0FBcUI7SUFBckIsNkRBQXFCOzs7SUFHckQsK0NBQTZHOzs7SUFBbEYsMENBQXFCLHVDQUFBOztBRElsRCxNQUFNLE9BQU8sZ0JBQ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