"use strict";const e=require("vue"),r=require("./constants.js"),c=require("./_plugin-vue_export-helper.js"),d=e.defineComponent({name:"CdxTab",props:{name:{type:String,required:!0},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(t){var i;const a=e.inject(r.TabsKey),n=e.inject(r.ActiveTabKey);if(!a||!n)throw new Error("Tab component must be used inside a Tabs component");const s=(i=a.value.get(t.name))!=null?i:{},o=e.computed(()=>t.name===n.value);return{tab:s,isActive:o}}}),l=["id","aria-hidden","aria-labelledby"];function u(t,a,n,s,o,i){return e.withDirectives((e.openBlock(),e.createElementBlock("section",{id:t.tab.id,"aria-hidden":t.isActive?void 0:!0,"aria-labelledby":"".concat(t.tab.id,"-label"),class:"cdx-tab",role:"tabpanel",tabindex:"-1"},[e.renderSlot(t.$slots,"default")],8,l)),[[e.vShow,t.isActive]])}const b=c._export_sfc(d,[["render",u]]);module.exports=b;
