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