System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172"],(function(e,l){"use strict";var a,s,t,n,r,o,u,i,c,d,_,p,v,g,y,f,m,x;return{setters:[e=>{a=e._},e=>{s=e.k,t=e.P,n=e.a0,r=e.r,o=e.e,u=e.c,i=e.R,c=e.S,d=e.X,_=e.a3,p=e.U,v=e.V},e=>{g=e.bn,y=e.fN,f=e.m},null,e=>{m=e.dV,x=e.dP},null,null],execute:function(){const l={class:"px-20px pt-24px pb-8px"},b={class:"w-260px"};e("default",s({__name:"index",setup(e,{expose:s}){const{t:h}=t(),j=g(),{remoteList:w}=n(j),D=r(null),R=o({sid:w.value.length>0?w.value[0].id:null}),$=u((()=>w.value.map((e=>({label:`${e.ps||e.db_host} (${e.db_host})`,value:e.id}))))),k={sid:{trigger:"change",validator:(e,l)=>null!==l||new Error(h("Database.tools.index_63"))}};return s({onConfirm:async({hide:e})=>{try{await(D.value?.validate());const l=(()=>{const{sid:e}=R;if(null===e)throw f.error(h("Database.tools.index_64")),new Error(h("Database.tools.index_64"));return{sid:e}})();await y(j.type,l),j.setRefresh(!0),e()}catch(l){console.error(l)}}}),(e,s)=>{const t=m,n=x,r=a;return i(),c("div",l,[d(r,{ref_key:"formRef",ref:D,model:v(R),rules:k},{default:_((()=>[d(n,{label:e.$t("Database.tools.index_76"),path:"sid"},{default:_((()=>[p("div",b,[d(t,{value:v(R).sid,"onUpdate:value":s[0]||(s[0]=e=>v(R).sid=e),class:"server-select",options:v($)},null,8,["value","options"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}}))}}}));
