import{q as h,S as p,j as e,J as j}from"./app-BZJf8lgN.js";import{I as n}from"./InputError-DE3wWovO.js";import{P as v}from"./PrimaryButton-DZfTvxkJ.js";import{I as l}from"./inputtext.esm-B1lZn37a.js";import{z as g}from"./transition-CxU0V_cz.js";import"./button.esm-D_cwsnQR.js";import"./hooks.esm-UVLztt_0.js";function E({mustVerifyEmail:m,status:o,className:c=""}){const s=h().props.auth.user,{data:t,setData:i,patch:d,errors:r,processing:u,recentlySuccessful:x}=p({name:s.name,email:s.email}),f=a=>{a.preventDefault(),d(route("profile.update"))};return e.jsxs("section",{className:c,children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-lg font-medium",children:"Profile Information"}),e.jsx("p",{className:"mt-1 text-sm text-gray-600",children:"Update your account's profile information and email address."})]}),e.jsxs("form",{onSubmit:f,className:"mt-4 space-y-6",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{htmlFor:"name",className:"block text-900 font-medium mb-2",children:"Name"}),e.jsx(l,{id:"name",type:"text",placeholder:"Name",className:"w-full",value:t.name,onChange:a=>i("name",a.target.value)}),e.jsx(n,{message:r.email,className:""})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{htmlFor:"email",className:"block text-900 font-medium mb-2",children:"Email"}),e.jsx(l,{id:"email",type:"text",placeholder:"Email address",className:"w-full",value:t.email,onChange:a=>i("email",a.target.value)}),e.jsx(n,{message:r.email,className:""})]}),m&&s.email_verified_at===null&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm mt-2 text-gray-800",children:["Your email address is unverified.",e.jsx(j,{href:route("verification.send"),method:"post",as:"button",className:"underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Click here to re-send the verification email."})]}),o==="verification-link-sent"&&e.jsx("div",{className:"mt-2 font-medium text-sm text-green-600",children:"A new verification link has been sent to your email address."})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(v,{disabled:u,children:"Save"}),e.jsx(g,{show:x,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-gray-600",children:"Saved."})})]})]})]})}export{E as default};
//# sourceMappingURL=UpdateProfileInformationForm-CJNcM8sm.js.map
