var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r["throw"](e))}catch(e){a(e)}}function l(e){e.done?n(e.value):i(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host,g as getElement}from"./index-e3f64949.js";var balTabItemCss=".sc-bal-tab-item-h{display:block;position:static}";var TabItem=function(){function e(e){registerInstance(this,e);this.isContentHidden=true;this.value="";this.label="";this.bubble=false;this.disabled=false;this.done=false;this.failed=false;this.active=false}e.prototype.activatedHandler=function(e){this.isContentHidden=!e};e.prototype.informParent=function(){this.parent.sync()};e.prototype.getOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.options]}))}))};e.prototype.setActive=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.active=e;return[2]}))}))};Object.defineProperty(e.prototype,"options",{get:function(){return{value:this.value,label:this.label,active:this.active,disabled:this.disabled,done:this.done,failed:this.failed,hasBubble:this.bubble}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"parent",{get:function(){return this.element.closest("bal-tabs")},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){this.isContentHidden=!this.active};e.prototype.render=function(){return h(Host,null,h("div",{style:this.isContentHidden&&{display:"none"}},h("slot",null)))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{active:["activatedHandler","informParent"],value:["informParent"],bubble:["informParent"],disabled:["informParent"],label:["informParent"],done:["informParent"],failed:["informParent"]}},enumerable:false,configurable:true});return e}();TabItem.style=balTabItemCss;export{TabItem as bal_tab_item};