System.register(["./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785"],(function(e,a){"use strict";var l,t,n,d,s,i,u,o,c,p,r,h,v,y,f,m,g,b,k,x,w,_,B,K,j,C,R;return{setters:[e=>{l=e.k,t=e.an,n=e.c,d=e.r,s=e.$,i=e.a8,u=e.a9,o=e._,c=e.a0,p=e.S,r=e.X,h=e.Z,v=e.H,y=e.j,f=e.aa,m=e.F,g=e.ak,b=e.l,k=e.v,x=e.ao},e=>{w=e.ao,_=e.bd},e=>{B=e.k,K=e.al,j=e.a6,C=e.f,R=e.B}],execute:function(){const a={class:"flex justify-center w-42px"},$={class:"ml-8px"};e("_",l({__name:"index",props:x({data:{default:()=>[]},rowKey:{default:"id"},options:{default:()=>[]},selectWidth:{default:140}},{checkedRowKeys:{default:()=>[]},checkedRowKeysModifiers:{}}),emits:["update:checkedRowKeys"],setup(e){const l=e,x=t(e,"checkedRowKeys"),{rowKey:S}=l,U=w(S)?e=>e[S]:S,W=n({get:()=>x.value.length>0&&x.value.length===l.data.length,set(e){x.value=e?l.data.map((e=>U(e))):[]}}),z=n((()=>0===l.data.length)),E=n((()=>x.value.length>0&&x.value.length<l.data.length)),F=d(null),H=n((()=>l.options.map((e=>({label:e.label,value:e.key}))))),M=n((()=>0===x.value.length)),P=n((()=>M.value||null===F.value)),X=n((()=>l.data.filter((e=>x.value.includes(U(e)))))),Z=()=>{const{options:e}=l;for(let a of e)a.key===F.value&&("confirm"===a.type?_({...a.confirm,data:X.value}):a.onBatch?.(X.value))},q=()=>{const{options:e}=l,a=e[0];"confirm"===a.type?_({...a.confirm,data:X.value}):a.onBatch?.(X.value)};return(e,l)=>{const t=K,n=j,d=R,w=B;return s(),i(w,{class:"bt-table-batch items-center",size:0},{default:u((()=>[o("div",a,[c(t,{checked:p(W),"onUpdate:checked":l[0]||(l[0]=e=>r(W)?W.value=e:null),disabled:p(z),indeterminate:p(E)},null,8,["checked","disabled","indeterminate"])]),e.options.length>1?(s(),h(m,{key:0},[o("div",{class:"min-w-140px",style:v({width:p(C)(e.selectWidth)})},[c(n,{value:p(F),"onUpdate:value":l[1]||(l[1]=e=>r(F)?F.value=e:null),options:p(H),disabled:p(M),placeholder:e.$t("Component.Batch.index_1")},null,8,["value","options","disabled","placeholder"])],4),o("div",$,[c(d,{type:p(P)?"default":"primary",disabled:p(P),onClick:Z},{default:u((()=>[y(f(e.$t("Public.Btn.Execute")),1)])),_:1},8,["type","disabled"])])],64)):g("",!0),1===e.options.length?(s(),i(d,{key:1,disabled:p(M),type:p(M)?"default":"primary",onClick:q},{default:u((()=>[o("span",null,f(e.options[0].label),1),b(o("span",null,f(e.$t("Component.Batch.index_2",[x.value.length])),513),[[k,x.value.length>0]])])),_:1},8,["disabled","type"])):g("",!0)])),_:1})}}}))}}}));
