/*!
 * KoliBri - The accessible HTML-Standard
 */
import { r as registerInstance, h, H as Host, g as getElement } from './index-Brmny3Vg.js';
import { B as BaseWebComponent } from './variant-quote-BMV8GZX8.js';
import { T as TooltipFC } from './component-DTx6ZVqq.js';
import { T as TooltipController } from './controller-oT8Y98Yc.js';
import './common-DEEjER7G.js';
import './normalizers-pgU77mXp.js';
import './_Uint8Array-kJHDjtoP.js';
import './isArray-CcrBs4JM.js';
import './component-CQaxTS4u.js';
import './tslib.es6-QNbPBOk5.js';
import './bem-registry-B9CzNnO1.js';
import './clsx-COFh-Vc8.js';
import './component-DHo2YdSx.js';
import './align-floating-elements-DTTpkCAK.js';
import './tooltip-open-tracking-D3tCiiGP.js';
import './align-ChLoh-Dq.js';
import './label-DPd4-fag.js';
import './base-controller-CXhqh4cR.js';

const KolTooltipWc = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.controller = new TooltipController(BaseWebComponent.stateLess);
        this._align = 'top';
    }
    validateAlign(value) {
        var _a;
        (_a = this.controller) === null || _a === void 0 ? void 0 : _a.watchAlign(value);
    }
    validateId(value) {
        var _a;
        (_a = this.controller) === null || _a === void 0 ? void 0 : _a.watchId(value);
    }
    validateLabel(value) {
        var _a;
        (_a = this.controller) === null || _a === void 0 ? void 0 : _a.watchLabel(value);
    }
    hideTooltip() {
        var _a;
        return Promise.resolve((_a = this.controller) === null || _a === void 0 ? void 0 : _a.hideTooltip());
    }
    componentWillLoad() {
        this.controller.componentWillLoad({
            label: this._label,
            align: this._align,
            badgeText: this._badgeText,
            id: this._id,
        });
    }
    connectedCallback() {
        var _a, _b, _c;
        (_a = this.controller) === null || _a === void 0 ? void 0 : _a.initContext(((_c = (_b = this.host) === null || _b === void 0 ? void 0 : _b.previousElementSibling) !== null && _c !== void 0 ? _c : undefined));
    }
    componentDidRender() {
        var _a;
        if (this.host) {
            (_a = this.controller) === null || _a === void 0 ? void 0 : _a.handleEventListeners(this.host);
        }
    }
    disconnectedCallback() {
        var _a;
        (_a = this.controller) === null || _a === void 0 ? void 0 : _a.destroy();
    }
    render() {
        return (h(Host, { key: 'f677d58b886cdb9f1aab620608155ee412e0ef7d', class: "kol-tooltip" }, h(TooltipFC, { key: 'd86d1adc81a94fbb1116532e9f2529d96362834d', label: this.controller.getRenderProp('label'), badgeText: this._badgeText, id: this.controller.getRenderProp('id'), refFloating: (el) => { var _a; return (_a = this.controller) === null || _a === void 0 ? void 0 : _a.setTooltipElementRef(el); } })));
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "_align": ["validateAlign"],
        "_id": ["validateId"],
        "_label": ["validateLabel"]
    }; }
};

export { KolTooltipWc as kol_tooltip_wc };
//# sourceMappingURL=kol-tooltip-wc.entry.js.map
