1import{r as x}from"./rolldown-runtime.C1f3BsDW.js";import{t as m}from"./inertia.BE4YqsTM.js";import"./http.DWpeO7Ui.js";import{Gr as d,Kt as N,Qr as b,_r as v}from"./icons.ChOq_Y4q.js";import{t as y}from"./react-core.CAMe6Z4j.js";import"./utils.CgzVjNgC.js";import"./state.L8kQliOB.js";import{i as w,k}from"./entry-client.DX3aUoe5.js";import{n as _}from"./input.GzdAc1Aj.js";import"./dist.DxccqHSW.js";import{t as S}from"./label.D8t8fk_6.js";import{t as c}from"./SEO.gPDL2mFy.js";import{t as E}from"./logo.7ZVhR9ER.js";import{t as u}from"./Card.CbhBZ5MF.js";var i=x(b(),1),e=x(y(),1);const C=()=>{const{forgotPassword:f,isLoading:t,error:o,clearError:h}=w(),[r,p]=(0,i.useState)(""),[l,n]=(0,i.useState)(""),[g,s]=(0,i.useState)(!1),j=async a=>{if(a.preventDefault(),n(""),h(),!r){n("Enter your email address.");return}try{await f(r),s(!0)}catch{s(!0)}};return g?(0,e.jsxs)("main",{id:"main-content",className:"min-h-screen bg-background flex items-center justify-center p-6",children:[(0,e.jsx)(c,{title:"Password reset sent",noIndex:!0}),(0,e.jsx)("div",{className:"w-full max-w-md animate-fade-in",children:(0,e.jsxs)(u,{variant:"default",padding:"lg",className:"border-border/50 text-center",children:[(0,e.jsx)("div",{className:"flex justify-center mb-6",children:(0,e.jsx)("div",{className:"h-16 w-16 rounded-full bg-success/10 flex items-center justify-center",children:(0,e.jsx)(v,{className:"h-8 w-8 text-success","aria-hidden":"true"})})}),(0,e.jsx)("h2",{className:"text-2xl font-bold text-foreground mb-2",children:"Check your email"}),(0,e.jsxs)("p",{className:"text-muted-foreground mb-6",children:["If an account exists with"," ",(0,e.jsx)("strong",{className:"text-foreground",children:r}),", you will receive a password reset link shortly."]}),(0,e.jsxs)("p",{className:"text-sm text-muted-foreground mb-6",children:["Didn't receive the email? Check your spam folder or"," ",(0,e.jsx)("button",{type:"button",onClick:()=>s(!1),className:"text-primary hover:text-primary/80 transition-colors",children:"try again"})]}),(0,e.jsxs)(m,{href:"/login",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,e.jsx)(d,{className:"h-4 w-4","aria-hidden":"true"}),"Back to log in"]})]})})]}):(0,e.jsxs)("main",{id:"main-content",className:"min-h-screen bg-background flex items-center justify-center p-6",children:[(0,e.jsx)(c,{title:"Forgot password",noIndex:!0}),(0,e.jsxs)("div",{className:"w-full max-w-md animate-fade-in",children:[(0,e.jsx)("div",{className:"flex justify-center mb-8",children:(0,e.jsx)("a",{href:"/",children:(0,e.jsx)(E,{className:"size-8"})})}),(0,e.jsxs)(u,{variant:"default",padding:"lg",className:"border-border/50",children:[(0,e.jsxs)("div",{className:"text-center mb-8",children:[(0,e.jsx)("h2",{className:"text-2xl font-bold text-foreground mb-2",children:"Forgot your password?"}),(0,e.jsx)("p",{className:"text-muted-foreground",children:"Enter your email and we'll send you a reset link."})]}),(0,e.jsxs)("form",{onSubmit:j,className:"space-y-5",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(S,{htmlFor:"email",children:"Email"}),(0,e.jsx)(_,{id:"email",type:"email",name:"email",placeholder:"[email protected]â¦",autoComplete:"email",inputMode:"email",spellCheck:!1,value:r,onChange:a=>p(a.target.value),icon:(0,e.jsx)(N,{className:"h-4 w-4","aria-hidden":"true"}),disabled:t})]}),(l||o)&&(0,e.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/20",role:"status","aria-live":"polite",children:[(0,e.jsx)("div",{className:"h-2 w-2 rounded-full bg-destructive"}),(0,e.jsx)("p",{className:"text-sm text-destructive",children:l||o})]}),(0,e.jsx)(k,{type:"submit",className:"w-full",size:"lg",disabled:t,isLoading:t,children:"Send reset link"})]}),(0,e.jsxs)("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Remember your password?"," ",(0,e.jsx)(m,{href:"/login",className:"text-primary hover:text-primary/80 font-medium transition-colors",children:"Log in"})]})]}),(0,e.jsx)("div",{className:"mt-8 text-center",children:(0,e.jsxs)("a",{href:"/",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,e.jsx)(d,{className:"h-4 w-4","aria-hidden":"true"}),"Back to home"]})})]})]})};var R=C;export{C as ForgotPasswordPage,R 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.