"use client"; import { ChevronRight, Gamepad2, Trophy } from "lucide-react"; import Link from "next/link"; import { minigameIcon } from "@/components/frontend/minigames/minigameIcon"; import type { RegistryGame } from "@/lib/minigames/registry"; import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { SidebarMenuButton, SidebarMenuItem, useSidebar, } from "@/components/ui/sidebar"; /** * Minigames sidebar dropdown. The groups and entries come from the minigames * registry (resolved on the server and passed in), so retiring a game or * reordering the list is an admin-data change, not a code change. */ export function NavMinigames({ games }: { games: RegistryGame[] }) { const { isMobile } = useSidebar(); const visible = games.filter((game) => game.status !== "retired"); const coreGames = visible.filter((game) => game.category === "core"); const cardtableGames = visible.filter((game) => game.category === "cardtable"); return ( Minigames Core {coreGames.map((game) => { const Icon = minigameIcon(game.icon); return ( {game.label} ); })} Cardtable Earn chips to spend by playing Core minigames! {cardtableGames.map((game) => { const Icon = minigameIcon(game.icon); return ( {game.label} ); })} Leaderboards ); }