import{H as h,u as b,P as v,a as g,k as w,r as n,o as A,q as x,f as a,t as o,d as r,w as i,e as S,n as T,I as y,F as B,j as $,l as d}from"./index-0c00d6f8.js";import{c as E,a as k}from"./index.esm-17a8dbbe.js";const F={class:"mt-24 flex flex-col justify-between"},O={class:"text-text font-bold mb-3 text-3xl md:text-4xl flex items-center gap-3"},I={class:"text-sub mb-7 capitalize"},L={class:"w-100","aria-autocomplete":"none"},C=["disabled"],V=h({__name:"ForgetPassword",setup(N){const c=b();v({validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const m=g(),u=E().shape({emailAddress:k().required(m.t("ERRORS.emailAddress"))}),t=w(!1);function p(e){t.value=!0;const l=new FormData;l.append("email",e.emailAddress),$.post("forgot_password",l).then(s=>{sessionStorage.setItem("emailAddress",e.emailAddress),setTimeout(()=>d.success(s.data.message),400),t.value=!1,c.push("/auth/verify")}).catch(s=>{t.value=!1,d.error(s.response.data.message)})}return(e,l)=>{const s=n("base-input"),f=n("VeeForm"),_=n("router-link");return A(),x(B,null,[a("div",F,[a("div",null,[a("h2",O,o(e.$t("TITLES.resetPassword")),1),a("p",I,o(e.$t("TITLES.pleaseEnterYourEmailAddressBelowToRecoveryYourPassword")),1),r(f,{as:"div",onSubmit:p,"validation-schema":S(u)},{default:i(()=>[a("form",L,[r(s,{id:"emailAddress",name:"emailAddress",placeholder:e.$t("LABELS.emailAddress"),label:e.$t("LABELS.emailAddress"),type:"email",icon:"envelope"},null,8,["placeholder","label"]),a("button",{disabled:t.value,type:"submit",block:"",class:"base-btn capitalize rounded-lg w-full py-5 mt-11"},o(e.$t("BUTTONS.send")),9,C)])]),_:1},8,["validation-schema"])])]),r(_,{to:"/auth/login",class:"text-main flex items-center gap-2 mt-auto pb-5"},{default:i(()=>[a("i",{class:T(["fas mt-1",e.$i18n.locale=="en"?" fa-arrow-left":" fa-arrow-right"])},null,2),y(" "+o(e.$t("BUTTONS.back")),1)]),_:1})],64)}}});export{V as default};
