import{u as h,r as s,j as e,a as p}from"./app-BwDemWQz.js";import{I as g}from"./Input-BJaxI6jp.js";import{B as m}from"./Button-B-KWyoQR.js";import{A as f}from"./AuthLayout--k4aA7aD.js";import{u as b}from"./LanguageContext-zkEAKPTE.js";import{A as y}from"./arrow-left-B11txR0s.js";/* empty css            */import"./createLucideIcon-BASx8f0E.js";function L(){const{errors:o}=h().props,[i,c]=s.useState(""),[n,j]=s.useState(""),[l,r]=s.useState(!1),t=b(),d=a=>{a.preventDefault(),r(!0);const x=route("auth.password.email");p.post(x,{email:i},{onFinish:()=>r(!1),onError:()=>r(!1)})},u=()=>{window.history.back()};return e.jsx(f,{children:e.jsxs("div",{className:"relative",children:[" ",e.jsx(m,{variant:"ghost",size:"icon",onClick:u,className:"absolute -top-2 -left-2 text-gray-600 dark:text-gray-200 hover:bg-gray-100","aria-label":"Go back",children:e.jsx(y,{className:"h-6 w-6"})}),e.jsx("h1",{className:"text-2xl font-bold mb-8 text-center",children:t("Reset Your Password")}),e.jsx("p",{className:"text-center text-gray-600 dark:text-gray-200 mb-6",children:t("Input your email address account to receive a verification code.")}),e.jsxs("form",{onSubmit:d,children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"email",className:"block mb-2 text-sm font-semibold text-gray-700 dark:text-gray-200",children:t("Email")}),e.jsx(g,{type:"email",id:"email",name:"email",value:i,onChange:a=>c(a.target.value),placeholder:t("Enter your email address"),required:!0,className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary dark:bg-zinc-800 dark:border-zinc-600 dark:text-white"}),o.email&&e.jsx("div",{className:"text-red-500 text-sm mt-1",children:o.email})]}),e.jsx(m,{type:"submit",isLoading:l,className:"w-full bg-gradient-to-r from-primary to-secondary text-white hover:from-secondary hover:to-primary shadow-md hover:shadow-lg transition-all duration-200",children:t(l?"Sending...":"Send Reset Link")})]}),n&&e.jsx("p",{className:"mt-4 text-center text-sm text-green-600",children:n})]})})}export{L as default};
