import {
    BookCopy,
    LayoutDashboard,
    Shield,
    Users,
    GraduationCap,
    BarChart2,
    FileText,
    Settings,
    BrainCircuit,
    MessageSquare,
    CreditCard,
    IndianRupee,
    School,
    ChartColumnStacked,
    FileQuestionMark,
    NotebookText,
    History,
    Briefcase,
    CalendarRange,
    NotebookPen,
    Hash,
    BarChart3,
    Building2,
    Send,
    Share2,
    SquarePen,
    Link
} from 'lucide-react';
import ROUTE_CONSTANTS from './route.constants';
import { staffPermissionsList } from '@/types';

export enum Role {
    ADMIN = 'ADMIN',
    STAFF = 'STAFF',
    INSTITUTION = 'INSTITUTION',
}

export const NAV_LINKS = [
    {
        name: "Overview",
        href: "#overview",
        icon: LayoutDashboard,
        roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [
            {
                name: "Dashboard",
                href: ROUTE_CONSTANTS.Dashboard,
                icon: LayoutDashboard,
                roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
                permissionKey: "allUsers",
            },
        ]
    },
    {
        name: "Management",
        href: "#management",
        icon: Settings,
        roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [
            {
                name: "Institutions",
                href: ROUTE_CONSTANTS.Institutions,
                icon: School,
                roles: [Role.ADMIN],
            },
            {
                name: "Link Approvals",
                href: ROUTE_CONSTANTS.NotesAndLinksApproval,
                icon: Link,
                roles: [Role.ADMIN],
            },
            {
                name: "Roles",
                href: ROUTE_CONSTANTS.Roles,
                icon: Shield,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.roles,
            },
            {
                name: "Reference Sequences",
                href: ROUTE_CONSTANTS.ReferenceSequences,
                icon: Hash,
                roles: [Role.ADMIN],
            },
            {
                name: "Staffs",
                href: ROUTE_CONSTANTS.Staffs,
                icon: Users,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.staffs,
            },
            {
                name: "Students",
                href: ROUTE_CONSTANTS.Students,
                icon: GraduationCap,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.students,
            },
        ]
    },
    {
        name: "Resource Sharing",
        href: "#resource-sharing",
        icon: Share2,
        roles: [Role.ADMIN],
        children: [
            {
                name: "Share Resources",
                href: ROUTE_CONSTANTS.SharedResources,
                icon: Send,
                roles: [Role.ADMIN],
            },
            {
                name: "Shared History",
                href: ROUTE_CONSTANTS.SharedHistory,
                icon: History,
                roles: [Role.ADMIN],
            }
        ]
    },
    {
        name: "Examination",
        href: "#examination",
        icon: ChartColumnStacked,
        roles: [Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [

            {
                name: "Exams",
                href: ROUTE_CONSTANTS.Exams,
                icon: FileText,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.exams,
            },
            {
                name: "Syllabus & Notifications",
                href: ROUTE_CONSTANTS.Syllabus,
                icon: NotebookText,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.syllabus,
            },

        ]
    },
    {
        name: "Content Library",
        href: "#content-library",
        icon: BrainCircuit,
        roles: [Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [
            {
                name: "Subjects",
                href: ROUTE_CONSTANTS.Subjects,
                icon: Briefcase,
                roles: [Role.INSTITUTION],
                permissionKey: staffPermissionsList.subjects,
            },
            {
                name: "Question Bank",
                href: ROUTE_CONSTANTS.QuestionBank,
                icon: BookCopy,
                roles: [Role.INSTITUTION],
                permissionKey: staffPermissionsList.questionBank,
            },
            {
                name: "Notes & Links",
                href: ROUTE_CONSTANTS.NotesAndLinks,
                icon: Link,
                roles: [Role.INSTITUTION],
                permissionKey: staffPermissionsList.notesAndLinks,
            },
        ]
    },
    {
        name: "Tests",
        href: "#tests",
        icon: FileQuestionMark,
        roles: [Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [
            {
                name: "Practice Tests",
                href: ROUTE_CONSTANTS.PracticeTest,
                icon: NotebookPen,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.practiceTests,
            },
            {
                name: "Mock Tests",
                href: ROUTE_CONSTANTS.MockTest,
                icon: SquarePen,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.mockTest,
            },
            {
                name: "Previous Year Question Papers",
                href: ROUTE_CONSTANTS.OldQuestionsPapers,
                icon: CalendarRange,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.oldQuestionsPapers,
            },
        ]
    },
    {
        name: "Billing & Access",
        href: "#billing",
        icon: IndianRupee,
        roles: [Role.ADMIN, Role.STAFF],
        permissionKey: "allUsers",
        children: [
            {
                name: "Subscriptions",
                href: ROUTE_CONSTANTS.Subscriptions,
                icon: CreditCard,
                roles: [Role.ADMIN],
            },
            {
                name: "Subscription Requests",
                href: ROUTE_CONSTANTS.SubscriptionRequests,
                icon: Send,
                roles: [Role.INSTITUTION, Role.STAFF],
                permissionKey: staffPermissionsList.subscriptionRequests,
            },

        ]
    },
    {
        name: "Reports",
        href: "#reports",
        icon: BarChart2,
        roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [
            {
                name: "Reports & Scores",
                href: ROUTE_CONSTANTS.Reports,
                icon: BarChart2,
                roles: [Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.reportsScores,
            },
            {
                name: "Progress Overview",
                href: ROUTE_CONSTANTS.ProgressOverview,
                icon: BarChart3,
                roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.studentsReport,
            },
            {
                name: "Payment Details",
                href: ROUTE_CONSTANTS.Payments,
                icon: IndianRupee,
                roles: [Role.INSTITUTION, Role.STAFF],
                permissionKey: staffPermissionsList.paymentReports,
            },
            {
                name: "Payments List",
                href: ROUTE_CONSTANTS.PlatformPaymentReport,
                icon: IndianRupee,
                roles: [Role.ADMIN],
            }
        ]
    },
    {
        name: "Contact Us",
        href: "#contact-us",
        icon: MessageSquare,
        roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
        permissionKey: "allUsers",
        children: [
            {
                name: "Support & Feedback",
                href: ROUTE_CONSTANTS.Support,
                icon: MessageSquare,
                roles: [Role.ADMIN, Role.STAFF, Role.INSTITUTION],
                permissionKey: staffPermissionsList.supportFeedback,
            },
        ]
    },
];
