import{B as e,C as t,D as n,E as r,F as i,H as a,Q as o,S as s,T as c,U as l,Y as u,a as d,b as f,et as p,g as m,i as h,m as g,r as _}from"./app-Dhs3Hs2L.js";import{t as v}from"./i18n-4meGCupV.js";import{n as y}from"./toast-CtoxlK28.js";import{n as b,t as x}from"./TextInput-KzTtUpNT.js";import{t as S}from"./InputLabel-DuhUHLJ6.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=n({__name:`UpdateProfileInformationForm`,props:{mustVerifyEmail:{},status:{}},setup(n){let p=d().props.auth.user,A=h({name:p.name,email:p.email}),j=null;return e(()=>[A.name,A.email],()=>{j&&clearTimeout(j),j=setTimeout(()=>{A.patch(route(`profile.update`),{preserveScroll:!0,onSuccess:()=>y(v(`Profile saved`))})},800)}),(e,d)=>(i(),t(`section`,null,[f(`header`,null,[f(`h2`,C,o(u(v)(`Profile Information`)),1),f(`p`,w,o(u(v)(`Update your account's profile information and email address.`)),1)]),f(`form`,{onSubmit:d[2]||=m(t=>u(A).patch(e.route(`profile.update`)),[`prevent`]),class:`mt-6 space-y-6`},[f(`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":d[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`])]),f(`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":d[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`])]),n.mustVerifyEmail&&u(p).email_verified_at===null?(i(),t(`div`,T,[f(`p`,E,[c(o(u(v)(`Your email address is unverified.`))+` `,1),r(u(_),{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(()=>[c(o(u(v)(`Click here to re-send the verification email.`)),1)]),_:1},8,[`href`])]),l(f(`div`,{class:`mt-2 text-sm font-medium text-green-600 dark:text-green-400`},o(u(v)(`A new verification link has been sent to your email address.`)),513),[[g,n.status===`verification-link-sent`]])])):s(``,!0),f(`p`,D,[u(A).processing?(i(),t(`span`,O,o(u(v)(`Saving…`)),1)):(i(),t(`span`,k,o(u(v)(`Changes save automatically.`)),1))])],32)]))}}),j=p({default:()=>M}),M=A;export{j as n,M as t};