"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./tabs-constants.cjs"),e=require("vue"),d=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),n=require("../button/button.cjs"),o={compatConfig:{MODE:3},name:"DtTab",components:{DtButton:n.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:i.TAB_IMPORTANCE_MODIFIERS}},computed:{tabListeners(){return{click:t=>{this.$emit("click",t)},focus:t=>{this.setFocus(this.id),this.$emit("focus",t)}}},isSelected(){return this.groupContext.selected===this.panelId}},mounted(){this.selected&&(this.groupContext.selected=this.panelId)}};function c(t,b,a,_,l,s){const r=e.resolveComponent("dt-button");return e.openBlock(),e.createBlock(r,e.mergeProps({id:`dt-tab-${a.id}`,class:["d-tab",{[l.TAB_IMPORTANCE_MODIFIERS.selected]:s.isSelected},a.tabClass],role:"tab","aria-selected":`${s.isSelected}`,"aria-controls":`dt-panel-${a.panelId}`,"aria-label":a.label,"data-qa":"dt-tab",tabindex:s.isSelected?"0":"-1",disabled:s.groupContext.disabled||a.disabled},t.$attrs,e.toHandlers(s.tabListeners)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["id","class","aria-selected","aria-controls","aria-label","tabindex","disabled"])}const u=d._(o,[["render",c]]);exports.default=u;
//# sourceMappingURL=tab.cjs.map
