import{d as b,r as y,f as u,o as h,l as V,w as n,i as l,a as e,n as v,H as R,K as q,_ as k,__tla as x}from"./index-2c56227b.js";import{_ as M,__tla as U}from"./XButton-c87840c8.js";import{I as i,__tla as C}from"./InputPassword-9eb7a182.js";import{a as E,__tla as H}from"./profile-f7c82a7d.js";import{u as A,__tla as F}from"./useMessage-96878a4a.js";let p,G=Promise.all([(()=>{try{return x}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return C}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return F}catch{}})()]).then(async()=>{p=k(b({name:"ResetPwd",__name:"ResetPwd",setup(I){const{t:r}=v(),_=A(),w=y(),s=u({oldPassword:"",newPassword:"",confirmPassword:""}),f=u({oldPassword:[{required:!0,message:r("profile.password.oldPwdMsg"),trigger:"blur"},{min:6,max:20,message:r("profile.password.pwdRules"),trigger:"blur"}],newPassword:[{required:!0,message:r("profile.password.newPwdMsg"),trigger:"blur"},{min:6,max:20,message:r("profile.password.pwdRules"),trigger:"blur"}],confirmPassword:[{required:!0,message:r("profile.password.cfPwdMsg"),trigger:"blur"},{required:!0,validator:(c,a,o)=>{s.newPassword!==a?o(new Error(r("profile.password.diffPwd"))):o()},trigger:"blur"}]});return(c,a)=>{const o=R,m=M,P=q;return h(),V(P,{ref_key:"formRef",ref:w,model:e(s),rules:e(f),"label-width":200},{default:n(()=>[l(o,{label:e(r)("profile.password.oldPassword"),prop:"oldPassword"},{default:n(()=>[l(e(i),{modelValue:e(s).oldPassword,"onUpdate:modelValue":a[0]||(a[0]=t=>e(s).oldPassword=t)},null,8,["modelValue"])]),_:1},8,["label"]),l(o,{label:e(r)("profile.password.newPassword"),prop:"newPassword"},{default:n(()=>[l(e(i),{modelValue:e(s).newPassword,"onUpdate:modelValue":a[1]||(a[1]=t=>e(s).newPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"]),l(o,{label:e(r)("profile.password.confirmPassword"),prop:"confirmPassword"},{default:n(()=>[l(e(i),{modelValue:e(s).confirmPassword,"onUpdate:modelValue":a[2]||(a[2]=t=>e(s).confirmPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"]),l(o,null,{default:n(()=>[l(m,{title:e(r)("common.save"),type:"primary",onClick:a[3]||(a[3]=t=>{var d;(d=e(w))&&d.validate(async g=>{g&&(await E(s.oldPassword,s.newPassword),_.success(r("common.updateSuccess")))})})},null,8,["title"]),l(m,{title:e(r)("common.reset"),type:"danger",onClick:a[4]||(a[4]=t=>{var d;(d=e(w))&&d.resetFields()})},null,8,["title"])]),_:1})]),_:1},8,["model","rules"])}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/Profile/components/ResetPwd.vue"]])});export{G as __tla,p as default};
