"use client"; import { useRouter } from "next/navigation"; import { ArrowLeft } from "lucide-react"; interface MiniGameHeaderProps { title: string; icon: React.ComponentType<{ size?: number; className?: string }>; accentColor: string; stats: { label: string; value: string }[]; } /** * Header bar for individual mini-game screens. * Shows a back button, game title with icon, and a stat bar. */ const ACCENT_TEXT: Record = { cyan: "text-cyan", gold: "text-gold", magenta: "text-magenta", }; export function MiniGameHeader({ title, icon: Icon, accentColor, stats, }: MiniGameHeaderProps) { const router = useRouter(); const colorClass = ACCENT_TEXT[accentColor] ?? "text-white"; return (

{title}

{stats.length > 0 && (
{stats.map((stat) => (

{stat.label}

{stat.value}

))}
)}
); }