1import{r as l,m as p,j as e}from"./app-DDm4dLCY.js";import{I as m}from"./input-error-Wh-X1cuu.js";import{B as a}from"./button-D9X3vUxO.js";import{C as f,a as x,b as h,c as j,d as D,e as g}from"./card-DifmMaC0.js";import{D as y,a as C,b as w,c as v,d as U,e as k}from"./dialog-CEzzDisZ.js";import{I as E}from"./input-BjisokTd.js";/* empty css */import"./x-CHtAT9W1.js";import"./index-Cdxa91Ef.js";function T({className:c=""}){const[d,n]=l.useState(!1),o=l.useRef(null),s=p({password:""}),u=()=>{n(!0),setTimeout(()=>{var r;return(r=o.current)==null?void 0:r.focus()},250)},t=()=>{n(!1),s.reset()},i=()=>{s.delete(route("current-user.destroy"),{preserveScroll:!0,onSuccess:()=>t(),onError:()=>{var r;return(r=o.current)==null?void 0:r.focus()},onFinish:()=>s.reset()})};return e.jsxs(f,{className:c,children:[e.jsxs(x,{children:[e.jsx(h,{children:"Delete Account"}),e.jsx(j,{children:"Permanently delete your account."})]}),e.jsx(D,{children:e.jsx("p",{className:"text-muted-foreground text-sm",children:"Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain."})}),e.jsx(g,{className:"justify-end",children:e.jsx(a,{variant:"destructive",onClick:u,children:"Delete Account"})}),e.jsx(y,{open:d,onOpenChange:r=>!r&&t(),children:e.jsxs(C,{children:[e.jsxs(w,{children:[e.jsx(v,{children:"Delete Account"}),e.jsx(U,{children:"Please enter your password to confirm you would like to permanently delete your account and all your data."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{type:"password",placeholder:"Password",ref:o,value:s.data.password,onChange:r=>s.setData("password",r.target.value),onKeyUp:r=>r.key==="Enter"&&i(),"aria-invalid":s.errors.password?!0:void 0}),e.jsx(m,{message:s.errors.password})]}),e.jsxs(k,{children:[e.jsx(a,{variant:"outline",onClick:t,children:"Cancel"}),e.jsx(a,{variant:"destructive",onClick:i,disabled:s.processing,children:"Delete Account"})]})]})})]})}export{T 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.