"use client";

import { Header } from "./Header";

/**
 * Top-level page layout wrapper.
 * Renders an optional fixed Header and provides correct top padding
 * so content is not hidden beneath it.
 */
interface GameLayoutProps {
  children: React.ReactNode;
  playerName?: string;
  showHeader?: boolean;
}

export function GameLayout({ children, playerName, showHeader = true }: GameLayoutProps) {
  return (
    <>
      {showHeader && <Header playerName={playerName} showNav={true} />}
      <main className={showHeader ? "pt-16 min-h-screen" : "min-h-screen"}>
        {children}
      </main>
    </>
  );
}
