"use client";
import React, { useState, useEffect } from 'react';
import { usePathname, useRouter } from 'next/navigation';
import Link from 'next/link';
import { motion, AnimatePresence } from 'framer-motion';
import {
LayoutDashboard, BookOpen, FileQuestion, Users, Settings, LogOut,
Bell, Search, GraduationCap, ScrollText, ClipboardList, Database,
Menu, X, CalendarDays, Terminal
} from 'lucide-react';
import { useAuth } from '@/lib/auth-context';
import { getApiMode, setApiMode } from '@/services/api';
const NavItem = ({ icon: Icon, label, href, isActive }: any) => (
{isActive && (
// Fix: cast props to any to avoid framer-motion type errors
)}
{label}
);
export const Sidebar = () => {
const { user, logout } = useAuth();
const pathname = usePathname() || '';
const router = useRouter();
const [isMock, setIsMock] = useState(getApiMode());
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
const renderNavItems = () => {
if (user?.role === 'Student') {
return (
<>
>
)
}
return (
<>
>
)
};
const SidebarContent = () => (
);
return (
<>
{/* Desktop Sidebar */}
{/* Mobile Toggle */}
{/* Mobile Menu Overlay */}
{isMobileMenuOpen && (
<>
setIsMobileMenuOpen(false)}
/>
{/* Fix: cast props to any to avoid framer-motion type errors */}
>
)}
>
);
};