export { a as dga_header_action_btn, f as dga_nav_header, D as dga_nav_header_actions, e as dga_nav_header_link, c as dga_nav_header_logos, b as dga_nav_header_main, d as dga_nav_header_menu } from './dga-header-action-btn-073b4404.js';
import { r as registerInstance, h, g as getElement, H as Host } from './index-1acf58d3.js';

const DgaNavHeaderSubMenu = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.active = false;
        this.subMenuFullWidth = false;
    }
    onActiveChange() {
        if (this.active && this.submenu) {
            this.submenu.style.display = 'block';
            this.submenu.style.maxHeight = `${this.submenu.scrollHeight}px`;
        }
        else if (this.submenu) {
            this.submenu.style.maxHeight = '';
        }
    }
    componentDidLoad() {
        this.submenu = this.el.shadowRoot.querySelector('.header__sub-menu');
        this.onActiveChange(); // Ensure styles are set on initial load
    }
    render() {
        const backgroundClass = this.background === 'Brand' ? 'header__sub-menu--bg-brand' : '';
        const fullWidthClass = this.subMenuFullWidth ? 'header__sub-menu--full' : '';
        return (h("div", { key: '60795e354d8aca73dbadda2e1abb81731662d046', class: `header__sub-menu ${backgroundClass} ${fullWidthClass}`, ref: el => (this.submenu = el) }, h("div", { key: 'e26408241071d544add36fb1769893e9964ebbd5', class: "sub-menu__container" }, h("slot", { key: '59998beb0e160440d9c7c788b826dba6ee98712b' }))));
    }
    get el() { return getElement(this); }
    static get watchers() { return {
        "active": ["onActiveChange"]
    }; }
};

const DgaSecondNavHeader = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.variant = 'primary';
    }
    componentWillLoad() {
        this.el.childNodes.forEach((item) => {
            const el = item;
            if (el.tagName === 'DGA-SECOND-NAV-HEADER-CONTENT' && this.hideContent === true) {
                el.style.display = 'none';
            }
            if (el.tagName === 'DGA-SECOND-NAV-HEADER-ACTIONS' && this.hideActions === true) {
                el.style.display = 'none';
            }
            if (el.tagName === 'DGA-SECOND-NAV-HEADER-CONTENT' && el.attributes.getNamedItem('slot') === null) {
                el.setAttribute('slot', 'content');
            }
            if (el.tagName === 'DGA-SECOND-NAV-HEADER-ACTIONS' && el.attributes.getNamedItem('slot') === null) {
                el.setAttribute('slot', 'actions');
            }
        });
    }
    render() {
        return (h(Host, { key: '7b4337019906155b588661d26fdd266133fc3dd3' }, h("div", { key: '030d1b0d16e57f33bd2acead40d79ada06c62eba', class: `wrapper ${this.variant} `, "aria-label": 'a secondary navigation navbar' }, h("div", { key: '845cbc1af765c49d9c0cd186b3320b44996ddcf9', class: `container ${this.hideDivider ? '' : 'border'}` }, h("div", { key: 'a15f8a49420573d4b24b1dfd7996be03bf29fbf5', class: `content` }, h("slot", { key: '4dbf4b68e5770b1b45d5ada842c6028e3940c0f7', name: "content" })), h("div", { key: '1f2648a0395229235809606ef03ac7e8ecb9ee63', class: `actions` }, h("slot", { key: 'be8df10b159b7e536db796d61ab25f0c1f7203c6', name: "actions" }))))));
    }
    get el() { return getElement(this); }
};

const DgaSecondNavHeaderActions = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
    }
    render() {
        return (h(Host, { key: '573f01829709de8e8bb5ab134445c13f9958ee22' }, h("div", { key: '3be4cd1e638b0786ecbd49baaf7dc1223cc236de', class: `items-container` }, h("slot", { key: '50c985bdb80a92cdc542bd296be3a5bbc00b9db2' }))));
    }
};

const DgaSecondNavHeaderContent = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
    }
    render() {
        return (h(Host, { key: 'eea53f3f4cacd826343df1c500235fc3876587f9' }, h("div", { key: '0d016bb7c6afb92c03fd665c6e46c54d12eac988', class: `items-container` }, h("slot", { key: '97755366fd00f0545d15157357238e41fa614a74' }))));
    }
};

const DgaSecondNavHeaderItem = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
    }
    connectedCallback() {
        this.el.childNodes.forEach((item) => {
            const el = item;
            if (el.tagName === 'DGA-ICON'.toLocaleUpperCase() && el.attributes.getNamedItem('slot') === null) {
                el.setAttribute('slot', 'icon');
            }
        });
    }
    render() {
        return (h(Host, { key: '4d2ca1cf5c638f5647d9f80f47aa505455434576' }, h("slot", { key: '9aaf12cbe019b34b41e8cbed03b508b1c0d01a28', name: 'icon' }), h("slot", { key: 'adccc572b834f22150efdae46405800b5f5b588a', name: 'label' }, this.label)));
    }
    get el() { return getElement(this); }
};

export { DgaNavHeaderSubMenu as dga_nav_header_sub_menu, DgaSecondNavHeader as dga_second_nav_header, DgaSecondNavHeaderActions as dga_second_nav_header_actions, DgaSecondNavHeaderContent as dga_second_nav_header_content, DgaSecondNavHeaderItem as dga_second_nav_header_item };

//# sourceMappingURL=dga-header-action-btn_12.entry.js.map