1import{r as v,u as j,j as e,a as y,H as N,L as b}from"./app-CEM_hZ67.js";import{I as p}from"./input-error-D5RKYWyE.js";import{B as d}from"./button-DOrlblnf.js";import{I as h}from"./input-5Z8_ZdQw.js";import{L as x}from"./label-BipGA274.js";import{H as g}from"./heading-small-C6ppqXm3.js";import{D as w,a as D,b as C,c as k,f as S,d as P,e as F}from"./dialog-CsPqLzED.js";import{A as E}from"./app-layout-1FCVD4Kk.js";import{S as L}from"./layout-CMHnb4qP.js";import{K as I}from"./transition-CppgwMpn.js";/* empty css */import"./createLucideIcon-64Dk5mLq.js";import"./x-DS2pQb1Y.js";import"./index-CyfQME8z.js";import"./index-CRHEMW4U.js";import"./index-CEUp0jRa.js";import"./index-B6yuDOg2.js";import"./index-iGLbA6YT.js";import"./app-logo-icon-IEnYwRZS.js";import"./heading-BXv5Hz9O.js";import"./use-is-mounted-ClYOOdLU.js";function A(){const a=v.useRef(null),{data:c,setData:r,delete:t,processing:o,reset:i,errors:l,clearErrors:m}=j({password:""}),u=s=>{s.preventDefault(),t(route("profile.destroy"),{preserveScroll:!0,onSuccess:()=>n(),onError:()=>{var f;return(f=a.current)==null?void 0:f.focus()},onFinish:()=>i()})},n=()=>{m(),i()};return e.jsxs("div",{className:"space-y-6",children:[e.jsx(g,{title:"Delete account",description:"Delete your account and all of its resources"}),e.jsxs("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[e.jsxs("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[e.jsx("p",{className:"font-medium",children:"Warning"}),e.jsx("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),e.jsxs(w,{children:[e.jsx(D,{asChild:!0,children:e.jsx(d,{variant:"destructive",children:"Delete account"})}),e.jsxs(C,{children:[e.jsx(k,{children:"Are you sure you want to delete your account?"}),e.jsx(S,{children:"Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account."}),e.jsxs("form",{className:"space-y-6",onSubmit:u,children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(x,{htmlFor:"password",className:"sr-only",children:"Password"}),e.jsx(h,{id:"password",type:"password",name:"password",ref:a,value:c.password,onChange:s=>r("password",s.target.value),placeholder:"Password",autoComplete:"current-password"}),e.jsx(p,{message:l.password})]}),e.jsxs(P,{className:"gap-2",children:[e.jsx(F,{asChild:!0,children:e.jsx(d,{variant:"secondary",onClick:n,children:"Cancel"})}),e.jsx(d,{variant:"destructive",disabled:o,asChild:!0,children:e.jsx("button",{type:"submit",children:"Delete account"})})]})]})]})]})]})]})}const H=[{title:"Profile settings",href:"/settings/profile"}];function re({mustVerifyEmail:a,status:c}){const{auth:r}=y().props,{data:t,setData:o,patch:i,errors:l,processing:m,recentlySuccessful:u}=j({name:r.user.name,email:r.user.email}),n=s=>{s.preventDefault(),i(route("profile.update"),{preserveScroll:!0})};return e.jsxs(E,{breadcrumbs:H,children:[e.jsx(N,{title:"Profile settings"}),e.jsxs(L,{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:n,className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(x,{htmlFor:"name",children:"Name"}),e.jsx(h,{id:"name",className:"mt-1 block w-full",value:t.name,onChange:s=>o("name",s.target.value),required:!0,autoComplete:"name",placeholder:"Full name"}),e.jsx(p,{className:"mt-2",message:l.name})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(x,{htmlFor:"email",children:"Email address"}),e.jsx(h,{id:"email",type:"email",className:"mt-1 block w-full",value:t.email,onChange:s=>o("email",s.target.value),required:!0,autoComplete:"username",placeholder:"Email address"}),e.jsx(p,{className:"mt-2",message:l.email})]}),a&&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(b,{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."})]}),c==="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(d,{disabled:m,children:"Save"}),e.jsx(I,{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(A,{})]})]})}export{re as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.