import expressAsyncHandler from "express-async-handler";

const TERMS_AND_CONDITIONS_SECTIONS = [
    {
        title: "1. Acceptance of Terms",
        content:
            "By accessing or using ExamInfra, you agree to be bound by these Terms and Conditions. If you do not agree with any part of these terms, you must not use our platform. These Terms apply to all users using our services.",
        icon: "CheckCircle2",
    },
    {
        title: "2. User Accounts",
        content:
            "Users are responsible for maintaining the confidentiality of their account credentials. Any activity performed under your account is your responsibility. You must notify us immediately in case of unauthorized access or security breach. Institutions and staff are responsible for managing accounts associated with their organization.",
        icon: "Shield",
    },
    {
        title: "3. User Roles and Access",
        content:
            "ExamInfra supports the following user types: Students (Can register independently or through an institution and access tests), Staff (Can manage students, create questions, and conduct tests), and Institutions (Can oversee staff, manage students, and monitor performance). Access to platform features is based on the assigned role.",
        icon: "Users",
    },
    {
        title: "4. Educational Use",
        content:
            "ExamInfra is intended strictly for educational and exam preparation purposes. Users agree not to engage in illegal activities, attempt to hack, disrupt, or misuse the platform, copy or misuse exam content, or circumvent security mechanisms.",
        icon: "Scale",
    },
    {
        title: "5. Question Bank & Intellectual Property",
        content:
            "All content on ExamInfra, including MCQs, test papers, and explanations, is owned by ExamInfra, institutions, or content providers. Staff and institutions may upload and manage their own content. By uploading content, you grant ExamInfra a license to store and use it for platform operations. Users are strictly prohibited from copying, distributing, or reselling content without permission.",
        icon: "FileText",
    },
    {
        title: "6. Payments and Fees",
        content:
            "Students may be required to pay fees to their institution or the platform (where applicable). All payments must be made through approved methods. Fees are non-refundable, unless explicitly stated otherwise. ExamInfra is not responsible for disputes between students and institutions regarding payments.",
        icon: "CreditCard",
    },
    {
        title: "7. Student Usage and Conduct",
        content:
            "Students agree not to engage in cheating, impersonation, or unfair practices during tests, and not to share test content with others. Violations may result in suspension or permanent account termination.",
        icon: "UserCheck",
    },
    {
        title: "8. Referral Program",
        content:
            "Staff may share referral codes with students. Any misuse, manipulation, or fraudulent activity will result in suspension of accounts and cancellation of referral benefits.",
        icon: "Gift",
    },
    {
        title: "9. Data Privacy",
        content:
            "ExamInfra collects and processes user data to provide services. Institutions and staff may access data related to their students. Users agree to the collection and use of data as per our Privacy Policy.",
        icon: "Lock",
    },
    {
        title: "10. Suspension and Termination",
        content:
            "ExamInfra reserves the right to suspend or terminate accounts that violate these Terms, remove any content deemed inappropriate or unlawful, or restrict access without prior notice in case of misuse.",
        icon: "AlertTriangle",
    },
    {
        title: "11. Limitation of Liability",
        content:
            "ExamInfra is provided on an “as-is” basis. We are not liable for data loss, service interruptions, payment disputes between users, or errors in test content.",
        icon: "FileWarning",
    },
    {
        title: "12. Modifications to Terms",
        content:
            "We reserve the right to update or modify these Terms at any time. Continued use of the platform constitutes acceptance of the updated Terms.",
        icon: "FileEdit",
    },
    {
        title: "13. Governing Law",
        content: "These Terms shall be governed by the laws of India.",
        icon: "Gavel",
    },
];

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