import expressAsyncHandler from "express-async-handler";

const PRIVACY_POLICY_SECTIONS = [
    {
        title: "1. Information We Collect",
        content:
            "We may collect personal details (Name, Email, Phone), account & usage data (Scores, performance history, activity logs), and technical data (IP address, browser type, cookies) to provide and improve our services.",
        icon: "Database",
    },
    {
        title: "2. How We Use Your Data",
        content:
            "We use your data to provide platform access, conduct tests, track student performance, generate insights, enable institutional monitoring, and communicate important service updates.",
        icon: "Eye",
    },
    {
        title: "3. Data Sharing",
        content:
            "Student data is shared with their respective institutions for academic monitoring. We may disclose data if required by law or to trusted service providers. We do NOT sell your personal data to third parties.",
        icon: "Share2",
    },
    {
        title: "4. Data Security",
        content:
            "We implement industry-standard measures including secure authentication, HTTPS encryption, and access monitoring. While we strive to protect your data, no system is completely secure.",
        icon: "Lock",
    },
    {
        title: "5. Cookies & Tracking Technologies",
        content:
            "ExamInfra uses cookies to maintain sessions, improve user experience, and analyze usage. You can manage cookie preferences through your browser settings.",
        icon: "Cookie",
    },
    {
        title: "6. Data Retention",
        content:
            "We retain your data only for as long as necessary to provide our services or as required for legal and operational compliance.",
        icon: "Clock",
    },
    {
        title: "7. User Rights",
        content:
            "Users have the right to access their data, request corrections, or request account deletion. Please contact us to exercise these rights.",
        icon: "UserCheck",
    },
    {
        title: "8. Children's Privacy",
        content:
            "ExamInfra is intended for educational use. Minors using the platform should do so under the supervision of a parent, institution, or authorized authority.",
        icon: "Users",
    },
    {
        title: "9. Changes to This Policy",
        content:
            "We may update this Privacy Policy periodically. Your continued use of the platform constitutes acceptance of the updated terms.",
        icon: "Bell",
    },
];

export const getPrivacyPolicy = expressAsyncHandler(async (req, res) => {
    res.status(200).json({
        success: true,
        data: PRIVACY_POLICY_SECTIONS,
    });
});