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