import{defineComponent as s,ref as y,watch as b,computed as f,createVNode as u}from"vue";import v from"../../../_util/vue-types/index.mjs";const m=()=>({tab:v.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),T=s({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:m(),slots:Object,setup(e,{attrs:i,slots:o}){const n=y(e.forceRender);b([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?n.value=!0:e.destroyInactiveTabPane&&(n.value=!1)},{immediate:!0});const d=f(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{const{prefixCls:r,forceRender:c,id:t,active:a,tabKey:l}=e;return u("div",{id:t&&`${t}-panel-${l}`,role:"tabpanel",tabindex:a?0:-1,"aria-labelledby":t&&`${t}-tab-${l}`,"aria-hidden":!a,style:[d.value,i.style],class:[`${r}-tabpane`,a&&`${r}-tabpane-active`,i.class]},[(a||n.value||c)&&o.default?.()])}}});export{T as default};
