import * as i0 from '@angular/core';
import { Directive, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { TooltipBaseDirective, TooltipBaseComponent } from '@ironsource/fusion-ui/components/tooltip/common/base';
export { TooltipPosition, TooltipService, TooltipType } from '@ironsource/fusion-ui/components/tooltip/common/base';
import * as i2 from '@ironsource/fusion-ui/components/dynamic-components/v1';
import { DynamicComponentsModule } from '@ironsource/fusion-ui/components/dynamic-components/v1';
import * as i3 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';

class TooltipDirective extends TooltipBaseDirective {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵTooltipDirective_BaseFactory; return function TooltipDirective_Factory(t) { return (ɵTooltipDirective_BaseFactory || (ɵTooltipDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TooltipDirective)))(t || TooltipDirective); }; })(); }
    static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TooltipDirective, selectors: [["", "fusionTooltip", ""]], features: [i0.ɵɵInheritDefinitionFeature] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TooltipDirective, [{
        type: Directive,
        args: [{
                selector: '[fusionTooltip]'
            }]
    }], null, null); })();

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);
} }
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 }); })();

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

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

export { TooltipComponent, TooltipDirective, TooltipModule };
//# sourceMappingURL=ironsource-fusion-ui-components-tooltip-v1.mjs.map
