System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764830988434","./vue-legacy.js?v=1764830988434","./page_layout-legacy.js?v=1764830988434","./public-legacy.js?v=1764830988434","./naive-legacy.js?v=1764830988434","./__commonjsHelpers__-legacy.js?v=1764830988434","./common-legacy.js?v=1764830988434"],function(e,a){"use strict";var l,s,t,n,r,o,u,i,c,d,_,p,v,g,y,f,m,x;return{setters:[e=>{l=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.V,d=e.W,_=e.a3,p=e.S,v=e.U},e=>{g=e.aL,y=e.fG,f=e.m},null,e=>{m=e.dR,x=e.dV},null,null],execute:function(){const a={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,a)=>null!==a||new Error(h("Database.tools.index_63"))}};return s({onConfirm:async({hide:e})=>{try{await(D.value?.validate());const a=(()=>{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,a),j.setRefresh(!0),e()}catch(a){console.error(a)}}}),(e,s)=>{const t=x,n=m,r=l;return c(),i("div",a,[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"])])}}}))}}});
