"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./tabs-constants.cjs"),r=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i=require("../button/button.cjs"),l={name:"DtTab",components:{DtButton:i.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:""}},data(){return{TAB_IMPORTANCE_MODIFIERS:a.TAB_IMPORTANCE_MODIFIERS}},computed:{isSelected(){return this.groupContext.selected===this.panelId},tabListeners(){return{...this.$listeners,click:t=>{this.$emit("click",t)},focus:t=>{this.setFocus(this.id),this.$emit("focus",t)}}}},mounted(){this.selected&&(this.groupContext.selected=this.panelId)}};var n=function(){var e=this,s=e._self._c;return s("dt-button",e._g(e._b({class:["d-tab",{[e.TAB_IMPORTANCE_MODIFIERS.selected]:e.isSelected},e.tabClass],attrs:{id:`dt-tab-${e.id}`,role:"tab","aria-selected":`${e.isSelected}`,"aria-controls":`dt-panel-${e.panelId}`,"aria-label":e.label,"data-qa":"dt-tab",tabindex:e.isSelected?"0":"-1",disabled:e.groupContext.disabled||e.disabled}},"dt-button",e.$attrs,!1),e.tabListeners),[e._t("default")],2)},d=[],o=r.n(l,n,d);const u=o.exports;exports.default=u;
//# sourceMappingURL=tab.cjs.map
