1import{r,j as s}from"./vendor-BMTqjksT.js";import{S as w,g as o,b as y,C as F,c as j,j as P,d as g,e as x,M as N,f as b,B as m,A as p,L as v,I as k,i as c}from"./index-C0VezhcQ.js";import"./trpc-c2OaEmLI.js";import"./d3-ngNJxV2x.js";function E(){const[a,u]=r.useState(""),[e,l]=r.useState(!1),[i,n]=r.useState(!1),f=async t=>{if(t.preventDefault(),!a.trim()){c.error("Please enter your email address");return}l(!0);try{const d=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim()})}),h=await d.json();if(!d.ok){c.error(h.error||"Failed to send reset email");return}n(!0)}catch{c.error("Network error. Please try again.")}finally{l(!1)}};return s.jsxs("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:43",className:"min-h-screen bg-background flex items-center justify-center px-4 py-12",children:[s.jsx(w,{"data-loc":"client/src/pages/ForgotPassword.tsx:44",title:"Reset Your Password â National Bankruptcy Advocates Attorney Portal",description:"Forgot your password? Enter your email address to receive a secure password reset link for your National Bankruptcy Advocates attorney account.",canonical:"https://bankruptcylawyersin.com/forgot-password",noIndex:!0}),s.jsxs("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:50",className:"w-full max-w-md",children:[s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:52",className:"flex justify-center mb-8",children:s.jsxs(o,{"data-loc":"client/src/pages/ForgotPassword.tsx:53",href:"/",className:"flex items-center gap-2 text-foreground hover:opacity-80 transition-opacity",children:[s.jsx(y,{"data-loc":"client/src/pages/ForgotPassword.tsx:54",className:"w-7 h-7 text-accent"}),s.jsxs("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:55",children:[s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:56",className:"font-black text-base leading-none tracking-tight",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"National Bankruptcy"}),s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:59",className:"text-[10px] tracking-[0.15em] uppercase text-muted-foreground font-medium",children:"Advocates"})]})]})}),s.jsxs(F,{"data-loc":"client/src/pages/ForgotPassword.tsx:66",className:"border-border/50 shadow-lg",children:[s.jsx(j,{"data-loc":"client/src/pages/ForgotPassword.tsx:67",className:"text-center pb-4",children:i?s.jsxs(s.Fragment,{children:[s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:70",className:"flex justify-center mb-3",children:s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:71",className:"w-14 h-14 rounded-full bg-accent/10 flex items-center justify-center",children:s.jsx(P,{"data-loc":"client/src/pages/ForgotPassword.tsx:72",className:"w-7 h-7 text-accent"})})}),s.jsx(g,{"data-loc":"client/src/pages/ForgotPassword.tsx:75",className:"text-2xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Check your email"}),s.jsxs(x,{"data-loc":"client/src/pages/ForgotPassword.tsx:78",className:"text-base mt-2",children:["If an account exists for ",s.jsx("strong",{"data-loc":"client/src/pages/ForgotPassword.tsx:79",children:a}),", we've sent a password reset link. It expires in 1 hour."]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:84",className:"flex justify-center mb-3",children:s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:85",className:"w-14 h-14 rounded-full bg-accent/10 flex items-center justify-center",children:s.jsx(N,{"data-loc":"client/src/pages/ForgotPassword.tsx:86",className:"w-7 h-7 text-accent"})})}),s.jsx(g,{"data-loc":"client/src/pages/ForgotPassword.tsx:89",className:"text-2xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Forgot your password?"}),s.jsx(x,{"data-loc":"client/src/pages/ForgotPassword.tsx:92",className:"text-base mt-2",children:"Enter your email address and we'll send you a link to reset your password."})]})}),s.jsx(b,{"data-loc":"client/src/pages/ForgotPassword.tsx:99",className:"pt-2",children:i?s.jsxs("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:101",className:"space-y-4",children:[s.jsxs("p",{"data-loc":"client/src/pages/ForgotPassword.tsx:102",className:"text-sm text-muted-foreground text-center",children:["Didn't receive the email? Check your spam folder, or"," ",s.jsx("button",{"data-loc":"client/src/pages/ForgotPassword.tsx:104",onClick:()=>{n(!1)},className:"text-accent hover:underline font-medium",children:"try again"}),"."]}),s.jsx(m,{"data-loc":"client/src/pages/ForgotPassword.tsx:111",asChild:!0,className:"w-full",variant:"outline",children:s.jsxs(o,{"data-loc":"client/src/pages/ForgotPassword.tsx:112",href:"/sign-in/",children:[s.jsx(p,{"data-loc":"client/src/pages/ForgotPassword.tsx:113",className:"w-4 h-4 mr-2"}),"Back to sign in"]})})]}):s.jsxs("form",{"data-loc":"client/src/pages/ForgotPassword.tsx:119",onSubmit:f,className:"space-y-5",children:[s.jsxs("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:120",className:"space-y-2",children:[s.jsx(v,{"data-loc":"client/src/pages/ForgotPassword.tsx:121",htmlFor:"email",children:"Email address"}),s.jsx(k,{"data-loc":"client/src/pages/ForgotPassword.tsx:122",id:"email",type:"email",placeholder:"[email protected]",value:a,onChange:t=>u(t.target.value),autoComplete:"email",autoFocus:!0,required:!0,disabled:e})]}),s.jsx(m,{"data-loc":"client/src/pages/ForgotPassword.tsx:135",type:"submit",className:"w-full bg-accent hover:bg-accent/90 text-accent-foreground font-semibold",disabled:e,children:e?"Sending...":"Send reset link"}),s.jsx("div",{"data-loc":"client/src/pages/ForgotPassword.tsx:143",className:"text-center",children:s.jsxs(o,{"data-loc":"client/src/pages/ForgotPassword.tsx:144",href:"/sign-in/",className:"text-sm text-muted-foreground hover:text-foreground transition-colors inline-flex items-center gap-1",children:[s.jsx(p,{"data-loc":"client/src/pages/ForgotPassword.tsx:145",className:"w-3 h-3"}),"Back to sign in"]})})]})})]})]})]})}export{E 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.