import{t as e}from"./jsx-runtime-BbTa8W_M-1776590214964.js";import{a as t,n,r}from"./app-CXDQ5oEH-1776590214964.js";import{t as i}from"./useTranslation-D1etqd9u-1776590214964.js";import{t as a}from"./arrow-left-BFhIh_le-1776590214964.js";import{t as o}from"./loader-circle-BF-wgoyu-1776590214964.js";import{t as s}from"./shield-alert-Bolf0Hfh-1776590214964.js";import{t as c}from"./button-WiAFyHfP-1776590214964.js";import{t as l}from"./label-DwYxovYB-1776590214964.js";import{t as u}from"./AuthLayout-BNB2211y-1776590214964.js";import{a as d,i as f,n as p,o as m,r as h,t as g}from"./card-Cby8flFO-1776590214964.js";import{t as _}from"./input-BlYvaS0F-1776590214964.js";var v=e();function y({status:e}){let{t:y}=i(),{data:b,setData:x,post:S,processing:C,errors:w}=t({login_id:``});return(0,v.jsxs)(u,{children:[(0,v.jsx)(n,{title:y(`Forgot Password`)}),(0,v.jsxs)(g,{className:`w-full border-border/50 shadow-lg bg-card`,children:[(0,v.jsxs)(d,{className:`space-y-1 text-center`,children:[(0,v.jsx)(`div`,{className:`mx-auto h-12 w-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2`,children:(0,v.jsx)(s,{className:`h-6 w-6`})}),(0,v.jsx)(m,{className:`text-2xl font-bold`,children:y(`Forgot Password?`)}),(0,v.jsx)(h,{children:y(`Enter your registered Email Address or Phone Number. We will send an OTP code to verify it is you.`)})]}),(0,v.jsxs)(p,{children:[e&&(0,v.jsx)(`div`,{className:`mb-4 p-3 rounded-lg bg-green-500/10 text-green-600 text-sm font-bold border border-green-500/20 text-center`,children:e}),(0,v.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),S(route(`password.email`))},className:`space-y-4`,children:[(0,v.jsxs)(`div`,{className:`space-y-2`,children:[(0,v.jsx)(l,{htmlFor:`login_id`,children:y(`Email or Phone Number`)}),(0,v.jsx)(_,{id:`login_id`,type:`text`,name:`login_id`,placeholder:y(`e.g., name@example.com or +123456789`),value:b.login_id,className:w.login_id?`border-destructive focus-visible:ring-destructive`:``,onChange:e=>x(`login_id`,e.target.value),autoFocus:!0,required:!0}),w.login_id&&(0,v.jsx)(`p`,{className:`text-xs text-destructive font-bold p-2 bg-red-500/10 rounded border border-red-500/20`,children:w.login_id})]}),(0,v.jsxs)(c,{className:`w-full gap-2 text-base font-bold shadow-md`,type:`submit`,disabled:C,children:[C?(0,v.jsx)(o,{className:`w-5 h-5 animate-spin`}):null,y(C?`Sending OTP...`:`Request OTP Code`)]})]})]}),(0,v.jsx)(f,{className:`flex justify-center border-t py-4 bg-muted/20 rounded-b-xl`,children:(0,v.jsxs)(r,{href:route(`login`),className:`flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors font-bold`,children:[(0,v.jsx)(a,{className:`h-4 w-4`}),y(`Back to login`)]})})]})]})}export{y as default};