'use strict';

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

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

const NavigationLevelBlock = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.balClick = index.createEvent(this, "balClick", 7);
        this.inheritAttributes = {};
        this.label = '';
        this.value = `block-value-${navigationLevelBlockIds++}`;
        this.color = 'white';
        this.link = undefined;
        this.linkLabel = undefined;
        this.target = '_self';
    }
    componentWillLoad() {
        this.inheritAttributes = attributes.inheritTrackingAttributes(this.el);
    }
    async getLevelInfo() {
        const subLevels = await level_utils.readSubLevels(this.el, 'bal-navigation-level-block-item');
        return {
            type: 'block',
            value: this.value,
            label: this.label,
            link: this.link,
            target: this.target,
            linkLabel: this.linkLabel,
            color: this.color,
            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 navigationLevelBlockIds = 0;

exports.bal_navigation_level_block = NavigationLevelBlock;
