webcomponents.loadBundle("bqnwsrou",["exports","./chunk-0fe2669a.js","./chunk-722333ee.js"],function(e,t,n){var r=window.webcomponents.h,o=function(){function e(){this.isSelected=!1}return e.prototype.getChild=function(){return{select:this.select.bind(this),unselect:this.unselect.bind(this),name:this.name}},e.prototype.unselect=function(){this.isSelected=!1},e.prototype.select=function(){this.isSelected=!0},e.prototype.render=function(){return r("div",{class:{"ema-tab-content":!0,"ema-tab-content-selected":this.isSelected}},r("slot",null))},Object.defineProperty(e,"is",{get:function(){return"ema-tab-content"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{getChild:{method:!0},isSelected:{state:!0},name:{type:String,attr:"name"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return".ema-tab-content{display:none}.ema-tab-content-selected{display:block}"},enumerable:!0,configurable:!0}),e}(),i=function(){function e(){this.id=n.Util.getUUID(),this.isSelected=!1}return e.prototype.getChild=function(){return{select:this.select.bind(this),unselect:this.unselect.bind(this),name:this.name,id:this.id}},e.prototype.unselect=function(){this.isSelected=!1},e.prototype.select=function(){this.isSelected=!0},e.prototype.onClick=function(){this.onSelect.emit(this.getChild())},e.prototype.render=function(){return[r("div",{class:{"ema-tab-header":!0,"ema-tab-header-selected":this.isSelected},onClick:this.onClick.bind(this)},r("slot",null))]},Object.defineProperty(e,"is",{get:function(){return"ema-tab-header"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{getChild:{method:!0},isSelected:{state:!0},name:{type:String,attr:"name"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"events",{get:function(){return[{name:"onSelect",method:"onSelect",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return".ema-tab-header{min-height:40px;min-width:150px;padding:5px;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-bottom:2px solid transparent}\@media (max-width:599px){.ema-tab-header{min-width:100px}}.ema-tab-header-selected{border-bottom:2px solid var(--ema-primary,#807b7e)}"},enumerable:!0,configurable:!0}),e}(),c=function(){function e(){}return e.prototype.componentDidLoad=function(){this.createGroup(),this.selectGroup(this.tabGroup[0]),this.selectedIndex&&(this.activeIndex=Number(this.selectedIndex)-1)},e.prototype.componentDidUpdate=function(){this.selectedIndex&&(this.activeIndex=Number(this.selectedIndex)-1)},e.prototype.onSelectedTab=function(e){var t=this.tabGroup.find(function(t){return t.header.id===e.detail.id});this.selectGroup(t)},e.prototype.createGroup=function(){var e=this,t=Array.from(this.host.querySelectorAll("ema-tab-header"));this.tabsHeader=t.map(function(e){return e.getChild()});var n=Array.from(this.host.querySelectorAll("ema-tab-content"));this.tabsContent=n.map(function(e){return e.getChild()}),this.tabGroup=this.tabsHeader.map(function(t){var n=e.tabsContent.find(function(e){return e.name===t.name});return{header:t,content:n}})},e.prototype.selectGroup=function(e){this.tabGroup.forEach(function(e){e.header.unselect(),e.content.unselect()}),e.header.select(),e.content.select()},Object.defineProperty(e.prototype,"activeIndex",{set:function(e){var t=0;this.tabGroup.forEach(function(n){t==e?(n.header.select(),n.content.select()):(n.header.unselect(),n.content.unselect()),t++})},enumerable:!0,configurable:!0}),e.prototype.render=function(){return[r("div",{class:"ema-tabs-header"},r("slot",{name:"header"})),r("div",{class:"ema-tabs-content"},r("slot",{name:"content"}))]},Object.defineProperty(e,"is",{get:function(){return"ema-tabs"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{host:{elementRef:!0},selectedIndex:{type:Number,attr:"selected-index"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"onSelect",method:"onSelectedTab"}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return".ema-tabs-header{display:-ms-flexbox;display:flex;border-bottom:1px solid rgba(0,0,0,.3)}.ema-tabs-content{padding:10px}"},enumerable:!0,configurable:!0}),e}();e.EmaTabContent=o,e.EmaTabHeader=i,e.EmaTabs=c,Object.defineProperty(e,"__esModule",{value:!0})});