import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{hA as e}from"./page_layout.js?v=1763625242172";import{k as s,P as l,n as o,r,e as t,R as n,S as u,X as d,a3 as p,V as i}from"./vue.js?v=1763625242172";import{au as m,dP as _}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./public.js?v=1763625242172";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((()=>{j.username=b.username,j.host=b.host}));const h=r(null),j=t({sid:0,username:"",password:"",host:"127.0.0.1"}),g={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:j.sid,username:j.username,password:j.password,host:j.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(j),rules:g},{default:p((()=>[d(o,{label:e.$t("Database.index_13")},{default:p((()=>[d(l,{class:"w-250px!",value:i(j).username,"onUpdate:value":s[0]||(s[0]=a=>i(j).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(j).host,"onUpdate:value":s[1]||(s[1]=a=>i(j).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(j).password,"onUpdate:value":s[2]||(s[2]=a=>i(j).password=a),placeholder:e.$t("Config.Panel.index_67")},null,8,["value","placeholder"])])),_:1},8,["label"])])),_:1},8,["model"])])}}});export{f as default};
