import{_ as a}from"./index_173035598736.js";import{_ as s}from"./index_173035598733.js";import{d as e,ak as o,s as d,u as n,J as l,c as t,o as r,f as c,P as i,g as p,w as u,t as w,ai as m,z as h,aj as v,B as P,C as _,_ as f}from"./index_1730355987.js";const x={class:"page"},V={class:"paw-box"},g=(a=>(P("data-v-0c2da475"),a=a(),_(),a))((()=>p("p",null,"Alterar senha",-1))),k=["onClick"],b=f(e({__name:"index",setup(e){const P=o("socket"),_=d(),f=n();l((async()=>{}));const b=t({newPwd:"",oldPwd:""}),j=()=>{_.push("/password")},y=async()=>{if(b.newPwd.length<6)return w("Por favor, insira a senha correta");m();const a=await h.pwdRestPwd(b);if(0!=a.code)return v(),w(a.txt);v(),w("Mudança de senha bem sucedida, por favor, rexistre novamente"),f.clearUser(),P.disconnect(),_.replace("/login")};return(e,o)=>{const d=s,n=a;return r(),c("div",x,[i(d),p("div",V,[g,i(n,{type:"password",placeholder:"Atual senha",modelValue:b.oldPwd,"onUpdate:modelValue":o[0]||(o[0]=a=>b.oldPwd=a)},null,8,["modelValue"]),i(n,{type:"password",class:"two-input",maxlength:16,placeholder:"Nova senha",modelValue:b.newPwd,"onUpdate:modelValue":o[1]||(o[1]=a=>b.newPwd=a)},null,8,["modelValue"]),p("div",{class:"btn",onClick:y},"Mudar"),p("div",{class:"bottom",onClick:u(j,["stop"])},"Esqueci minha senha?",8,k)])])}}}),[["__scopeId","data-v-0c2da475"]]);export{b as default};
