1import{r as c,c as w,j as e}from"./app-D7bY3VIr.js";import m from"./DangerButton-DxKHxMNW.js";import N from"./InputError-JpchlQzo.js";import y from"./InputLabel-dvjxXfr8.js";import _ from"./Modal-C2SBH01o.js";import v from"./SecondaryButton-B2kfP-pM.js";import D from"./TextInput-BIQ_0JaE.js";import{u as C}from"./useTranslation-tvhqZ2qh.js";import"./transition-DG5evRMa.js";import"./index-SlqGhRfq.js";function T({className:l=""}){const{t:s}=C(),[i,t]=c.useState(!1),n=c.useRef(),{data:d,setData:p,delete:u,processing:x,reset:a,errors:f,clearErrors:h}=w({password:""}),j=()=>{t(!0)},g=r=>{r.preventDefault(),u(route("profile.destroy"),{preserveScroll:!0,onSuccess:()=>o(),onError:()=>n.current.focus(),onFinish:()=>a()})},o=()=>{t(!1),h(),a()};return e.jsxs("section",{className:`space-y-6 ${l}`,children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-lg font-medium text-gray-900",children:s("common.delete_account")}),e.jsx("p",{className:"mt-1 text-sm text-gray-600",children:s("common.delete_account_description")})]}),e.jsx(m,{onClick:j,children:s("common.delete_account")}),e.jsx(_,{show:i,onClose:o,children:e.jsxs("form",{onSubmit:g,className:"p-6",children:[e.jsx("h2",{className:"text-lg font-medium text-gray-900",children:s("common.delete_account_confirm")}),e.jsx("p",{className:"mt-1 text-sm text-gray-600",children:s("common.delete_account_confirm_description")}),e.jsxs("div",{className:"mt-6",children:[e.jsx(y,{htmlFor:"password",value:s("common.password"),className:"sr-only"}),e.jsx(D,{id:"password",type:"password",name:"password",ref:n,value:d.password,onChange:r=>p("password",r.target.value),className:"mt-1 block w-3/4",isFocused:!0,placeholder:s("common.password")}),e.jsx(N,{message:f.password,className:"mt-2"})]}),e.jsxs("div",{className:"mt-6 flex justify-end",children:[e.jsx(v,{onClick:o,children:s("common.cancel")}),e.jsx(m,{className:"ms-3",disabled:x,children:s("common.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.