System.register(["./public-legacy.js?v=1764830988434","./page_layout-legacy.js?v=1764830988434","./file-legacy.js?v=1764830988434","./index.vue_vue_type_script_setup_true_lang-legacy12.js?v=1764830988434","./vue-legacy.js?v=1764830988434","./naive-legacy.js?v=1764830988434","./common-legacy.js?v=1764830988434","./__commonjsHelpers__-legacy.js?v=1764830988434"],function(e,t){"use strict";var a,s,i,n,l,o,d,r,c,u,p,_,x,m,g,y,b,D,h,v,f,k,w,j,C;return{setters:[e=>{a=e.d,s=e.h,i=e.Z,n=e.u},e=>{l=e.aL,o=e.n,d=e.d,r=e.fM,c=e.x,u=e.eq},e=>{p=e.e},e=>{_=e.a,x=e._},e=>{m=e.k,g=e.P,y=e.r,b=e.W,D=e.R,h=e.V,v=e.S,f=e.a3,k=e.a4,w=e.U,j=e.an},e=>{C=e.dk},null,null],execute:function(){const t={class:"px-20px py-24px"},L={class:"font-bold"},$={class:"mt-16px text-error"},R={key:0,class:"mt-4px"};e("default",m({__name:"index",props:{data:{}},emits:["close"],setup(e,{expose:m,emit:S}){const{t:U}=g(),q=e,{ids:F}=q.data,H=S,M=l(),P=y(!0),V=y([]),W=e=>{let t="--";for(let a=0;a<M.remoteList.length;a++){const s=M.remoteList[a];if(s.id===e){t=s.ps||s.db_host;break}}return t},Z=y([{key:"name",title:U("Database.index_12"),ellipsis:{tooltip:{width:"trigger"}}},{key:"total",title:U("Component.UploadFile.index_4"),width:120,render:e=>o(e.total)},{key:"position",title:U("Database.index_19")},{key:"addtime",title:U("Docker.Container.config.status.index_11"),width:160,render:e=>e.addtime},{key:"result",title:U("Database.tools.index_24"),align:"right",width:140,render:e=>e.position!==M.remoteList[0].ps?b("div",{class:"text-error"},[U("Database.tools.index_25")]):b("div",{class:P.value?"":"text-error"},[P.value?U("Database.tools.index_26"):U("Database.tools.index_25")])}]),{loading:z,setLoading:A}=a(),B=async e=>await u(M.type,{name:e.name,id:e.id}),E=()=>{n({title:U("Database.index_30"),hideClose:!0,data:{title:U("Database.index_30"),api:B,data:V.value,callback:G},component:_})},G=e=>{H("close"),M.setRefresh(!0),n({title:U("Database.tools.index_30"),width:440,footer:!0,component:x,data:{title:U("Database.index_30"),data:e,status:"done",columns:[{key:"name",title:U("Database.index_12"),ellipsis:{tooltip:{width:"trigger"}}}]}})};return(async()=>{await(async()=>{const{message:e}=await p();d(e)&&(P.value=e.status_db)})(),(async()=>{try{A(!0);const{message:e}=await r({ids:F});d(e)?V.value=c(e.data)?e.data.map(e=>({...e,position:W(e.sid)})):[]:V.value=[]}finally{A(!1)}})()})(),m({onConfirm:()=>{const e=U("Database.tools.index_27"),t=U("Database.tools.index_28");i({text:U("Database.index_30"),title:U("Database.tools.index_29"),content:P.value?e:t,onConfirm:async({hide:e})=>{E(),e()}})}}),(e,a)=>{const i=C,n=s;return h(),D("div",t,[b(i,{type:"warning"},{default:f(()=>[v("span",L,k(e.$t("Database.tools.index_20"))+": ",1),v("span",null,k(e.$t("Database.tools.index_21")),1)]),_:1}),b(n,{class:"mt-16px",loading:w(z),"loading-num":w(F).length,"max-height":300,data:w(V),columns:w(Z)},null,8,["loading","loading-num","data","columns"]),v("div",$,[v("p",null,k(e.$t("Database.tools.index_21")),1),w(P)?j("",!0):(h(),D("p",R,k(e.$t("Database.tools.index_22")),1))])])}}}))}}});
