import{q as h,W as v,j as e,a as j}from"./app-BAHAOwU3.js";import{L as n}from"./label-DP7sGf18.js";import{I as m}from"./input-CeK7CEQL.js";import{I as o}from"./input-error-Be2KxtIS.js";import{B as g}from"./button-T-Jxhehc.js";import{q as N}from"./transition-BTktE0mm.js";function w({mustVerifyEmail:l,status:c,className:u=""}){const s=h().props.auth.user,{data:t,setData:i,patch:d,errors:r,processing:f,recentlySuccessful:x}=v({name:s.name,email:s.email}),p=a=>{a.preventDefault(),d(route("profile.update"))};return e.jsx("section",{className:u,children:e.jsxs("form",{onSubmit:p,className:"mt-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx(n,{htmlFor:"name",children:"Name"}),e.jsx(m,{id:"name",className:"mt-1 block w-full",value:t.name,onChange:a=>i("name",a.target.value),required:!0,autoComplete:"name"}),e.jsx(o,{className:"mt-2",message:r.name})]}),e.jsxs("div",{children:[e.jsx(n,{htmlFor:"email",children:"Email"}),e.jsx(m,{id:"email",type:"email",className:"mt-1 block w-full",value:t.email,onChange:a=>i("email",a.target.value),required:!0,autoComplete:"username"}),e.jsx(o,{className:"mt-2",message:r.email})]}),l&&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."})]}),c==="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(g,{disabled:f,children:"Save"}),e.jsx(N,{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{w as default};
