import{d as v,c as i,a as s,q as f,v as g,t as n,b as m,p as k,w as b,s as w,R as y,x as _,r,k as u,l as x,z as E,i as P}from"./index-DPtT_PqD.js";const S={class:"panel form-page"},V={class:"field"},B={key:0,class:"success"},N={key:1,class:"error"},R=["disabled"],h=v({__name:"ForgotPasswordPage",setup(C){const a=r(""),t=r(""),o=r(""),l=r(!1);async function c(){t.value="",o.value="",l.value=!0;try{t.value=await E.forgotPassword({email:a.value})}catch(d){o.value=P(d,"Unable to send password reset link.")}finally{l.value=!1}}return(d,e)=>(u(),i("section",S,[e[3]||(e[3]=s("h2",null,"Reset Password",-1)),e[4]||(e[4]=s("p",null,"Enter your account email to receive a secure reset link.",-1)),s("form",{class:"form",onSubmit:_(c,["prevent"])},[s("div",V,[e[1]||(e[1]=s("label",{for:"email"},"Email",-1)),f(s("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=p=>a.value=p),autocomplete:"email",type:"email",required:""},null,512),[[g,a.value]])]),t.value?(u(),i("p",B,n(t.value),1)):m("",!0),o.value?(u(),i("p",N,n(o.value),1)):m("",!0),s("button",{class:"button primary",type:"submit",disabled:l.value||!a.value},n(l.value?"Sending...":"Send Reset Link"),9,R),k(w(y),{class:"muted-link",to:"/login"},{default:b(()=>[...e[2]||(e[2]=[x("Back to login",-1)])]),_:1})],32)]))}});export{h as default};
