import{j as e}from"./ui-vendor-Cn57k9R1.js";import{r as a,L as n}from"./react-vendor-B9tfxWGs.js";import{c as m,B as x,f as u}from"./index-DT-X9ySe.js";import{I as f}from"./input-DSW3IQ5Z.js";import{A as o}from"./arrow-left-BdxBu0RQ.js";import"./query-vendor-BGnEs3s8.js";import"./charts-vendor-DecUTkfU.js";import"./editor-vendor-BA3QzDsK.js";const k=()=>{const[t,i]=a.useState(""),[l,c]=a.useState(!1),{toast:r}=m(),d=async s=>{s.preventDefault();try{await u(t),c(!0),r({title:"Reset link sent",description:"If your account exists, you will receive instructions by email shortly."})}catch{r({title:"Unable to send reset link",description:"Please try again or contact support.",variant:"destructive"})}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{background:"#2D3142"},children:e.jsxs("div",{className:"w-full max-w-sm bg-card rounded-2xl p-10 shadow-2xl",children:[e.jsxs("div",{className:"flex flex-col items-center mb-8",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary flex items-center justify-center mb-3",children:e.jsx("span",{className:"text-primary-foreground font-display font-bold text-lg",children:"B"})}),e.jsx("h1",{className:"font-display text-2xl font-bold text-foreground",children:"Reset Password"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body mt-1",children:"Enter your admin email and we'll send a reset link."})]}),l?e.jsxs("div",{className:"text-center space-y-4",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-success/10 flex items-center justify-center mx-auto",children:e.jsx("span",{className:"text-success text-2xl",children:"✓"})}),e.jsxs("p",{className:"text-sm text-muted-foreground font-body",children:["If an account exists for ",e.jsx("strong",{children:t}),", you'll receive a reset link shortly."]}),e.jsxs(n,{to:"/admin/login",className:"text-sm text-primary hover:underline font-body inline-flex items-center gap-1",children:[e.jsx(o,{className:"w-4 h-4"})," Back to Login"]})]}):e.jsxs("form",{onSubmit:d,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground font-body mb-1.5 block",children:"Email"}),e.jsx(f,{type:"email",value:t,onChange:s=>i(s.target.value),placeholder:"admin@boaze.com",required:!0})]}),e.jsx(x,{type:"submit",className:"w-full bg-primary hover:bg-primary-dark text-primary-foreground font-body",children:"Send Reset Link"}),e.jsx("div",{className:"text-center",children:e.jsxs(n,{to:"/admin/login",className:"text-sm text-muted-foreground hover:text-foreground font-body inline-flex items-center gap-1",children:[e.jsx(o,{className:"w-4 h-4"})," Back to Login"]})})]})]})})};export{k as default};
