Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`../button/button.cjs`),n=require(`./tabs-constants.cjs`);let r=require(`vue`);var i={compatConfig:{MODE:3},name:`DtTab`,components:{DtButton:t.default},inject:[`groupContext`,`setFocus`],inheritAttrs:!1,props:{id:{type:String,required:!0},panelId:{type:String,required:!0},label:{type:String,default:``},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tabClass:{type:[String,Array,Object],default:``}},emits:[`focus`,`click`],data(){return{TAB_IMPORTANCE_MODIFIERS:n.TAB_IMPORTANCE_MODIFIERS}},computed:{tabListeners(){return{click:e=>{this.$emit(`click`,e)},focus:e=>{this.setFocus(this.id),this.$emit(`focus`,e)}}},isSelected(){return this.groupContext.selected===this.panelId}},mounted(){this.selected&&(this.groupContext.selected=this.panelId)}};function a(e,t,n,i,a,o){let s=(0,r.resolveComponent)(`dt-button`);return(0,r.openBlock)(),(0,r.createBlock)(s,(0,r.mergeProps)({id:`dt-tab-${n.id}`,class:[`d-tab`,{[a.TAB_IMPORTANCE_MODIFIERS.selected]:o.isSelected},n.tabClass],role:`tab`,"aria-selected":`${o.isSelected}`,"aria-controls":`dt-panel-${n.panelId}`,"aria-label":n.label,"data-qa":`dt-tab`,tabindex:o.isSelected?`0`:`-1`,disabled:o.groupContext.disabled||n.disabled},e.$attrs,(0,r.toHandlers)(o.tabListeners)),{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(e.$slots,`default`)]),_:3},16,[`id`,`class`,`aria-selected`,`aria-controls`,`aria-label`,`tabindex`,`disabled`])}var o=e.t(i,[[`render`,a]]);exports.default=o;
//# sourceMappingURL=tab.cjs.map