1import{e as y,o as N,r as S,j as e,B as r,L as i,I as C,ad as b,af as l}from"./index-OkXy-d5Y.js";import{C as o,a as n,c as m,d as c,b as d}from"./card-BOYNs0rn.js";import{L as k}from"./label-B8fcy5Qd.js";import{u as L}from"./index.esm-B_a780Xx.js";import{M as v}from"./mail-Du3d_nkx.js";import{A as u}from"./arrow-left-BG1TkwtI.js";function P(){const x=y(),s=N(b),[h,p]=S.useState(!1),{register:j,handleSubmit:f,formState:{errors:a}}=L(),g=async t=>{const w=await x(l(t.email));l.fulfilled.match(w)&&(sessionStorage.setItem("smritea_reset_email",t.email),p(!0))};return h?e.jsxs(o,{children:[e.jsxs(n,{className:"text-center",children:[e.jsx(v,{className:"h-12 w-12 text-primary mx-auto mb-2"}),e.jsx(m,{children:"Check your email"}),e.jsx(c,{children:"We've sent a password reset link to your email address."})]}),e.jsx(d,{children:e.jsx(r,{variant:"outline",className:"w-full",asChild:!0,children:e.jsxs(i,{to:"/auth/login",children:[e.jsx(u,{className:"mr-2 h-4 w-4"})," Back to login"]})})})]}):e.jsxs(o,{children:[e.jsxs(n,{className:"text-center",children:[e.jsx(m,{children:"Forgot your password?"}),e.jsx(c,{children:"Enter your email and we'll send you a reset link."})]}),e.jsxs(d,{children:[e.jsxs("form",{onSubmit:f(g),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{htmlFor:"email",children:"Email"}),e.jsx(C,{id:"email",type:"email",placeholder:"[email protected]",...j("email",{required:"Email is required"})}),a.email&&e.jsx("p",{className:"text-xs text-destructive",children:a.email.message})]}),e.jsx(r,{type:"submit",className:"w-full",disabled:s,children:s?"Sending...":"Send Reset Link"})]}),e.jsx("div",{className:"mt-4 text-center",children:e.jsxs(i,{to:"/auth/login",className:"text-sm text-muted-foreground hover:text-foreground",children:[e.jsx(u,{className:"inline h-3 w-3 mr-1"})," Back to login"]})})]})]})}export{P as ForgotPasswordPage};
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.