import{n as e}from"./chunk-QTnfLwEv.js";import{C as t,D as n,E as r,G as i,H as a,L as o,W as s,Z as c,_ as l,a as u,et as d,h as f,i as p,k as m,o as h,w as g,x as _}from"./app-UGuEpyiV.js";import{n as v}from"./toast-BHnJ4sST.js";import{t as y}from"./i18n-Bjrme-0c.js";import{n as b,t as x}from"./TextInput-Bz8BNQX-.js";import{t as S}from"./InputLabel-LStcPEgY.js";var C={class:`text-lg font-medium text-gray-900 dark:text-gray-100`},w={class:`mt-1 text-sm text-gray-600 dark:text-gray-400`},T={key:0},E={class:`mt-2 text-sm text-gray-800 dark:text-gray-200`},D={class:`text-sm text-gray-500 dark:text-gray-400`},O={key:0},k={key:1},A=m({__name:`UpdateProfileInformationForm`,props:{mustVerifyEmail:{},status:{}},setup(e){let m=h().props.auth.user,A=u({name:m.name,email:m.email}),j=null;return a(()=>[A.name,A.email],()=>{j&&clearTimeout(j),j=setTimeout(()=>{A.patch(route(`profile.update`),{preserveScroll:!0,onSuccess:()=>v(y(`Profile saved`))})},800)}),(a,u)=>(o(),g(`section`,null,[_(`header`,null,[_(`h2`,C,d(c(y)(`Profile Information`)),1),_(`p`,w,d(c(y)(`Update your account's profile information and email address.`)),1)]),_(`form`,{onSubmit:u[2]||=l(e=>c(A).patch(a.route(`profile.update`)),[`prevent`]),class:`mt-6 space-y-6`},[_(`div`,null,[n(S,{for:`name`,value:c(y)(`Name`)},null,8,[`value`]),n(x,{id:`name`,type:`text`,class:`mt-1 block w-full`,modelValue:c(A).name,"onUpdate:modelValue":u[0]||=e=>c(A).name=e,required:``,autofocus:``,autocomplete:`name`},null,8,[`modelValue`]),n(b,{class:`mt-2`,message:c(A).errors.name},null,8,[`message`])]),_(`div`,null,[n(S,{for:`email`,value:c(y)(`Email`)},null,8,[`value`]),n(x,{id:`email`,type:`email`,class:`mt-1 block w-full`,modelValue:c(A).email,"onUpdate:modelValue":u[1]||=e=>c(A).email=e,required:``,autocomplete:`username`},null,8,[`modelValue`]),n(b,{class:`mt-2`,message:c(A).errors.email},null,8,[`message`])]),e.mustVerifyEmail&&c(m).email_verified_at===null?(o(),g(`div`,T,[_(`p`,E,[r(d(c(y)(`Your email address is unverified.`))+` `,1),n(c(p),{href:a.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:s(()=>[r(d(c(y)(`Click here to re-send the verification email.`)),1)]),_:1},8,[`href`])]),i(_(`div`,{class:`mt-2 text-sm font-medium text-green-600 dark:text-green-400`},d(c(y)(`A new verification link has been sent to your email address.`)),513),[[f,e.status===`verification-link-sent`]])])):t(``,!0),_(`p`,D,[c(A).processing?(o(),g(`span`,O,d(c(y)(`Saving…`)),1)):(o(),g(`span`,k,d(c(y)(`Changes save automatically.`)),1))])],32)]))}}),j=e({default:()=>M}),M=A;export{j as n,M as t};