'use strict';

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

const index = require('./index-f7def455.js');
const level_utils = require('./level.utils-a811d57d.js');
const attributes = require('./attributes-e6a3e6c7.js');

const NavigationLevelMeta = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.balClick = index.createEvent(this, "balClick", 7);
        this.inheritAttributes = {};
        this.label = '';
        this.value = `meta-value-${navigationLevelMetaIds++}`;
        this.link = undefined;
        this.linkLabel = undefined;
        this.isTabLink = undefined;
    }
    componentWillLoad() {
        this.inheritAttributes = attributes.inheritTrackingAttributes(this.el);
    }
    async getLevelInfo() {
        const subLevels = await level_utils.readSubLevels(this.el, 'bal-navigation-level-main');
        return {
            type: 'meta',
            value: this.value,
            label: this.label,
            link: this.link,
            linkLabel: this.linkLabel,
            isTabLink: this.isTabLink,
            subLevels,
            trackingData: this.inheritAttributes,
            onClick: (ev) => this.balClick.emit(ev),
        };
    }
    render() {
        return (index.h(index.Host, null, index.h("slot", null)));
    }
    get el() { return index.getElement(this); }
};
let navigationLevelMetaIds = 0;

exports.bal_navigation_level_meta = NavigationLevelMeta;
