import{_ as x}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{ii as g}from"./index-BTglIPU2.js?v=1773287522785";import{k as h,R as C,n as $,r as k,e as P,$ as y,Z as U,a0 as a,a9 as r,S as o}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as q,b as B}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const D={class:"p-16px"},T=h({__name:"index",props:{data:{}},setup(m,{expose:_}){const{t:f}=C(),c=m,{onRefresh:l,params:u}=c.data;$(()=>{e.username=u.username,e.host=u.host});const i=k(null),e=P({sid:0,username:"",password:"",host:"127.0.0.1"}),w={password:{required:!0,message:f("Config.Panel.index_67"),trigger:["blur","input"]}},b=()=>({sid:e.sid,username:e.username,password:e.password,host:e.host});return _({onConfirm:async()=>{var s;await((s=i.value)==null?void 0:s.validate()),await g(b()),l==null||l()}}),(s,n)=>{const d=B,p=q,v=x;return y(),U("div",D,[a(v,{ref_key:"formRef",ref:i,model:o(e),rules:w},{default:r(()=>[a(p,{label:s.$t("Database.index_13")},{default:r(()=>[a(d,{class:"w-250px!",value:o(e).username,"onUpdate:value":n[0]||(n[0]=t=>o(e).username=t),disabled:""},null,8,["value"])]),_:1},8,["label"]),a(p,{label:s.$t("Database.Mysql.index_4")},{default:r(()=>[a(d,{class:"w-250px!",value:o(e).host,"onUpdate:value":n[1]||(n[1]=t=>o(e).host=t),disabled:""},null,8,["value"])]),_:1},8,["label"]),a(p,{label:s.$t("Password.index_2"),path:"password"},{default:r(()=>[a(d,{class:"w-250px!",value:o(e).password,"onUpdate:value":n[2]||(n[2]=t=>o(e).password=t),placeholder:s.$t("Config.Panel.index_67")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])])}}});export{T as default};
