import{d as h,u as V,b as y,h as x,r as R,e as n,o as v,v as q,w,f as d,a as e,A as M,D as U,_ as z,__tla as A}from"./index-04f8d540.js";import{u as D,__tla as j}from"./tagsView-39e918f3.js";import{I as i,__tla as k}from"./InputPassword-8ab9403b.js";import{c as E,__tla as F}from"./profile-71290a49.js";import{u as I,__tla as O}from"./useMessage-9c37e840.js";import{__tla as S}from"./InputPassword.vue_vue_type_style_index_0_scoped_3f07eb1d_lang-2654e1bc.js";let m,B=Promise.all([(()=>{try{return A}catch{}})(),(()=>{try{return j}catch{}})(),(()=>{try{return k}catch{}})(),(()=>{try{return F}catch{}})(),(()=>{try{return O}catch{}})(),(()=>{try{return S}catch{}})()]).then(async()=>{m=z(h({name:"ResetPwd",__name:"ResetPwd",setup(C,{expose:_}){const{push:G,replace:p}=V(),f=y(),c=D(),{t:r}=x(),P=I(),u=R(),s=n({oldPassword:"",newPassword:"",confirmPassword:""}),g=n({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:(l,a,o)=>{s.newPassword!==a?o(new Error(r("profile.password.diffPwd"))):o()},trigger:"blur"}]});return _({reset:l=>{l&&l.resetFields()},submit:l=>{l&&l.validate(async a=>{a&&(await E(s.oldPassword,s.newPassword),P.success(r("common.updateSuccess")),await f.loginOut(),c.delAllViews(),p("/login?redirect=/index"))})},formRef:u}),(l,a)=>{const o=M,b=U;return v(),q(b,{ref_key:"formRef",ref:u,model:e(s),rules:e(g),"label-width":200},{default:w(()=>[d(o,{label:e(r)("profile.password.oldPassword"),prop:"oldPassword"},{default:w(()=>[d(e(i),{modelValue:e(s).oldPassword,"onUpdate:modelValue":a[0]||(a[0]=t=>e(s).oldPassword=t)},null,8,["modelValue"])]),_:1},8,["label"]),d(o,{label:e(r)("profile.password.newPassword"),prop:"newPassword"},{default:w(()=>[d(e(i),{modelValue:e(s).newPassword,"onUpdate:modelValue":a[1]||(a[1]=t=>e(s).newPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"]),d(o,{label:e(r)("profile.password.confirmPassword"),prop:"confirmPassword"},{default:w(()=>[d(e(i),{modelValue:e(s).confirmPassword,"onUpdate:modelValue":a[2]||(a[2]=t=>e(s).confirmPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/Profile/components/ResetPwd.vue"]])});export{B as __tla,m as default};
