import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{gt as e}from"./page_layout.js?v=1753954525509";import{k as s,P as l,n as o,r,e as t,U as n,V as u,Q as d,a2 as p,X as i}from"./vue.js?v=1753954525509";import{aq as m,cA as _}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./public.js?v=1753954525509";const v={class:"p-16px"},f=s({__name:"index",props:{data:{}},setup(s,{expose:f}){const{t:c}=l(),w=s,{onRefresh:x,params:b}=w.data;o((()=>{g.username=b.username,g.host=b.host}));const h=r(null),g=t({sid:0,username:"",password:"",host:"127.0.0.1"}),j={password:{required:!0,message:c("Config.Panel.index_67"),trigger:["blur","input"]}};return f({onConfirm:async()=>{var a;await(null==(a=h.value)?void 0:a.validate()),await e({sid:g.sid,username:g.username,password:g.password,host:g.host}),null==x||x()}}),(e,s)=>{const l=m,o=_,r=a;return n(),u("div",v,[d(r,{ref_key:"formRef",ref:h,model:i(g),rules:j},{default:p((()=>[d(o,{label:e.$t("Database.index_13")},{default:p((()=>[d(l,{class:"w-250px!",value:i(g).username,"onUpdate:value":s[0]||(s[0]=a=>i(g).username=a),disabled:""},null,8,["value"])])),_:1},8,["label"]),d(o,{label:e.$t("Database.Mysql.index_4")},{default:p((()=>[d(l,{class:"w-250px!",value:i(g).host,"onUpdate:value":s[1]||(s[1]=a=>i(g).host=a),disabled:""},null,8,["value"])])),_:1},8,["label"]),d(o,{label:e.$t("Password.index_2"),path:"password"},{default:p((()=>[d(l,{class:"w-250px!",value:i(g).password,"onUpdate:value":s[2]||(s[2]=a=>i(g).password=a),placeholder:e.$t("Config.Panel.index_67")},null,8,["value","placeholder"])])),_:1},8,["label"])])),_:1},8,["model"])])}}});export{f as default};
