import{a as P,q as y}from"./index-Z7dItZLR.js";import{_ as p}from"./InputError.vue_vue_type_script_setup_true_lang-DniwR9eG.js";import{_ as C}from"./AppLogoIcon.vue_vue_type_script_setup_true_lang-M23wUS8o.js";import{_ as f}from"./Input.vue_vue_type_script_setup_true_lang-C985hTdX.js";import{_ as c}from"./Label.vue_vue_type_script_setup_true_lang-DMkOfPu9.js";import{_ as V}from"./AuthLayout.vue_vue_type_script_setup_true_lang-DTkMVYm5.js";import{d as v,A as $,g,o as h,w as m,e as t,u as a,h as A,j as N,m as q,b as n,i as u,k as x}from"./app-KXUNt_n9.js";import{L as R}from"./loader-circle-nLMSKP1C.js";import"./useForwardExpose-B0NY7lip.js";import"./createLucideIcon-CFEmdjHu.js";const s=(e,o)=>({url:s.url(e,o),method:"get"});s.definition={methods:["get","head"],url:"/reset-password/{token}"};s.url=(e,o)=>{(typeof e=="string"||typeof e=="number")&&(e={token:e}),Array.isArray(e)&&(e={token:e[0]}),e=P(e);const i={token:e.token};return s.definition.url.replace("{token}",i.token.toString()).replace(/\/+$/,"")+y(o)};s.get=(e,o)=>({url:s.url(e,o),method:"get"});s.head=(e,o)=>({url:s.url(e,o),method:"head"});const w=(e,o)=>({action:s.url(e,o),method:"get"});w.get=(e,o)=>({action:s.url(e,o),method:"get"});w.head=(e,o)=>({action:s.url(e,{[o?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...o?.query??o?.mergeQuery??{}}}),method:"get"});s.form=w;const l=e=>({url:l.url(e),method:"post"});l.definition={methods:["post"],url:"/reset-password"};l.url=e=>l.definition.url+y(e);l.post=e=>({url:l.url(e),method:"post"});const k=e=>({action:l.url(e),method:"post"});k.post=e=>({action:l.url(e),method:"post"});l.form=k;const B={create:s,store:l},E={class:"grid gap-6"},Q={class:"grid gap-2"},D={class:"grid gap-2"},F={class:"grid gap-2"},M=v({__name:"ResetPassword",props:{token:{},email:{}},setup(e){const i=$(e.email);return(L,r)=>(h(),g(V,{title:"Reset password",description:"Please enter your new password below"},{default:m(()=>[t(a(A),{title:"Reset password"}),t(a(N),q(a(B).store.form(),{transform:d=>({...d,token:e.token,email:e.email}),"reset-on-success":["password","password_confirmation"]}),{default:m(({errors:d,processing:_})=>[n("div",E,[n("div",Q,[t(a(c),{for:"email"},{default:m(()=>[...r[1]||(r[1]=[u("Email",-1)])]),_:1}),t(a(f),{id:"email",type:"email",name:"email",autocomplete:"email",modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=b=>i.value=b),class:"mt-1 block w-full",readonly:""},null,8,["modelValue"]),t(p,{message:d.email,class:"mt-2"},null,8,["message"])]),n("div",D,[t(a(c),{for:"password"},{default:m(()=>[...r[2]||(r[2]=[u("Password",-1)])]),_:1}),t(a(f),{id:"password",type:"password",name:"password",autocomplete:"new-password",class:"mt-1 block w-full",autofocus:"",placeholder:"Password"}),t(p,{message:d.password},null,8,["message"])]),n("div",F,[t(a(c),{for:"password_confirmation"},{default:m(()=>[...r[3]||(r[3]=[u(" Confirm Password ",-1)])]),_:1}),t(a(f),{id:"password_confirmation",type:"password",name:"password_confirmation",autocomplete:"new-password",class:"mt-1 block w-full",placeholder:"Confirm password"}),t(p,{message:d.password_confirmation},null,8,["message"])]),t(a(C),{type:"submit",class:"mt-4 w-full",disabled:_,"data-test":"reset-password-button"},{default:m(()=>[_?(h(),g(a(R),{key:0,class:"h-4 w-4 animate-spin"})):x("",!0),r[4]||(r[4]=u(" Reset password ",-1))]),_:2},1032,["disabled"])])]),_:1},16,["transform"])]),_:1}))}});export{M as default};
