import { NgClass } from '@angular/common';
import { Component, input } from '@angular/core';
import * as i0 from "@angular/core";
/**
 * @description Componente de apresentação do tooltip. Utilizado internamente pela diretiva `TooltipDirective`.
 * O posicionamento é gerenciado pelo CDK Overlay via `TooltipDirective`.
 */
export class TooltipComponent {
    /** @description Texto ou HTML a ser exibido no tooltip. */
    tooltip = input('');
    /** @description Posição do tooltip — usada para renderizar a seta no lado correto. */
    position = input('top');
    /** @description Controla a visibilidade (opacidade) do tooltip via transição CSS. */
    visible = input(false);
    /** @description Quando `true`, o conteúdo é renderizado como texto puro (escapa HTML). */
    escape = input(false);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TooltipComponent, isStandalone: true, selector: "s-tooltip", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n    class=\"tooltip relative max-w-[220px] break-words rounded-xsmall bg-grayscale-100 p-2 text-center font-open-sans text-sm font-normal leading-normal text-grayscale-0 transition-opacity duration-300\"\n    [class.opacity-0]=\"!visible()\"\n    [class.opacity-100]=\"visible()\"\n    [class.tooltip--visible]=\"visible()\"\n    [ngClass]=\"'tooltip--' + position()\"\n>\n    @if (escape()) {\n        <span class=\"tooltip__content\">\n            {{ tooltip() }}\n        </span>\n    } @else {\n        <span\n            class=\"tooltip__content\"\n            [innerHTML]=\"tooltip()\"\n        >\n        </span>\n    }\n</div>\n\n", styles: [".tooltip--top:before,.tooltip--bottom:before,.tooltip--left:before,.tooltip--right:before{content:\"\";height:0;position:absolute;width:0}.tooltip--bottom:before{border:5px solid transparent;border-bottom:5px solid #0E1119;left:calc(50% - 5px);top:-10px}.tooltip--top:before{border:5px solid transparent;border-top:5px solid #0E1119;left:calc(50% - 5px);bottom:-10px}.tooltip--left:before{border:5px solid transparent;border-left:5px solid #0E1119;right:-10px;bottom:calc(50% - 5px)}.tooltip--right:before{border:5px solid transparent;border-right:5px solid #0E1119;left:-10px;bottom:calc(50% - 5px)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-tooltip', standalone: true, imports: [NgClass], template: "<div\n    class=\"tooltip relative max-w-[220px] break-words rounded-xsmall bg-grayscale-100 p-2 text-center font-open-sans text-sm font-normal leading-normal text-grayscale-0 transition-opacity duration-300\"\n    [class.opacity-0]=\"!visible()\"\n    [class.opacity-100]=\"visible()\"\n    [class.tooltip--visible]=\"visible()\"\n    [ngClass]=\"'tooltip--' + position()\"\n>\n    @if (escape()) {\n        <span class=\"tooltip__content\">\n            {{ tooltip() }}\n        </span>\n    } @else {\n        <span\n            class=\"tooltip__content\"\n            [innerHTML]=\"tooltip()\"\n        >\n        </span>\n    }\n</div>\n\n", styles: [".tooltip--top:before,.tooltip--bottom:before,.tooltip--left:before,.tooltip--right:before{content:\"\";height:0;position:absolute;width:0}.tooltip--bottom:before{border:5px solid transparent;border-bottom:5px solid #0E1119;left:calc(50% - 5px);top:-10px}.tooltip--top:before{border:5px solid transparent;border-top:5px solid #0E1119;left:calc(50% - 5px);bottom:-10px}.tooltip--left:before{border:5px solid transparent;border-left:5px solid #0E1119;right:-10px;bottom:calc(50% - 5px)}.tooltip--right:before{border:5px solid transparent;border-right:5px solid #0E1119;left:-10px;bottom:calc(50% - 5px)}\n"] }]
        }] });
//# sourceMappingURL=data:application/json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