"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../common/mixins/modal.cjs"),s=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),n={name:"DtTabPanel",mixins:[i.default],inject:["groupContext"],props:{id:{type:String,required:!0},tabId:{type:String,required:!0},hidden:{type:Boolean,default:!1},tabPanelClass:{type:[String,Array,Object],default:""}},data(){return{isFirstElementFocusable:!1}},computed:{hidePanel(){return this.groupContext.selected!==this.id||this.hidden}},async mounted(){const t=await this.getFirstFocusableElement(this.$el);t?this.isFirstElementFocusable=this.isFirstElementOfPanel(t):this.isFirstElementFocusable=!1},methods:{isFirstElementOfPanel(t){let e=t,a=!0;for(;e;){if(e.previousElementSibling!==null){a=!1;break}e=e.parentNode!==this.$el?e.parentNode:null}return a}}};var l=function(){var e=this,a=e._self._c;return a("div",{directives:[{name:"show",rawName:"v-show",value:!e.hidePanel,expression:"!hidePanel"}],class:e.tabPanelClass,attrs:{id:`dt-panel-${e.id}`,role:"tabpanel",tabindex:e.isFirstElementFocusable?-1:0,"aria-labelledby":`dt-tab-${e.tabId}`,"aria-hidden":`${e.hidePanel}`,"data-qa":"dt-tab-panel"}},[e._t("default")],2)},r=[],d=s.n(n,l,r);const o=d.exports;exports.default=o;
//# sourceMappingURL=tab-panel.cjs.map
