import{k as w,an as h,$ as t,a8 as u,a9 as c,q as x,Z as i,F as f,P as B,ad as M,s as R,ak as _,ao as m}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{$,Z as z}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{c as F}from"./index-BTglIPU2.js?v=1773287522785";const L=w({__name:"index",props:m({data:{},options:{default:()=>[]}},{value:{},valueModifiers:{}}),emits:m(["click"],["update:value"]),setup(d,{expose:v,emit:k}){const n=h(d,"value"),y=k,C=(e,a)=>{y("click",e),a===n.value&&p()},p=()=>{var e,a;n.value&&((a=(e=s[n.value])==null?void 0:e.init)==null||a.call(e))},s={},b=(e,a)=>{s[a]=e};return v({init:p,onConfirm:async e=>{var a,l;n.value&&await((l=(a=s[n.value])==null?void 0:a.onConfirm)==null?void 0:l.call(a,e))},setValue:e=>{n.value=e},getCompRef:e=>s[e]}),(e,a)=>{const l=$,g=z;return t(),u(g,{value:n.value,"onUpdate:value":a[0]||(a[0]=o=>n.value=o),class:"bt-tabs h-full",type:"card",placement:"top"},{default:c(()=>[x(e.$slots,"default",{},void 0,!0),(t(!0),i(f,null,B(e.options,o=>(t(),i(f,{key:o.key},[o.show!==!1?(t(),u(l,{key:0,name:o.key,tab:o.label,"display-directive":o.isLazy?"show:lazy":"if","tab-props":{onClick:r=>{C(r,o.key)}}},{default:c(()=>[o.component?(t(),u(M(o.component),R({key:0,ref_for:!0,ref:r=>b(r,o.key)},{ref_for:!0},{...e.data,...o.data}),null,16)):_("",!0)]),_:2},1032,["name","tab","display-directive","tab-props"])):_("",!0)],64))),128))]),_:3},8,["value"])}}}),D=F(L,[["__scopeId","data-v-aa13f51f"]]);export{D as _};
