import{j as e}from"./query-PJ0ZdjbV.js";import{a as n}from"./vendor-CWhr2lg4.js";import{c as d,d as m,e as u,f as x,g as h,h as i,I as f,i as p,B as j,R as g}from"./index-BSPIaiZU.js";import"./ui-aO-W1bxx.js";function C(){const[a,o]=n.useState(""),[l,r]=n.useState(!1),s=d(),c=t=>{t.preventDefault(),s.mutate(a,{onSuccess:()=>r(!0),onError:()=>r(!0)})};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted/50",children:e.jsxs(m,{className:"w-full max-w-md",children:[e.jsxs(u,{className:"text-center",children:[e.jsx(x,{children:"Reset Password"}),e.jsx(h,{children:"Enter your email to receive a reset link"})]}),l?e.jsx(i,{children:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"If an account exists with that email, you will receive a reset link shortly."})}):e.jsxs("form",{onSubmit:c,children:[e.jsx(i,{className:"space-y-4",children:e.jsx(f,{type:"email",placeholder:"name@company.com",value:a,onChange:t=>o(t.target.value),required:!0})}),e.jsxs(p,{className:"flex flex-col gap-3",children:[e.jsx(j,{type:"submit",className:"w-full",disabled:s.isPending,children:s.isPending?"Sending...":"Send Reset Link"}),e.jsx("a",{href:g.LOGIN,className:"text-sm text-primary hover:underline",children:"Back to login"})]})]})]})})}export{C as ForgotPasswordPage};
