import{_ as k}from"./AppTextField.vue_vue_type_script_setup_true_lang-e8a09900.js";import{d as y,l as r,r as I,o as C,b as L,w as a,q as e,n as o,a6 as d,s,L as R,ay as f,V as T,x as B,av as E,S as N,H as S,b4 as F,W as M,I as P,A as j,bN as A,aB as m}from"./index-2e57ee69.js";import{u as _,m as D,a as q}from"./misc-mask-light-8659f0a3.js";import{a as t,V as p}from"./VRow-22fc34ca.js";import{b as g}from"./route-block-83d24a4e.js";const G="/assets/auth-v2-forgot-password-illustration-dark-ade65f2e.png",H="/assets/auth-v2-forgot-password-illustration-light-1ef614ab.png",O={class:"position-relative bg-background rounded-lg w-100 ma-8 me-0"},U={class:"d-flex align-center justify-center w-100 h-100"},W=o("h5",{class:"text-h5 mb-1"}," ¿Olvidaste tu contraseña? 🔒 ",-1),$=o("p",{class:"mb-0"}," Ingresa tu correo electrónico y te enviaremos instrucciones para restablecer tu contraseña. ",-1),z=o("span",null,"Regresar al login",-1),J=y({__name:"forgot-password",setup(K){const l=r(""),i=r(),n=r(!1),h=_(H,G),v=_(q,D),V=async()=>{const{valid:c}=await i.value.validate();c&&(n.value=!0,A.resetPassword(l.value).then(()=>{m.success("Email enviado")}).catch(()=>{m.error("Error al enviar el email")}).finally(()=>{n.value=!1}))};return(c,u)=>{const b=k,w=I("RouterLink");return C(),L(p,{class:"auth-wrapper bg-surface","no-gutters":""},{default:a(()=>[e(t,{lg:"8",class:"d-none d-lg-flex"},{default:a(()=>[o("div",O,[o("div",U,[e(d,{"max-width":"368",src:s(h),class:"auth-illustration mt-16 mb-2"},null,8,["src"])]),e(d,{class:"auth-footer-mask",src:s(v)},null,8,["src"])])]),_:1}),e(t,{cols:"12",lg:"4",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{flat:"","max-width":500,class:"mt-12 mt-sm-0 pa-4"},{default:a(()=>[e(f,null,{default:a(()=>[e(s(T),{nodes:s(B).app.logo,class:"mb-6"},null,8,["nodes"]),W,$]),_:1}),e(f,null,{default:a(()=>[e(E,{ref_key:"form",ref:i,onSubmit:N(V,["prevent"])},{default:a(()=>[e(p,null,{default:a(()=>[e(t,{cols:"12"},{default:a(()=>[e(b,{modelValue:s(l),"onUpdate:modelValue":u[0]||(u[0]=x=>S(l)?l.value=x:null),autofocus:"",label:"Email",type:"email",rules:[s(F)]},null,8,["modelValue","rules"])]),_:1}),e(t,{cols:"12"},{default:a(()=>[e(M,{block:"",type:"submit",style:{"text-transform":"none"},loading:s(n)},{default:a(()=>[P(" Enviar enlace de reinicio ")]),_:1},8,["loading"])]),_:1}),e(t,{cols:"12"},{default:a(()=>[e(w,{class:"d-flex align-center justify-center",to:{name:"login"}},{default:a(()=>[e(j,{icon:"tabler-chevron-left",class:"flip-in-rtl"}),z]),_:1})]),_:1})]),_:1})]),_:1},8,["onSubmit"])]),_:1})]),_:1})]),_:1})]),_:1})}}});typeof g=="function"&&g(J);export{J as default};
