Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../../common/mixins/modal.cjs`);let r=require(`vue`);var i={compatConfig:{MODE:3},name:`DtTabPanel`,mixins:[n.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(){let t=await this.getFirstFocusableElement(e.returnFirstEl(this.$el));t?this.isFirstElementFocusable=this.isFirstElementOfPanel(t):this.isFirstElementFocusable=!1},methods:{isFirstElementOfPanel(t){let n=t,r=!0;for(;n;){if(n.previousElementSibling!==null){r=!1;break}n=n.parentNode===e.returnFirstEl(this.$el)?null:n.parentNode}return r}}},a=[`id`,`tabindex`,`aria-labelledby`,`aria-hidden`];function o(e,t,n,i,o,s){return(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{id:`dt-panel-${n.id}`,role:`tabpanel`,tabindex:o.isFirstElementFocusable?-1:0,"aria-labelledby":`dt-tab-${n.tabId}`,"aria-hidden":`${s.hidePanel}`,class:(0,r.normalizeClass)(n.tabPanelClass),"data-qa":`dt-tab-panel`},[(0,r.renderSlot)(e.$slots,`default`)],10,a)),[[r.vShow,!s.hidePanel]])}var s=t.t(i,[[`render`,o]]);exports.default=s;
//# sourceMappingURL=tab-panel.cjs.map