/*!
 * Crafted with ❤ by Salla
 */
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';

const SallaHook$1 = /*@__PURE__*/ proxyCustomElement(class SallaHook extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
    }
    /**
     * Mounts a given HTML element into the hook position.
     * @param element The element to inject.
     */
    async mount(element) {
        this.host.before(element);
    }
    render() {
        return h(Host, { key: '2aa8c92dee7e62785fa0f45d967912ae8d6f96c0' });
    }
    async componentDidLoad() {
        // Register this component for hooks system, already on it logic to run componentDidLoad trigger
        await Salla.hooks.registerComponent('salla-hook', this);
    }
    get host() { return this; }
    static get style() { return ":host {\n      all: unset;\n      display: none; /* marker only */\n    }"; }
}, [1, "salla-hook", {
        "name": [1],
        "mount": [64]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["salla-hook"];
    components.forEach(tagName => { switch (tagName) {
        case "salla-hook":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, SallaHook$1);
            }
            break;
    } });
}
defineCustomElement$1();

const SallaHook = SallaHook$1;
const defineCustomElement = defineCustomElement$1;

export { SallaHook, defineCustomElement };
