1import{r as s,j as e,C as n,e as l,g as i,$ as p,a as c,T as d,B as y,z as N,D as a,aj as o,m}from"./index-B2zYFcFj.js";import{A as x,a as h}from"./alert-BMmhoRLu.js";import{D as f}from"./DeleteAccountDialog-D14E66TN.js";import{S as v}from"./shield-Bu8rDwq7.js";import{T as D}from"./triangle-alert-ZLg4nWMl.js";import"./dialog-DKDWY-Ub.js";function L(){const[t,u]=s.useState(null),[j,g]=s.useState(!0);return s.useEffect(()=>{document.title="Delete My Account - LanguageKnow",(async()=>{try{if(await m.auth.isAuthenticated()){const b=await m.auth.me();u(b)}}catch(r){console.error("Auth check error:",r)}finally{g(!1)}})()},[]),j?e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-900"})}):e.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(v,{className:"w-12 h-12 text-red-900 mx-auto mb-4"}),e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Delete My Account"}),e.jsx("p",{className:"text-gray-600",children:"Permanently delete your account and personal data, right here in the app."})]}),e.jsxs(n,{className:"mb-6",children:[e.jsxs(l,{children:[e.jsx(i,{children:"Your Data Rights"}),e.jsx(p,{children:"You can permanently delete your account and personal data at any time."})]}),e.jsx(c,{className:"space-y-4",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-blue-50 p-4 rounded-lg",children:[e.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"What will be deleted:"}),e.jsxs("ul",{className:"text-sm text-blue-800 space-y-1",children:[e.jsx("li",{children:"⢠Your account and profile information"}),e.jsx("li",{children:"⢠Learning progress and quiz scores"}),e.jsx("li",{children:"⢠Essay submissions"}),e.jsx("li",{children:"⢠Vocabulary and flashcard data"}),e.jsx("li",{children:"⢠AI conversation history"})]})]}),e.jsxs("div",{className:"bg-amber-50 p-4 rounded-lg",children:[e.jsx("h3",{className:"font-semibold text-amber-900 mb-2",children:"What may be retained:"}),e.jsxs("ul",{className:"text-sm text-amber-800 space-y-1",children:[e.jsx("li",{children:"⢠Anonymized content contributions (for teachers)"}),e.jsx("li",{children:"⢠Certificate verification records"}),e.jsx("li",{children:"⢠Data required for legal compliance"})]})]})]})})]}),e.jsxs(x,{className:"mb-6 border-red-200 bg-red-50",children:[e.jsx(D,{className:"h-4 w-4 text-red-600"}),e.jsxs(h,{className:"text-red-800",children:[e.jsx("strong",{children:"Warning:"})," This action is irreversible. Once your account is deleted, it cannot be recovered."]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsxs(i,{className:"flex items-center gap-2",children:[e.jsx(d,{className:"w-5 h-5 text-red-600"}),"Delete Your Account"]})}),e.jsx(c,{className:"space-y-6",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Signed in as:"}),e.jsx("p",{className:"font-semibold",children:t.email})]}),e.jsx(f,{trigger:e.jsxs(y,{className:"w-full bg-red-600 hover:bg-red-700",children:[e.jsx(d,{className:"w-4 h-4 mr-2"}
1),"Delete My Account & Data"]})}),e.jsx("p",{className:"text-xs text-gray-500 text-center",children:"You'll be asked to type DELETE to confirm. Deletion is immediate and permanent."})]}):e.jsx(x,{children:e.jsxs(h,{children:["You need to be signed in to delete your account."," ",e.jsx("button",{onClick:()=>N(a("DataDeletion")),className:"text-blue-600 underline",children:"Sign in"})," ","to continue."]})})})]}),e.jsxs("div",{className:"mt-8 text-center text-sm text-gray-500",children:[e.jsxs("p",{children:["Questions? Contact us at"," ",e.jsx("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:underline",children:"[email protected]"})]}),e.jsxs("div",{className:"mt-4 space-x-4",children:[e.jsx(o,{to:a("Privacy"),className:"text-blue-600 hover:underline",children:"Privacy Policy"}),e.jsx(o,{to:a("Terms"),className:"text-blue-600 hover:underline",children:"Terms of Service"})]})]})]})})}export{L 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.