import{B as e,C as t,D as n,E as r,F as i,H as a,S as o,T as s,U as c,Y as l,a as u,b as d,et as f,g as p,i as m,m as h,r as g}from"./app-DGF92Dzq.js";import{n as _}from"./toast-Cp5GoWbY.js";import{n as v,t as y}from"./TextInput-djE1uyh-.js";import{t as b}from"./InputLabel-ClYRmzti.js";var x={key:0},S={class:`mt-2 text-sm text-gray-800 dark:text-gray-200`},C={class:`mt-2 text-sm font-medium text-green-600 dark:text-green-400`},w={class:`text-sm text-gray-500 dark:text-gray-400`},T={key:0},E={key:1},D=n({__name:`UpdateProfileInformationForm`,props:{mustVerifyEmail:{},status:{}},setup(n){let f=u().props.auth.user,D=m({name:f.name,email:f.email}),O=null;return e(()=>[D.name,D.email],()=>{O&&clearTimeout(O),O=setTimeout(()=>{D.patch(route(`profile.update`),{preserveScroll:!0,onSuccess:()=>_(`Profile saved`)})},800)}),(e,u)=>(i(),t(`section`,null,[u[5]||=d(`header`,null,[d(`h2`,{class:`text-lg font-medium text-gray-900 dark:text-gray-100`},` Profile Information `),d(`p`,{class:`mt-1 text-sm text-gray-600 dark:text-gray-400`},` Update your account's profile information and email address. `)],-1),d(`form`,{onSubmit:u[2]||=p(t=>l(D).patch(e.route(`profile.update`)),[`prevent`]),class:`mt-6 space-y-6`},[d(`div`,null,[r(b,{for:`name`,value:`Name`}),r(y,{id:`name`,type:`text`,class:`mt-1 block w-full`,modelValue:l(D).name,"onUpdate:modelValue":u[0]||=e=>l(D).name=e,required:``,autofocus:``,autocomplete:`name`},null,8,[`modelValue`]),r(v,{class:`mt-2`,message:l(D).errors.name},null,8,[`message`])]),d(`div`,null,[r(b,{for:`email`,value:`Email`}),r(y,{id:`email`,type:`email`,class:`mt-1 block w-full`,modelValue:l(D).email,"onUpdate:modelValue":u[1]||=e=>l(D).email=e,required:``,autocomplete:`username`},null,8,[`modelValue`]),r(v,{class:`mt-2`,message:l(D).errors.email},null,8,[`message`])]),n.mustVerifyEmail&&l(f).email_verified_at===null?(i(),t(`div`,x,[d(`p`,S,[u[4]||=s(` Your email address is unverified. `,-1),r(l(g),{href:e.route(`verification.send`),method:`post`,as:`button`,class:`rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:text-gray-400 dark:hover:text-gray-100 dark:focus:ring-offset-gray-800`},{default:a(()=>[...u[3]||=[s(` Click here to re-send the verification email. `,-1)]]),_:1},8,[`href`])]),c(d(`div`,C,` A new verification link has been sent to your email address. `,512),[[h,n.status===`verification-link-sent`]])])):o(``,!0),d(`p`,w,[l(D).processing?(i(),t(`span`,T,`Saving…`)):(i(),t(`span`,E,`Changes save automatically.`))])],32)]))}}),O=f({default:()=>k}),k=D;export{O as n,k as t};