import{e as x,r as h,j as s,H as f,M as j,l as n,f as _,n as N}from"./vendor-laZsiqLO.js";import{u as v}from"./useTranslation-BW0o-tkY.js";import{G as g}from"./GuestLayout-Bncnlxxo.js";import{B as C}from"./button-B8f8jW4H.js";import{I as d}from"./input-CT5MkJwj.js";import{L as i}from"./label-BDbCc0wv.js";import{C as b,a as y,b as F,c as P,d as R}from"./card-BKDXjfy_.js";import"./SiteLogo-DML5Oulk.js";import"./dropdown-menu-CpMN0BZ0.js";import"./utils-RgT4yCq8.js";import"./sheet-Cp4V1hdh.js";import"./useFlashMessages-CQoLOBuv.js";import"./AdSlot-HY9FvbmL.js";import"./RightSidebarFooter-BO77c1r9.js";import"./avatar-1RNhlzAH.js";function J({token:l,email:c}){const{t:e}=v(),{data:t,setData:o,post:p,processing:m,errors:r,reset:u}=x({token:l,email:c,password:"",password_confirmation:""});h.useEffect(()=>()=>{u("password","password_confirmation")},[]);const w=a=>{a.preventDefault(),p(route("password.store"))};return s.jsxs(g,{children:[s.jsx(f,{title:e("_reset_password","Reset Password")}),s.jsx("div",{className:"flex items-center justify-center min-h-[80vh]",children:s.jsxs(b,{className:"w-full max-w-md shadow-xl border-0 sm:border bg-card",children:[s.jsxs(y,{className:"space-y-1 text-center",children:[s.jsx(F,{className:"text-2xl font-bold tracking-tight",children:e("_reset_password","Reset Password")}),s.jsx(P,{children:e("_reset_password_desc","Choose a strong new password for your account.")})]}),s.jsx(R,{children:s.jsxs("form",{onSubmit:w,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(i,{htmlFor:"email",children:e("_auth_email_address","Email Address")}),s.jsxs("div",{className:"relative",children:[s.jsx(j,{className:"absolute start-3 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx(d,{id:"email",type:"email",value:t.email,className:"ps-9 bg-muted/50",autoComplete:"username",onChange:a=>o("email",a.target.value),readOnly:!0,disabled:!0})]}),r.email&&s.jsx("p",{className:"text-sm font-medium text-destructive",children:r.email})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(i,{htmlFor:"password",children:e("_auth_new_password","New Password")}),s.jsxs("div",{className:"relative",children:[s.jsx(n,{className:"absolute start-3 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx(d,{id:"password",type:"password",name:"password",value:t.password,className:"ps-9",autoComplete:"new-password",autoFocus:!0,onChange:a=>o("password",a.target.value),required:!0})]}),r.password&&s.jsx("p",{className:"text-sm font-medium text-destructive",children:r.password})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(i,{htmlFor:"password_confirmation",children:e("_auth_confirm_password","Confirm Password")}),s.jsxs("div",{className:"relative",children:[s.jsx(n,{className:"absolute start-3 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx(d,{type:"password",id:"password_confirmation",name:"password_confirmation",value:t.password_confirmation,className:"ps-9",autoComplete:"new-password",onChange:a=>o("password_confirmation",a.target.value),required:!0})]}),r.password_confirmation&&s.jsx("p",{className:"text-sm font-medium text-destructive",children:r.password_confirmation})]}),s.jsx(C,{className:"w-full mt-4",disabled:m,children:m?s.jsxs(s.Fragment,{children:[s.jsx(_,{className:"me-2 h-4 w-4 animate-spin"}),e("_processing","Processing...")]}):s.jsxs(s.Fragment,{children:[e("_reset_password","Reset Password"),s.jsx(N,{className:"ms-2 h-4 w-4"})]})})]})})]})})]})}export{J as default};
