import{c as s,o as a,r as e,q as r,v as o,x as t,e as d,B as i,y as l,R as n,ab as m,a9 as p}from"./base-lib.js?v=1761009159";import{_ as u}from"./index103.js?v=1761009159";import{setPgSqlPassword as c,getPgSqlPassword as g}from"./database.js?v=1761009159";import{y as f,P as w}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const _={class:"px-[20px] py-[20px]"},b=s({__name:"index",setup(s,{expose:b}){const x={password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,message:"密码长度至少为6位",trigger:["blur","change"]}]},y=a({password:""}),j=e();return r(async()=>{const s=await w({loading:"正在获取密码，请稍后...",request:g(),data:{msg:String}});y.password=s.msg||""}),b({onConfirm:async s=>{await j.value.validate(),await w({loading:"正在设置密码...",request:c({data:JSON.stringify({password:y.password})}),message:!0,success:a=>{a.status&&s()}})}}),(s,a)=>{const e=u,r=m,c=p;return o(),t("div",_,[d(c,{model:l(y),ref_key:"adminPwdRef",ref:j,rules:x,onSubmit:a[2]||(a[2]=n(()=>{},["prevent"]))},{default:i(()=>[d(r,{label:"管理员密码",prop:"password"},{default:i(()=>[d(e,{icon:"el-refresh",modelValue:l(y).password,"onUpdate:modelValue":a[0]||(a[0]=s=>l(y).password=s),onIconClick:a[1]||(a[1]=()=>l(y).password=l(f)(16))},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])}}});export{b as default};
