import{J as x,x as h,j as e,Q as j,d as v}from"./app-BBZbvTSO.js";import{H as g}from"./heading-small-CjA8Z0WM.js";import{I as o}from"./input-error-Bz7f2c6i.js";import{B as N}from"./button-CZmOQP7j.js";import{I as m}from"./input-dmj4QjAp.js";import{L as l}from"./label-BPDCCRHl.js";import{A as b}from"./app-layout-DgXit_SB.js";import{S as y}from"./layout-CZOI4-_w.js";import{S}from"./separator-BzKY_P4f.js";import{z as k}from"./transition-BejWKDY2.js";/* empty css            */import"./utils-YhN_nlHn.js";import"./index-13DH8-b5.js";import"./index-C0VDnRYN.js";import"./index-CbDI-tXU.js";import"./Combination-9YgcTppv.js";import"./index-C1VwruLz.js";import"./tooltip-CRkL5R4V.js";import"./index-hDbW6ayQ.js";import"./floating-ui.dom-DtF1XweH.js";import"./index-AiAmtg3H.js";import"./dropdown-menu-DkvU_mzU.js";import"./index-IvSACaye.js";import"./index-BosTFUDi.js";import"./index-Dbn6AP0q.js";import"./settings-1sj5BLwD.js";import"./app-logo-icon-BZsH9yGo.js";import"./index-BnKWxTXF.js";import"./image-BEhzBCM8.js";import"./globe-DRyUQWUz.js";import"./users-DU0sA3Q7.js";import"./layout-grid-CF44vN4j.js";import"./chevron-right-fDICdnKB.js";import"./heading-D7WRqD78.js";const C=[{title:"Profile settings",href:"/settings/profile"}];function oe({mustVerifyEmail:n,status:d}){const{auth:r}=x().props,{data:a,setData:i,patch:p,errors:s,processing:c,recentlySuccessful:u}=h({name:r.user.name,email:r.user.email}),f=t=>{t.preventDefault(),p(route("profile.update"),{preserveScroll:!0})};return e.jsxs(b,{breadcrumbs:C,children:[e.jsx(j,{title:"Profile settings"}),e.jsxs(y,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(g,{title:"Profile information",description:"Update your name and email address"}),e.jsxs("form",{onSubmit:f,className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"name",children:"Name"}),e.jsx(m,{id:"name",className:"mt-1 block w-full",value:a.name,onChange:t=>i("name",t.target.value),required:!0,autoComplete:"name",placeholder:"Full name"}),e.jsx(o,{className:"mt-2",message:s.name})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Email address"}),e.jsx(m,{id:"email",type:"email",className:"mt-1 block w-full",value:a.email,onChange:t=>i("email",t.target.value),required:!0,autoComplete:"username",placeholder:"Email address"}),e.jsx(o,{className:"mt-2",message:s.email})]}),n&&r.user.email_verified_at===null&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",e.jsx(v,{href:route("verification.send"),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]}),d==="verification-link-sent"&&e.jsx("div",{className:"mt-2 text-sm font-medium 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(N,{disabled:c,children:"Save"}),e.jsx(k,{show:u,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})]}),e.jsx(S,{})]})]})}export{oe as default};
