import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{_ as h}from"./index.vue_vue_type_script_setup_true_lang-DG86e1NA.js?v=1773287522785";import{gx as y}from"./index-BTglIPU2.js?v=1773287522785";import{u as R}from"./index-B5d4M70B.js?v=1773287522785";import{k as $,R as k,r as C,e as B,$ as N,a8 as E,a9 as p,a0 as r,_ as u,S as s,N as P}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as S,b as U}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const V={class:"w-280px"},I={class:"w-280px"},L=$({__name:"index",props:{data:{}},setup(_,{expose:f}){const{t:m}=k(),c=_,{row:t}=c.data,d=R(),i=C(null),a=B({name:t.username,password:t.password}),w={password:{trigger:["blur","input"],validator:()=>a.password?a.password.length<6?new Error(m("Database.form.index_20")):!0:new Error(m("Database.form.index_17"))}},b=()=>({id:t.id,...P(a)});return f({onConfirm:async()=>{var o;try{await((o=i.value)==null?void 0:o.validate());const e=b();await y(d.type,e),d.setRefresh(!0)}catch(e){console.warn(e)}}}),(o,e)=>{const x=U,l=S,v=h,g=D;return N(),E(g,{ref_key:"formRef",ref:i,model:s(a),rules:w,class:"px-20px pt-28px pb-8px"},{default:p(()=>[r(l,{label:o.$t("Database.index_13"),path:"name"},{default:p(()=>[u("div",V,[r(x,{value:s(a).name,"onUpdate:value":e[0]||(e[0]=n=>s(a).name=n),disabled:!0},null,8,["value"])])]),_:1},8,["label"]),r(l,{label:o.$t("Database.index_14"),path:"password"},{default:p(()=>[u("div",I,[r(v,{value:s(a).password,"onUpdate:value":e[1]||(e[1]=n=>s(a).password=n),default:!s(t).password,"input-props":{name:"password"}},null,8,["value","default"])])]),_:1},8,["label"])]),_:1},8,["model"])}}});export{L as default};
