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