'use client';
import { useSidebar } from '@/components/layout/SidebarContext';
import { routes } from '@/lib/routing/RouteConfig';
import { Box } from '@/ui/Box';
import { BrandMark } from '@/ui/BrandMark';
import { Button } from '@/ui/Button';
import { NavLink } from '@/ui/NavLink';
import { ShellSidebar } from '@/ui/shell/Shell';
import { Stack } from '@/ui/Stack';
import { Text } from '@/ui/Text';
import {
Calendar,
ChevronLeft,
ChevronRight,
Flag,
Home,
LayoutGrid,
Trophy,
Users
} from 'lucide-react';
import { usePathname } from 'next/navigation';
export function AppSidebar() {
const pathname = usePathname();
const { isCollapsed, toggleCollapse } = useSidebar();
const mainItems = [
{ label: 'Home', href: routes.public.home, icon: Home },
{ label: 'Leagues', href: routes.public.leagues, icon: Trophy },
{ label: 'Drivers', href: routes.public.drivers, icon: Users },
{ label: 'Teams', href: routes.public.teams, icon: Flag },
];
const competitionItems = [
{ label: 'Races', href: routes.public.races, icon: Calendar },
{ label: 'Leaderboards', href: routes.public.leaderboards, icon: LayoutGrid },
];
return (
}
footer={
: }
onClick={toggleCollapse}
variant="ghost"
fullWidth
>
{!isCollapsed && "Collapse"}
}
>
{!isCollapsed && (
Platform
)}
{mainItems.map((item) => (
))}
{!isCollapsed && (
Competition
)}
{competitionItems.map((item) => (
))}
{!isCollapsed && (
Community
)}
);
}