1import{aQ as a,bo as e,a$ as o,cl as s,aT as t,r as n,e as l,dw as i,B as r,b9 as d,bm as c,aR as m,aS as u,aV as g,bn as p,bp as f,bA as b,br as v,b1 as h}from"./index-B0wWhsKS.js";import{a as w}from"./arrow-left-CmOA6Sh5.js";import{P as y}from"./PInput-B4D7YZGq.js";import{_ as I}from"./logo-stacked-DMI_3xJo.js";import"./phone-BfEgewkX.js";const k=a({name:"ForgotPasswordPage",components:{IonPage:t,IonImg:s,IonContent:o,IonButton:e,PInput:y},setup(){const a=n({email:"",otp:""}),e=n(!1),o=n(""),s=l(()=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value.email)),t=n(!1);return{formData:a,emailTouched:e,emailError:o,isFormValid:s,isSubmitting:t,handleSubmit:async()=>{if(s.value&&!t.value){t.value=!0;try{await i(a.value.email);const{showToast:e}=r();await e("If an account exists for ".concat(a.value.email,", you'll receive a password reset link shortly. Check your inbox and spam folder."),"success",5e3),setTimeout(()=>{d.push("/signin")},2500)}catch(e){const{showToast:a}=r(),o=(null==e?void 0:e.message)||"Could not send reset email. Please try again.";await a(o,"danger",4e3)}finally{t.value=!1}}},markEmailTouched:()=>{e.value=!0},arrowLeft:w,goToSignIn:()=>{d.go(-1)}}}}),S={class:"content-wrapper"},T={class:"signin-wrapper"},x={class:"content-container"},P={class:"form-group"},E={class:"bottom-section"};const C=c(k,[["render",function(a,e,o,s,t,n){const l=v("ion-img"),i=v("PInput"),r=v("ion-button"),d=v("ion-content"),c=v("ion-page");return h(),m(c,null,{default:u(()=>[g(d,{"force-overscroll":!1,class:"ion-padding signin-content"},{default:u(()=>[p("div",S,[p("div",T,[p("div",x,[g(l,{src:a.arrowLeft,class:"arrow-left-icon",onClick:a.goToSignIn},null,8,["src","onClick"]),e[2]||(e[2]=p("div",{class:"logo-container"},[p("img",{src:I,alt:"Pawsitive Foster Logo",class:"pawsitive-logo"})],-1)),e[3]||(e[3]=p("div",{class:"header-section"},[p("h4",{class:"heading-lg",style:{font:"var(--text-h4)","font-weight":"var(--font-weight-medium)"}},"Forgot your password?"),p("div",{class:"text-secondary Body-XSmall-Small-Regular"},"Enter your email and weâll send a reset link so you can get back to helping fosters.")],-1)),p("div",P,[g(i,{id:"emailInput",label:"Email",type:"email",modelValue:a.formData.email,"onUpdate:modelValue":e[0]||(e[0]=e=>a.formData.email=e),required:!0,placeholder:"Enter your email",touched:a.emailTouched,errorText:a.emailError,onBlur:a.markEmailTouched,onValidation:e[1]||(e[1]=e=>{a.emailError=e?"":"Invalid email format"})},null,8,["modelValue","touched","errorText","onBlur"])]),p("div",E,[g(r,{expand:"block",shape:"round",class:"submit-button",disabled:!a.isFormValid||a.isSubmitting,onClick:a.handleSubmit},{default:u(()=>[f(b(a.isSubmitting?"Sendingâ¦":"Send reset link"),1)]),_:1},8,["disabled","onClick"])])])])])]),_:1})]),_:1})}],["__scopeId","data-v-9deb8d3e"]]);export{C as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.