import { h, Host } from "@stencil/core";
export class HeaderIntegration {
    activeNav;
    activate(event) {
        const target = event.currentTarget;
        const navItem = target.closest('[slot="nav-primary"]');
        if (!navItem)
            return;
        const navId = navItem.id;
        if (!navId) {
            console.warn('Nav item does not have an id:', navItem);
            return;
        }
        console.log('Activating nav item:', navId);
        this.activeNav = navId;
    }
    render() {
        return (h(Host, { key: 'ccba40397e7578404ac0afd956d91c78eb4b830f' }, h("lmvz-header", { key: '8a3b6212040d983dee588e08306efb5366b81c99', lmvzActiveNav: this.activeNav }, h("lmvz-menuitem", { key: '5620ba46fe337c290ee1ec6bdbefeff1b6aa667c', slot: "nav-primary", id: "lehrmittel", onLmvzActivation: this.activate.bind(this) }, "Lehrmittel"), h("lmvz-menuitem", { key: 'e3975addff39e57c3aa69a63d48773e92e91dc9b', slot: "nav-primary", id: "verwaltung", onLmvzActivation: this.activate.bind(this) }, "Verwaltung"), h("lmvz-menuitem", { key: '3fd304d92f512581b1f6b93fe45d21d187423bf3', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: 'cf84e24da783904856af0821b70ba81c7416d18a', icon: "book" }), "Deutsch 7"), h("lmvz-menuitem", { key: 'a2a8abb2267a632bae52e48870653245af833cd2', slot: "connect-nav-lehrmittel" }, h("lmvz-icon", { key: 'bdaf20c26508fb60d77ccc7dbcc8e644766245ab', icon: "book" }), "Mathe 2"), h("lmvz-menuitem", { key: 'd628544431a3f3a03903fbe7531b5cff6646007c', slot: "connect-nav-verwaltung" }, h("lmvz-icon", { key: 'ff77c898d96bc4825f915603638c6ed2a8aa7fdd', icon: "cog" }), "iwas mit Verwaltung"), h("lmvz-menuitem", { key: '1d9aca5b061e12f4d08aee70406bb27b7a0e1a82', slot: "connect-nav-verwaltung", "aria-label": "Einstellungen" }, h("lmvz-icon", { key: 'e5d7f0835a56effce1873c372ca64b4dca693ebf', icon: "cog" })), h("lmvz-button", { key: 'fab2092bc47d5f0a73a1d0c94ebc6acbce3c7c2c', slot: "actions", "aria-label": "Benutzerkonto" }, h("lmvz-icon", { key: '15a89af0cab8ae520104094e3424b740b35b9d1f', icon: "user" }))), h("lmvz-input", { key: '964aa56a89587d48559ff7d156dda49fea0f61c6', label: "test" })));
    }
    static get is() { return "header-integration"; }
    static get encapsulation() { return "shadow"; }
    static get styles() { return ":host {\n      display: block;\n      min-height: 100vh;\n      background: var(--lmvz-color-spec-bg-outer-view);\n    }\n\n    .active button {\n      background-color: var(--lmvz-semantic-color-status-selected);\n    }\n\n    .user-info {\n      display: inline-flex;\n      width: 2.5rem;\n      height: 2.5rem;\n      padding: var(--lmvz-dimension-4-6);\n      flex-direction: column;\n      justify-content: center;\n      align-items: center;\n      aspect-ratio: 1/1;\n      border-radius: var(--lmvz-semantic-border-radius-round);\n      background: var(--lmvz-global-color-brand-yellow-700);\n    }"; }
    static get states() {
        return {
            "activeNav": {}
        };
    }
}
