1import{r as t,j as e,L as c}from"./vendor-query-BqeRHL1O.js";import"./vendor-react-qkC6yhPU.js";function f(){const[r,d]=t.useState(""),[m,u]=t.useState(!1),[o,l]=t.useState(""),[n,i]=t.useState(!1);async function x(a){a.preventDefault(),l(""),i(!0);try{const s=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r})}),p=await s.json().catch(()=>({}));if(!s.ok)throw new Error(p.error||"Failed to send email");u(!0)}catch(s){l(s instanceof Error?s.message:"Something went wrong")}finally{i(!1)}}return e.jsx("div",{className:"min-h-screen flex items-center justify-center px-4",style:{backgroundColor:"#EEEEEE"},children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("h1",{className:"text-4xl font-black uppercase tracking-tight mb-2",style:{fontFamily:"'Paytone One', sans-serif",color:"#31363F",letterSpacing:"-0.05em"},children:"BUSINESS MASTER"}),e.jsx("p",{className:"text-sm uppercase tracking-widest",style:{color:"#31363F99"},children:"Reset your password"})]}),e.jsx("div",{className:"bg-[#EEEEEE] rounded-sm shadow-sm border p-8",style:{borderColor:"#31363F22"},children:m?e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl mb-4",children:"â"}),e.jsx("h2",{className:"text-lg font-black uppercase mb-2",style:{color:"#31363F"},children:"Check your inbox"}),e.jsxs("p",{className:"text-sm mb-6",style:{color:"#31363F77"},children:["If an account exists for ",e.jsx("strong",{children:r}),", a reset link has been sent. Check your spam folder if it doesn't arrive within a minute."]}),e.jsx(c,{href:"/login",children:e.jsx("span",{className:"text-sm font-bold underline cursor-pointer",style:{color:"#31363F"},children:"Back to Sign In"})})]}):e.jsxs("form",{onSubmit:x,className:"space-y-5",children:[e.jsx("p",{className:"text-sm",style:{color:"#31363F77"},children:"Enter your email address and we'll send you a link to reset your password."}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold uppercase tracking-widest mb-2",style:{color:"#31363F"},children:"Email"}),e.jsx("input",{"data-testid":"input-email",type:"email",value:r,onChange:a=>d(a.target.value),required:!0,autoFocus:!0,className:"w-full px-4 py-3 border rounded-sm bg-[#EEEEEE] focus:outline-none focus:ring-2",style:{borderColor:"#31363F33",color:"#31363F"},placeholder:"[email protected]"})]}),o&&e.jsx("p",{"data-testid":"text-error",className:"text-sm",style:{color:"#31363F"},children:o}),e.jsx("button",{"data-testid":"button-send-reset",type:"submit",disabled:n,className:"w-full py-4 text-sm font-bold uppercase tracking-widest disabled:opacity-50 hover:opacity-90 transition-opacity",style:{backgroundColor:"#31363F",color:"#EEEEEE"},children:n?"Sending...":"Send Reset Link"}),e.jsx("p",{className:"text-center text-sm",style:{color:"#31363F77"},children:e.jsx(c,{href:"/login",children:e.jsx("span",{"data-testid":"link-back-login",className:"font-bold underline cursor-pointer",style:{color:"#31363F"},children:"Back to Sign In"})})})]})})]})})}export{f 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.