1import{r,j as e}from"./vendor-react-zwv87yMD.js";import{a as g}from"./api-client-wl3SCNAO.js";import{L as b}from"./vendor-router-DimZLiZb.js";import"./vendor-charts-CtrTLS4K.js";import"./vendor-i18n-BdYkS11p.js";import"./vendor-ui-CfDMlrKu.js";import"./vendor-pdf-DQuePnfN.js";import"./vendor-state-ByI9XJey.js";import"./vendor-editor-C_dhmuey.js";import"./vendor-query-DYq8g7OI.js";function L(){const[d,o]=r.useState(""),[s,n]=r.useState(!1),[i,l]=r.useState(""),[m,c]=r.useState(""),x=async t=>{var u,p;t.preventDefault(),n(!0),l(""),c("");try{const a=await g.post("/auth/forgot-password",{email:d});l(a.data.message),o("")}catch(a){c(((p=(u=a.response)==null?void 0:u.data)==null?void 0:p.message)||"Failed to send reset email. Please try again.")}finally{n(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:e.jsxs("div",{className:"max-w-md w-full space-y-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"mt-6 text-3xl font-bold",children:"Forgot your password?"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Enter your email address and we'll send you a link to reset your password."})]}),e.jsxs("div",{className:"mt-8 bg-card p-8 rounded-lg shadow-md border",children:[i&&e.jsx("div",{className:"mb-4 p-4 rounded bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800",children:e.jsx("p",{className:"text-sm text-green-800 dark:text-green-200",children:i})}),m&&e.jsx("div",{className:"mb-4 p-4 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:e.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:m})}),e.jsxs("form",{onSubmit:x,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium mb-2",children:"Email Address"}),e.jsx("input",{id:"email",type:"email",required:!0,value:d,onChange:t=>o(t.target.value),className:"w-full px-3 py-2 border border-input rounded-md bg-background focus:outline-none focus:ring-2 focus:ring-primary",placeholder:"[email protected]",disabled:s})]}),e.jsx("button",{type:"submit",disabled:s,className:"w-full py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Sending...":"Send Reset Link"})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsx(b,{to:"/login",className:"text-sm text-primary hover:text-primary/80",children:"Back to login"})})]})]})})}export{L 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.