import type { Metadata } from 'next';

/**
 * Session 60 (night2/G, 6.3) — server metadata for the player dossier.
 * The page itself stays a client component; this layout carries the
 * per-player title/description, and opengraph-image.tsx (same segment)
 * renders the shareable intelligence card.
 */
export async function generateMetadata({ params }: { params: Promise<{ name: string }> }): Promise<Metadata> {
  const { name } = await params;
  const player = decodeURIComponent(name || '').slice(0, 60);
  const title = `${player} — Player Intelligence | VYNDR`;
  const description = `${player}: archetype DNA, active streaks, prop DNA, last-10 log, and VYNDR's settled record — every number with matchup context.`;
  return {
    title,
    description,
    openGraph: { title, description },
    twitter: { card: 'summary_large_image', title, description },
  };
}

export default function PlayerLayout({ children }: { children: React.ReactNode }) {
  return children;
}
