System.register(["./vue-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509"],(function(e,a){"use strict";var l,t,n,d,s,u,c,i,o,p,r,v,h,y,f,g,b,m,k,_,x,w,j,K,B;return{setters:[e=>{l=e.k,t=e.ab,n=e.ac,d=e.c,s=e.r,u=e.U,c=e.a1,i=e.a2,o=e.W,p=e.Q,r=e.X,v=e.ah,h=e.V,y=e.F,f=e.j,g=e.a3,b=e.al,m=e.l,k=e.v},e=>{_=e.C},e=>{x=e.f},e=>{w=e._,j=e.cG,K=e.ay,B=e.bY}],execute:function(){const a={class:"flex justify-center w-42px"},C={class:"min-w-140px"},R={class:"ml-8px"};e("_",l({__name:"index",props:t({data:{default:()=>[]},rowKey:{default:"id"},options:{default:()=>[]}},{checkedRowKeys:{default:()=>[]},checkedRowKeysModifiers:{}}),emits:["update:checkedRowKeys"],setup(e){const l=e,t=n(e,"checkedRowKeys"),{rowKey:U}=l,$=x(U)?e=>e[U]:U,z=d({get:()=>t.value.length>0&&t.value.length===l.data.length,set(e){t.value=e?l.data.map((e=>$(e))):[]}}),E=d((()=>0===l.data.length)),F=d((()=>t.value.length>0&&t.value.length<l.data.length)),G=s(null),M=d((()=>l.options.map((e=>({label:e.label,value:e.key}))))),P=d((()=>0===t.value.length)),Q=d((()=>P.value||null===G.value)),S=d((()=>l.data.filter((e=>t.value.includes($(e)))))),V=()=>{const{options:e}=l;for(let a of e)a.key===G.value&&("confirm"===a.type?_({...a.confirm,data:S.value}):a.onBatch?.(S.value))},W=()=>{const{options:e}=l,a=e[0];"confirm"===a.type?_({...a.confirm,data:S.value}):a.onBatch?.(S.value)};return(e,l)=>{const n=w,d=j,s=K,_=B;return u(),c(_,{class:"bt-table-batch items-center",size:0},{default:i((()=>[o("div",a,[p(n,{checked:r(z),"onUpdate:checked":l[0]||(l[0]=e=>v(z)?z.value=e:null),disabled:r(E),indeterminate:r(F)},null,8,["checked","disabled","indeterminate"])]),e.options.length>1?(u(),h(y,{key:0},[o("div",C,[p(d,{value:r(G),"onUpdate:value":l[1]||(l[1]=e=>v(G)?G.value=e:null),options:r(M),disabled:r(P),placeholder:e.$t("Component.Batch.index_1")},null,8,["value","options","disabled","placeholder"])]),o("div",R,[p(s,{type:r(Q)?"default":"primary",disabled:r(Q),onClick:V},{default:i((()=>[f(g(e.$t("Public.Btn.Execute")),1)])),_:1},8,["type","disabled"])])],64)):b("",!0),1===e.options.length?(u(),c(s,{key:1,disabled:r(P),type:r(P)?"default":"primary",onClick:W},{default:i((()=>[o("span",null,g(e.options[0].label),1),m(o("span",null,g(e.$t("Component.Batch.index_2",[t.value.length])),513),[[k,t.value.length>0]])])),_:1},8,["disabled","type"])):b("",!0)])),_:1})}}}))}}}));
