System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785"],(function(e,t){"use strict";var a,s,n,l,c,i,r,u,o,d,p,m,x,g,h,b;return{setters:[e=>{a=e.l,s=e.p},e=>{n=e.ab,l=e.g,c=e.at},e=>{i=e.k,r=e.r,u=e.c,o=e.$,d=e.Z,p=e._,m=e.aa,x=e.S,g=e.a0,h=e.R,b=e.F}],execute:function(){const t={class:"w-400px p-20px"},v={class:"mb-12px text-14px"},f=e("a",i({__name:"progress",props:{data:{}},emits:["close"],setup(e,{emit:a}){const s=e,{title:c,data:i,api:h,callback:b}=s.data,f=a,y=r(0),S=r(0),w=u((()=>i.length));return(async()=>{for(let t=0;t<i.length;t++)try{if(h){const e=await h(i[t]);i[t].batchStatus="success",i[t].reqMsg=l(e,"message.result","Success"),S.value+=1,S.value===w.value?y.value=100:y.value=Math.round(S.value/w.value*100)}}catch(e){i[t].batchStatus="error",i[t].reqMsg=l(e,"message.result","")}b?.(i),f("close")})(),(e,a)=>{const s=n;return o(),d("div",t,[p("div",v,[p("span",null,m(e.$t("Component.Batch.index_3",x(c))),1),p("span",null,m(x(S))+"/"+m(x(w)),1)]),g(s,{type:"line",status:"success",percentage:x(y),height:24,"border-radius":4,"fill-border-radius":0,processing:!0,"show-indicator":!1,"indicator-placement":"inside"},null,8,["percentage"])])}}})),y={class:"p-24px"},S={class:"flex items-center mb-24px"},w={class:"flex-1 ml-12px text-14px leading-22px"},C={class:"flex-1 ml-12px text-14px leading-22px"};e("_",i({__name:"index",props:{data:{}},emits:["setConfirm"],setup(e,{expose:t,emit:n}){const l=e,{title:i,desc:u,data:v,columns:_,api:k,done:M}=l.data,q=n,{t:j}=h(),z=r([]),P=r([..._,{key:"batchStatus",title:j("Public.Table.Result"),align:"right",width:200,render:e=>"success"===e.batchStatus?g("span",{class:"text-primary"},[e.reqMsg]):"error"===e.batchStatus?g("span",{class:"text-error"},[e.reqMsg]):g("span",{class:"text-warning"},[j("Public.Status.Wait")])}]),R=r(!1),$=r(""),B=e=>{const t=e.filter((e=>"success"===e.batchStatus)).length,a=e.length-t;$.value=j("Component.Confirm.index_3",[i,e.length,t,a]),R.value=!0,q("setConfirm",{text:"Done",disabled:!1}),M?.(e)};return(()=>{z.value=v.map((e=>({batchStatus:"wait",...e})));const{status:e}=l.data;"done"===e&&B(v)})(),t({onConfirm:({hide:e})=>(R.value?e():(q("setConfirm",{disabled:!0}),s({title:i,hideClose:!0,data:{title:i,api:k,data:z.value,callback:B},component:f})),!1)}),(e,t)=>{const s=a,n=c;return o(),d("div",y,[p("div",S,[x(R)?(o(),d(b,{key:1},[g(s,{name:"base-success",size:"40",class:"text-primary"}),p("div",C,m(x($)),1)],64)):(o(),d(b,{key:0},[g(s,{name:"base-warning",size:"40",class:"text-warning"}),p("div",w,m(x(u)),1)],64))]),g(n,{"max-height":182,data:x(z),columns:x(P)},null,8,["data","columns"])])}}}))}}}));
