System.register(["./page_layout-legacy.js?v=1764233927359","./public-legacy.js?v=1764233927359","./naive-legacy.js?v=1764233927359","./vue-legacy.js?v=1764233927359"],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.bH,n=e.d5,c=e.dg},e=>{i=e.k,r=e.r,u=e.c,o=e.R,d=e.V,p=e.S,m=e.W,g=e.a4,x=e.U,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=n(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=n(e,"message.result","")}b?.(i),f("close")})(),(e,a)=>{const s=l;return d(),o("div",t,[p("div",v,[p("span",null,g(e.$t("Component.Batch.index_3",x(c))),1),p("span",null,g(x(S))+"/"+g(x(_)),1)]),m(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"},_={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?m("span",{class:"text-primary"},[e.reqMsg]):"error"===e.batchStatus?m("span",{class:"text-error"},[e.reqMsg]):m("span",{class:"text-warning"},[q("Public.Status.Wait")])}]),R=r(!1),W=r(""),B=e=>{const t=e.filter(e=>"success"===e.batchStatus).length,a=e.length-t;W.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&&B(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:B},component:f})),!1)}),(e,t)=>{const s=a,l=c;return d(),o("div",y,[p("div",S,[x(R)?(d(),o(b,{key:1},[m(s,{name:"base-success",size:"40",class:"text-primary"}),p("div",w,g(x(W)),1)],64)):(d(),o(b,{key:0},[m(s,{name:"base-warning",size:"40",class:"text-warning"}),p("div",_,g(x(u)),1)],64))]),m(l,{"max-height":182,data:x(P),columns:x(z)},null,8,["data","columns"])])}}}))}}});
