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