'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-f7def455.js');
const bem = require('./bem-81bc6a2d.js');

const NavigationMain = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.ariaLabelMain = '';
    }
    render() {
        const mainEl = bem.BEM.block('nav').element('main');
        return (index.h(index.Host, { class: Object.assign({}, mainEl.class()) }, index.h("nav", { role: "navigation", "aria-label": this.ariaLabelMain }, index.h("slot", { name: "main-head" })), index.h("slot", { name: "main-body" })));
    }
};

const NavigationMainBody = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        const mainBodyEl = bem.BEM.block('nav').element('main').element('body');
        return (index.h(index.Host, { class: Object.assign({}, mainBodyEl.class()) }, index.h("slot", null)));
    }
};

const NavigationMainHead = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        const mainHeadEl = bem.BEM.block('nav').element('main').element('head');
        return (index.h(index.Host, { class: Object.assign({}, mainHeadEl.class()) }, index.h("slot", null)));
    }
};

const NavigationMenu = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.linkHref = undefined;
        this.linkName = undefined;
        this.target = '_self';
        this.elements = [];
        this.tracking = {};
    }
    render() {
        const navMenuEl = bem.BEM.block('nav').element('menu');
        return (index.h(index.Host, { class: Object.assign({}, navMenuEl.class()) }, this.linkHref && this.linkName && (index.h("div", { class: Object.assign({}, navMenuEl.element('link').class()) }, index.h("a", Object.assign({ href: this.linkHref, target: this.target }, this.tracking), this.linkName, " ", this.linkName ? '➞' : ''))), this.elements && (index.h("div", { style: { overflow: 'hidden' } }, index.h("div", { class: Object.assign({ 'columns is-multiline': true }, navMenuEl.element('wrapper').class()) }, this.elements.some(subLevel => subLevel.color === 'white') && (index.h("div", { class: {
                'bal-nav__menu__white-list__wrapper column is-full is-6-desktop is-two-thirds-widescreen': true,
            } }, index.h("div", { class: Object.assign({}, navMenuEl.element('white-list').class()) }, this.elements
            .filter(subLevel => subLevel.color === 'white')
            .map(block => {
            var _a;
            return (block && (index.h("bal-navigation-menu-list", { headline: block.label, href: block.link, target: block.target, tracking: block.trackingData }, index.h("div", { slot: "links" }, (_a = block.subLevels) === null || _a === void 0 ? void 0 : _a.map(item => (index.h("bal-navigation-menu-list-item", { href: item.link, target: item.target, tracking: item.trackingData }, item.label)))))));
        })))), this.elements.some(subLevel => subLevel.color === 'grey' ||
            subLevel.color === 'yellow' ||
            subLevel.color === 'red' ||
            subLevel.color === 'purple' ||
            subLevel.color === 'green') && (index.h("div", { class: Object.assign({ 'column is-full is-6-desktop is-one-third-widescreen': true }, navMenuEl.element('grey-list').class()) }, this.elements
            .filter(subLevel => subLevel.color === 'grey' ||
            subLevel.color === 'yellow' ||
            subLevel.color === 'red' ||
            subLevel.color === 'purple' ||
            subLevel.color === 'green')
            .map(block => {
            var _a;
            return (index.h("bal-navigation-menu-list", { headline: block.label, href: block.link, color: block.color, target: block.target, tracking: block.trackingData }, index.h("div", { slot: "links" }, (_a = block.subLevels) === null || _a === void 0 ? void 0 : _a.map(item => (index.h("bal-navigation-menu-list-item", { href: item.link, target: item.target, tracking: item.trackingData }, item.label))))));
        }))))))));
    }
};

const NavigationMeta = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.ariaLabelMeta = '';
    }
    render() {
        const metaEl = bem.BEM.block('nav').element('meta');
        return (index.h(index.Host, { class: Object.assign({}, metaEl.class()) }, index.h("nav", { class: "container", role: "navigation", "aria-label": this.ariaLabelMeta }, index.h("slot", null))));
    }
};

const NavigationMetaEnd = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        const metaEndEl = bem.BEM.block('nav').element('meta').element('end');
        return (index.h(index.Host, { class: Object.assign({}, metaEndEl.class()) }, index.h("slot", null)));
    }
};

const NavigationMetaStart = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        const metaStartEl = bem.BEM.block('nav').element('meta').element('start');
        return (index.h(index.Host, { class: Object.assign({}, metaStartEl.class()) }, index.h("slot", null)));
    }
};

exports.bal_navigation_main = NavigationMain;
exports.bal_navigation_main_body = NavigationMainBody;
exports.bal_navigation_main_head = NavigationMainHead;
exports.bal_navigation_menu = NavigationMenu;
exports.bal_navigation_meta = NavigationMeta;
exports.bal_navigation_meta_end = NavigationMetaEnd;
exports.bal_navigation_meta_start = NavigationMetaStart;
