import { p as proxyCustomElement, H, c as createEvent, h } from './p-a53686b3.js';
import { r as randomIdGenerator } from './p-ffe5c0e8.js';
import { d as defineCustomElement$2 } from './p-e8fc33ed.js';
import { d as defineCustomElement$1 } from './p-58f4845c.js';

const navigationSidebarButtonCss = ".sc-digi-navigation-sidebar-button-h{--digi--navigation-sidebar-button--display:inline-flex}.sc-digi-navigation-sidebar-button-h .digi-navigation-sidebar-button.sc-digi-navigation-sidebar-button{display:var(--digi--navigation-sidebar-button--display)}";
const DigiNavigationSidebarButtonStyle0 = navigationSidebarButtonCss;

const NavigationSidebarButton = /*@__PURE__*/ proxyCustomElement(class NavigationSidebarButton extends H {
    constructor() {
        super();
        this.__registerHost();
        this.afOnToggle = createEvent(this, "afOnToggle", 7);
        this.isActive = false;
        this.afText = undefined;
        this.afAriaLabel = undefined;
        this.afId = randomIdGenerator('digi-navigation-sidebar-button');
    }
    toggleHandler() {
        this.isActive = !this.isActive;
        this.afOnToggle.emit(this.isActive);
    }
    render() {
        return (h("digi-button", { key: '30e533fedf4346bf5d1cdddd6eedbda55104e37b', id: this.afId, class: "digi-navigation-sidebar-button", "af-variation": "function", "af-aria-label": this.afAriaLabel, onClick: () => this.toggleHandler() }, this.afText, h("digi-icon-bars", { key: 'f2878d2c219653ca77ad39ccfbef4aaa01d5b226', slot: "icon" })));
    }
    static get style() { return DigiNavigationSidebarButtonStyle0; }
}, [2, "digi-navigation-sidebar-button", {
        "afText": [1, "af-text"],
        "afAriaLabel": [1, "af-aria-label"],
        "afId": [1, "af-id"],
        "isActive": [32]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["digi-navigation-sidebar-button", "digi-button", "digi-icon-bars"];
    components.forEach(tagName => { switch (tagName) {
        case "digi-navigation-sidebar-button":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, NavigationSidebarButton);
            }
            break;
        case "digi-button":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "digi-icon-bars":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { NavigationSidebarButton as N, defineCustomElement as d };
