import{u as v,b as h,j as e,L as j}from"./app-vYFZLebK.js";import{I as n}from"./InputError-Cj3POQLM.js";import{I as o}from"./InputLabel-B7-VnScM.js";import{P as g}from"./PrimaryButton-Byh_hOgr.js";import{T as l}from"./TextInput-BXnk3iOU.js";import{K as b}from"./transition-6I0c9VKA.js";function C({mustVerifyEmail:m,status:d,className:c=""}){const a=v().props.auth.user,{data:s,setData:r,patch:u,errors:i,processing:x,recentlySuccessful:f}=h({name:a.name,email:a.email}),p=t=>{t.preventDefault(),u(route("profile.update"))};return e.jsxs("section",{className:c,children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-lg font-black uppercase tracking-widest text-[var(--text-main)]",children:"Profile_Information"}),e.jsx("p",{className:"mt-1 text-xs font-bold uppercase tracking-widest text-[var(--text-muted)]",children:"Update your account's profile information and email address."})]}),e.jsxs("form",{onSubmit:p,className:"mt-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx(o,{htmlFor:"name",value:"Node_Alias"}),e.jsx(l,{id:"name",className:"mt-1 block w-full bg-[var(--bg-elevated)]",value:s.name,onChange:t=>r("name",t.target.value),required:!0,isFocused:!0,autoComplete:"name"}),e.jsx(n,{className:"mt-2",message:i.name})]}),e.jsxs("div",{children:[e.jsx(o,{htmlFor:"email",value:"Node_Email"}),e.jsx(l,{id:"email",type:"email",className:"mt-1 block w-full bg-[var(--bg-elevated)]",value:s.email,onChange:t=>r("email",t.target.value),required:!0,autoComplete:"username"}),e.jsx(n,{className:"mt-2",message:i.email})]}),m&&a.email_verified_at===null&&e.jsxs("div",{children:[e.jsxs("p",{className:"mt-2 text-sm text-[var(--text-main)]",children:["Your email address is unverified.",e.jsx(j,{href:route("verification.send"),method:"post",as:"button",className:"rounded-md text-sm text-[var(--text-muted)] underline hover:text-[var(--text-main)] focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2",children:"Click here to re-send the verification email."})]}),d==="verification-link-sent"&&e.jsx("div",{className:"mt-2 text-sm font-medium text-emerald-500",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:x,children:"Save_Changes"}),e.jsx(b,{show:f,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-emerald-500 font-bold uppercase tracking-widest",children:"Saved_"})})]})]})]})}export{C as default};
