System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy2.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./index-legacy131.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./index-legacy98.js?v=1763625242172","./index-legacy132.js?v=1763625242172","./soft-legacy.js?v=1763625242172","./site-legacy.js?v=1763625242172"],(function(e,a){"use strict";var l,s,t,r,n,u,d,i,o,c,_,p,b,g,m,v,f,x,y,h,j,w,D,$,U;return{setters:[e=>{l=e._},e=>{s=e.bn,t=e.eV,r=e.o,n=e.m},e=>{u=e._},e=>{d=e.k,i=e.P,o=e.a0,c=e.r,_=e.e,p=e.c,b=e.R,g=e.a2,m=e.a3,v=e.X,f=e.U,x=e.V,y=e.j,h=e.a4,j=e.N},null,e=>{w=e.g},e=>{D=e.au,$=e.dP,U=e.dV},null,null,null,null,null,null],execute:function(){const a={class:"w-240px"},k={class:"w-240px"},q={class:"w-240px"},R={class:"w-240px"},V={class:"ml-8px"};e("default",d({__name:"index",setup(e,{expose:d}){const{t:C}=i(),E=s(),{remoteList:P}=o(E),H=c(null),L=_({sid:P.value.length>0?P.value[0].id:null,name:"",db_user:"",password:"",active:!1,ssl:""}),N=p((()=>P.value.map((e=>({label:`${e.ps} (${e.db_host})`,value:e.id}))))),S={name:{required:!0,message:C("Database.form.index_15"),trigger:["blur","change"]},db_user:{required:!0,message:C("Database.form.index_16"),trigger:["blur","change"]},password:{required:!0,message:C("Database.form.index_17"),trigger:["blur","change"]},sid:{trigger:"change",validator:(e,a)=>null!==a||new Error(C("Database.form.index_18"))}},X=e=>{L.db_user=e},z=()=>{w()};return d({onConfirm:async({hide:e})=>{try{await(H.value?.validate());const a=(()=>{const{sid:e}=L;if(null===e)throw n.error(C("Database.form.index_18")),new Error(C("Database.form.index_18"));return{...j(L),sid:e,ps:L.name}})();await t(E.type,a),E.setRefresh(!0),e()}catch(a){console.error(a)}}}),(e,s)=>{const t=D,n=$,d=u,i=U,o=r,c=l;return b(),g(c,{ref_key:"formRef",ref:H,model:x(L),rules:S,class:"p-20px"},{default:m((()=>[v(n,{label:e.$t("Database.index_12"),path:"name"},{default:m((()=>[f("div",a,[v(t,{value:x(L).name,"onUpdate:value":[s[0]||(s[0]=e=>x(L).name=e),X],placeholder:e.$t("Database.form.index_2")},null,8,["value","placeholder"])])])),_:1},8,["label"]),v(n,{label:e.$t("Database.index_13"),path:"db_user"},{default:m((()=>[f("div",k,[v(t,{value:x(L).db_user,"onUpdate:value":s[1]||(s[1]=e=>x(L).db_user=e),placeholder:e.$t("Database.form.index_4")},null,8,["value","placeholder"])])])),_:1},8,["label"]),v(n,{label:e.$t("Database.index_14"),path:"password"},{default:m((()=>[f("div",q,[v(d,{value:x(L).password,"onUpdate:value":s[2]||(s[2]=e=>x(L).password=e),placeholder:""},null,8,["value"])])])),_:1},8,["label"]),v(n,{label:e.$t("Database.form.index_9"),path:"sid"},{default:m((()=>[f("div",R,[v(i,{value:x(L).sid,"onUpdate:value":s[3]||(s[3]=e=>x(L).sid=e),options:x(N)},null,8,["value","options"])]),f("div",V,[v(o,{onClick:z},{default:m((()=>[y(h(e.$t("Database.form.index_10")),1)])),_:1})])])),_:1},8,["label"])])),_:1},8,["model"])}}}))}}}));
