System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./index-legacy-y1mYB81o.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(e,a){"use strict";var s,t,l,r,n,i,o,u,d,c,p,_,v,x,g,f,y,b;return{setters:[e=>{s=e._},e=>{t=e.k,l=e.R,r=e.a6,n=e.r,i=e.e,o=e.c,u=e.$,d=e.Z,c=e.a0,p=e.a9,_=e._,v=e.S},e=>{x=e.gs,g=e.m},e=>{f=e.u},e=>{y=e.a1,b=e.a6},null],execute:function(){const a={class:"px-20px pt-24px pb-8px"},m={class:"w-260px"};e("default",t({__name:"index",setup(e,{expose:t}){const{t:h}=l(),j=f(),{remoteList:w}=r(j),D=n(null),$=i({sid:w.value.length>0?w.value[0].id:null}),R=o((()=>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 t({onConfirm:async({hide:e})=>{try{await(D.value?.validate());const a=(()=>{const{sid:e}=$;if(null===e)throw g.error(h("Database.tools.index_64")),new Error(h("Database.tools.index_64"));return{sid:e}})();await x(j.type,a),j.setRefresh(!0),e()}catch(a){console.error(a)}}}),(e,t)=>{const l=b,r=y,n=s;return u(),d("div",a,[c(n,{ref_key:"formRef",ref:D,model:v($),rules:k},{default:p((()=>[c(r,{label:e.$t("Database.tools.index_76"),path:"sid"},{default:p((()=>[_("div",m,[c(l,{value:v($).sid,"onUpdate:value":t[0]||(t[0]=e=>v($).sid=e),class:"server-select",options:v(R)},null,8,["value","options"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}}))}}}));
