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