import React from "react";
import { Megaphone, Download, PencilLine, Trash2, MailX, Inbox, Clock, ShieldCheck, MessageCircle, ScrollText, Send, ListChecks, Building2, Eye, Gauge, Timer, AlertTriangle } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
/** Help content for /dashboard/user/privacy (the person's own privacy centre). */
export const userPrivacyHelpContent: HelpContent = {
title: "Privacy",
subtitle: "What we send you, your data, and your rights under POPIA.",
tabs: [
{
key: "messages",
label: "Messages",
icon: Megaphone,
content: (
Occasional messages about upcoming events. You only get them if you said yes — by email, WhatsApp or both. Untick a box to stop them.
Tickets, receipts, reminders and changes to events you registered for are always sent, by the channel you chose in Profile & Security.
Every news email has an unsubscribe link, and you can reply STOP to a news message on WhatsApp. The history under the boxes shows every choice you made and when.
),
},
{
key: "data",
label: "Your data",
icon: Download,
content: (
The PDF is easy to read; the JSON file is the complete copy. Both include your registrations, the people you registered, form answers, payments, tickets and check-ins.
Change your name, email and phone in Profile & Security. For anything else, send a correction request — we answer by email within 30 days.
Your account is closed straight away. Your personal information is deleted once the request is processed (within 30 days) — after any upcoming event you registered for. Payment amounts and dates are kept without your name, because the law requires it.
),
},
],
};
/** Help content for /dashboard/admin/privacy. */
export const adminPrivacyHelpContent: HelpContent = {
title: "Privacy (POPIA)",
subtitle: "Your privacy notice, operators, retention, breaches and the consent and access records.",
tabs: [
{
key: "readiness",
label: "Readiness & retention",
icon: Gauge,
content: (
A checklist with a score: Information Officer set, notice published, operators described, retention reviewed and running, requests answered on time, breaches reported, unsubscribe and WhatsApp STOP working, backups, two-factor login. Each open item links to where you fix it.
How long each kind of personal information is kept. Every night at 03:30 the retention job deletes or anonymises what's older: inactive accounts (after a warning 30 days before — logging in keeps the account), event form answers, login history, payer details from payment notifications, and old audit/access records. The privacy notice's retention section follows these settings ({"{retention}"}). Review and save them, even if you keep the defaults.
Record any security compromise. POPIA requires telling the Information Regulator and the people affected as soon as reasonably possible; each entry has a draft for both, and you record when you told them. Readiness flags any not reported to the Regulator within 3 days.
),
},
{
key: "notice",
label: "Privacy notice",
icon: ScrollText,
content: (
The notice starts from the built-in text. Change any section, add or remove sections, and save a draft — nothing is public until you publish. Placeholders like {"{org}"}, {"{ioName}"} and {"{operators}"} are filled in from Site settings and the operator register, so they stay up to date.
Each publish is a numbered version with its date, and earlier versions stay readable on the privacy page. Tick "Significant change" and say what changed when people should accept it again — they're asked once, after they next log in. Leave it unticked for small fixes.
The tools help you comply; your Information Officer should check the wording.
),
},
{
key: "records",
label: "Operators & logs",
icon: ListChecks,
content: (
The services that process personal information for you: payment providers, WhatsApp and email delivery, hosting. Check the details of each — especially your email and hosting provider. Ones marked "in use" are listed in the privacy notice.
Proof of consent: every news opt-in and opt-out (and how — sign-up, unsubscribe link, STOP reply…), every privacy notice acceptance, and every parental consent answer.
Who downloaded, emailed or opened personal information in bulk — reports, attendance registers, certificates, group lists, form answers, consent and medical lists, backups — and every "view as" session.
),
},
],
};
/** Help content for /dashboard/admin/data-requests. */
export const adminDataRequestsHelpContent: HelpContent = {
title: "Data requests",
subtitle: "POPIA requests from people about their personal information.",
tabs: [
{
key: "how",
label: "How it works",
icon: Inbox,
content: (
People send correction and deletion requests from their Privacy page (or by ticking "also delete my data" when closing their account). The Information Officer (Site settings → Legal) and all admins are emailed for each one.
POPIA asks for an answer within 30 days. Requests due within a week or overdue are emailed to admins every morning, and overdue ones are outlined in red.
People download their own data from their Privacy page, so those aren't listed here. If someone asks by email or phone, point them to that page. (Downloading is blocked while viewing as someone else, so an admin can't take a person's full record that way.)
),
},
{
key: "handle",
label: "Handling a request",
icon: Trash2,
content: (
Make the change (e.g. on the registration or attendee), then click Mark as done and say what you changed — it's emailed to them.
The account is already closed. If they have a registration for an upcoming event, cancel it (refund if needed) or wait until the event is over. Then Delete personal data: their name, contact details, attendees, form answers and the payer details kept by Yoco/PayFast notifications are removed. Payments, registrations and check-ins stay as "Deleted User" for the books and reports. It can't be undone and is logged in the audit log.
Give a reason; it's emailed to them. Tick "They withdrew it" if they changed their mind. Rejecting or cancelling a deletion opens their account again.
),
},
],
};