System.register(["./page_layout-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172"],(function(e,t){"use strict";var a,s,l,n,c,i,r,u,o,d,p,m,g,x,h,b;return{setters:[e=>{a=e._},e=>{s=e.u},e=>{l=e.d5,n=e.bH,c=e.dg},e=>{i=e.k,r=e.r,u=e.c,o=e.R,d=e.S,p=e.U,m=e.a4,g=e.V,x=e.X,h=e.P,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),_=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===_.value?y.value=100:y.value=Math.round(S.value/_.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",g(c))),1),p("span",null,m(g(S))+"/"+m(g(_)),1)]),x(s,{type:"line",status:"success",percentage:g(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"},_={class:"flex-1 ml-12px text-14px leading-22px"},w={class:"flex-1 ml-12px text-14px leading-22px"};e("_",i({__name:"index",props:{data:{}},emits:["setConfirm"],setup(e,{expose:t,emit:l}){const n=e,{title:i,desc:u,data:v,columns:C,api:k,done:M}=n.data,j=l,{t:q}=h(),P=r([]),z=r([...C,{key:"batchStatus",title:q("Public.Table.Result"),align:"right",width:200,render:e=>"success"===e.batchStatus?x("span",{class:"text-primary"},[e.reqMsg]):"error"===e.batchStatus?x("span",{class:"text-error"},[e.reqMsg]):x("span",{class:"text-warning"},[q("Public.Status.Wait")])}]),R=r(!1),B=r(""),D=e=>{const t=e.filter((e=>"success"===e.batchStatus)).length,a=e.length-t;B.value=q("Component.Confirm.index_3",[i,e.length,t,a]),R.value=!0,j("setConfirm",{text:"Done",disabled:!1}),M?.(e)};return(()=>{P.value=v.map((e=>({batchStatus:"wait",...e})));const{status:e}=n.data;"done"===e&&D(v)})(),t({onConfirm:({hide:e})=>(R.value?e():(j("setConfirm",{disabled:!0}),s({title:i,hideClose:!0,data:{title:i,api:k,data:P.value,callback:D},component:f})),!1)}),(e,t)=>{const s=a,l=c;return o(),d("div",y,[p("div",S,[g(R)?(o(),d(b,{key:1},[x(s,{name:"base-success",size:"40",class:"text-primary"}),p("div",w,m(g(B)),1)],64)):(o(),d(b,{key:0},[x(s,{name:"base-warning",size:"40",class:"text-warning"}),p("div",_,m(g(u)),1)],64))]),x(l,{"max-height":182,data:g(P),columns:g(z)},null,8,["data","columns"])])}}}))}}}));
