1import{B as g,r as i,j as e,L as m,g as p,M as u,V as h,e as b}from"./index-512770ff.js";import{A as y}from"./arrow-left-1d335e73.js";const v=()=>{const{t}=g(),[n,d]=i.useState(""),[r,s]=i.useState("idle"),[x,o]=i.useState(""),c=async a=>{a.preventDefault(),s("submitting");try{const l=await b.post("/api/auth/forgot-password",{email:n});s("success"),o(l.data.message)}catch{s("error"),o("Something went wrong. Please try again.")}};return e.jsx("div",{style:{background:"var(--bg-body)",minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},children:e.jsxs("div",{className:"card-glass",style:{width:"100%",maxWidth:"450px",padding:"40px",borderRadius:"24px",border:"1px solid var(--border-light)",background:"var(--bg-surface)",boxShadow:"var(--shadow-lg)",animation:"fadeIn 0.6s ease-out"},children:[e.jsxs(m,{to:"/login",style:{display:"inline-flex",alignItems:"center",color:"var(--text-muted)",textDecoration:"none",marginBottom:"20px",fontSize:"0.9rem"},children:[e.jsx(y,{size:16,style:{marginRight:"6px"}})," ",t("auth.backToLogin")]}),r==="success"?e.jsxs("div",{style:{textAlign:"center",padding:"20px 0"},children:[e.jsx("div",{style:{width:"80px",height:"80px",background:"rgba(16, 185, 129, 0.1)",borderRadius:"50%",margin:"0 auto 20px",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(p,{size:40,color:"#10b981"})}),e.jsx("h2",{style:{fontSize:"1.8rem",fontWeight:"bold",marginBottom:"10px"},children:t("auth.checkEmail")}),e.jsx("p",{style:{color:"var(--text-muted)",lineHeight:"1.6"},children:t("auth.resetLinkSent")})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"30px"},children:[e.jsx("h2",{style:{fontSize:"2rem",fontWeight:"800",color:"var(--text-main)",marginBottom:"8px"},children:t("auth.forgotPasswordTitle")}),e.jsx("p",{style:{color:"var(--text-muted)"},children:t("auth.forgotPasswordSubtitle")})]}),r==="error"&&e.jsx("div",{style:{background:"rgba(220, 38, 38, 0.1)",border:"1px solid rgba(220, 38, 38, 0.2)",color:"#dc2626",padding:"12px",borderRadius:"12px",marginBottom:"24px",textAlign:"center",fontSize:"0.9rem"},children:x}),e.jsxs("form",{onSubmit:c,children:[e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsx("label",{className:"form-label",style:{fontWeight:"600",marginLeft:"4px"},children:t("auth.emailOrPhone")}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx(u,{size:18,style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),e.jsx("input",{type:"text",value:n,onChange:a=>d(a.target.value),required:!0,placeholder:t("auth.emailOrPhonePlaceholder"),className:"input-field",style:{width:"100%",padding:"14px 14px 14px 48px",borderRadius:"12px",border:"1px solid var(--border-medium)",background:"var(--bg-body)",color:"var(--text-main)",fontSize:"1rem",transition:"all 0.2s"}})]})]}),e.jsxs("button",{type:"submit",disabled:r==="submitting",className:"btn btn-primary",style:{width:"100%",padding:"16px",borderRadius:"12px",fontSize:"1.1rem",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",background:"linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%)",border:"none",boxShadow:"0 4px 12px rgba(37, 99, 235, 0.2)"},children:[t(r==="submitting"?"auth.processing":"auth.sendResetLink")," ",e.jsx(h,{size:20})]})]})]})]})})};export{v 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.