import{d as h,u as V,e as x,i as y,r as R,f as n,o as q,x as v,w,g as d,a as e,B as M,G as U,_ as z,__tla as j}from"./index-7d5b26d3.js";import{u as k,__tla as A}from"./tagsView-c579c139.js";import{I as i,__tla as B}from"./InputPassword-1783ab10.js";import{c as D,__tla as E}from"./profile-d2740243.js";import{u as F,__tla as G}from"./useMessage-c81eaa5b.js";import{__tla as I}from"./InputPassword.vue_vue_type_style_index_0_scoped_3f07eb1d_lang-5d0205e1.js";let m,O=Promise.all([(()=>{try{return j}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return B}catch{}})(),(()=>{try{return E}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return I}catch{}})()]).then(async()=>{m=z(h({name:"ResetPwd",__name:"ResetPwd",setup(S,{expose:_}){const{push:C,replace:p}=V(),f=x(),c=k(),{t:r}=y(),P=F(),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 D(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 q(),v(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{O as __tla,m as default};
