1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1417],{19334:(e,s,a)=>{a.d(s,{A:()=>r});var n=a(39876),l=a(9631),t=a(95368),i=a(41890);function r(e){let{children:s,asChild:a=!1,hidden:r=!1,className:c}=e,{backend:d,titleId:x}=(0,i.B)(),o=r?"sr-only":c;return"vaul"===d?(0,n.jsx)(l._s.Title,{asChild:a,className:o,children:s}):a&&(0,t.isValidElement)(s)?(0,t.cloneElement)(s,{id:x,className:[s.props.className,o].filter(Boolean).join(" ")||void 0}):(0,n.jsx)("h2",{id:x,className:o,children:s})}},51417:(e,s,a)=>{a.r(s),a.d(s,{ConfirmDeleteAccountSurface:()=>x});var n=a(39876),l=a(95368),t=a(71105),i=a(78819);function r(e){var s,a,r;let{onCancel:c,onDeleted:d}=e,{identity:x,requestAccountDeletion:o}=(0,t.B)(),m=null==(s=x.data)?void 0:s.user,[u,h]=(0,l.useState)("review"),p=(0,l.useRef)(null),f=(0,l.useRef)(!1);async function j(){await o.mutateAsync(),d()}return((0,l.useEffect)(()=>{var e;if(!f.current){f.current=!0;return}null==(e=p.current)||e.focus()},[u]),"review"===u)?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"border-b border-gray-100 px-6 pb-4 pt-6",children:(0,n.jsx)("h2",{ref:p,tabIndex:-1,className:"font-display text-2xl uppercase leading-none tracking-[-0.005em] text-gray-950 focus:outline-none",children:"Delete account"})}),(0,n.jsxs)("div",{className:"px-6 py-5",children:[(0,n.jsx)("div",{className:"mb-4 rounded-xl bg-gray-100 p-4",children:(0,n.jsxs)("dl",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex justify-between gap-4 text-sm",children:[(0,n.jsx)("dt",{className:"text-gray-600",children:"Name"}),(0,n.jsxs)("dd",{className:"font-medium text-gray-950",children:[null!=(a=null==m?void 0:m.first_name)?a:""," ",null!=(r=null==m?void 0:m.last_name)?r:""]})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-4 text-sm",children:[(0,n.jsx)("dt",{className:"text-gray-600",children:"Phone"}),(0,n.jsx)("dd",{className:"font-medium text-gray-950",children:null==m?void 0:m.ph
1one})]}),(null==m?void 0:m.email)&&(0,n.jsxs)("div",{className:"flex justify-between gap-4 text-sm",children:[(0,n.jsx)("dt",{className:"text-gray-600",children:"Email"}),(0,n.jsx)("dd",{className:"min-w-0 truncate font-medium text-gray-950",children:m.email})]})]})}),(0,n.jsx)("p",{className:"text-sm text-gray-600",children:"This action is permanent and cannot be undone."})]}),(0,n.jsxs)("div",{className:"flex gap-3 px-6 pb-6",children:[(0,n.jsx)(i.$,{variant:"secondary",onClick:c,children:"Cancel"}),(0,n.jsx)(i.$,{variant:"danger-outline",onClick:()=>h("confirm"),className:"flex-1",children:"Continue"})]})]}):(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"border-b border-gray-100 px-6 pb-4 pt-6",children:[(0,n.jsx)("h2",{ref:p,tabIndex:-1,className:"font-display text-2xl uppercase leading-none tracking-[-0.005em] text-gray-950 focus:outline-none",children:"Are you sure?"}),(0,n.jsx)("p",{className:"mt-2 text-base text-gray-600",children:"This will permanently delete your account."})]}),(0,n.jsx)("div",{className:"px-6 py-5",children:o.isError&&(0,n.jsx)("p",{role:"alert",className:"text-sm font-medium text-negative",children:"Failed to delete account. Please try again."})}),(0,n.jsxs)("div",{className:"flex gap-3 px-6 pb-6",children:[(0,n.jsx)(i.$,{variant:"secondary",onClick:()=>h("review"),children:"Go back"}),(0,n.jsx)(i.$,{variant:"danger",onClick:j,isLoading:o.isPending,loadingText:"Deletingâ¦",className:"flex-1",children:"Delete my account"})]})]})}var c=a(78262),d=a(19334);function x(e){let s=(0,c.f)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{hidden:!0,children:"Delete account"}),(0,n.jsx)(r,{onCancel:()=>s.pop(),onDeleted:()=>s.closeAll()})]})}}}]);
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.