import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-4d3658f6.js";import{a as inheritTrackingAttributes}from"./attributes-f95bca13.js";import{r as readSubLevels}from"./level.utils-e25dee61.js";var NavigationLevelBlock=function(){function t(t){registerInstance(this,t);this.balClick=createEvent(this,"balClick",7);this.inheritAttributes={};this.label="";this.value="block-value-".concat(navigationLevelBlockIds++);this.color="white";this.link=undefined;this.linkLabel=undefined;this.target="_self"}t.prototype.componentWillLoad=function(){this.inheritAttributes=inheritTrackingAttributes(this.el)};t.prototype.getLevelInfo=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(i){switch(i.label){case 0:return[4,readSubLevels(this.el,"bal-navigation-level-block-item")];case 1:t=i.sent();return[2,{type:"block",value:this.value,label:this.label,link:this.link,target:this.target,linkLabel:this.linkLabel,color:this.color,subLevels:t,trackingData:this.inheritAttributes,onClick:function(t){return e.balClick.emit(t)}}]}}))}))};t.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();var navigationLevelBlockIds=0;export{NavigationLevelBlock as bal_navigation_level_block};