import type { Metadata } from "next";
import Hero from "@/components/Hero";
import Footer from "@/components/Footer";
import Leaderboard from "@/components/Leaderboard";
import { parseLang, dict } from "@/lib/i18n";

export const metadata: Metadata = {
  title: "누적 랭킹 | TriplePick 2026",
  description: "TriplePick 누적 랭킹 — 참가자·AI 모델 TOP 10.",
};

export default async function LeaderboardPage({
  searchParams,
}: {
  searchParams: Promise<{ lang?: string }>;
}) {
  const { lang: langParam } = await searchParams;
  const lang = parseLang(langParam);
  const t = dict(lang);

  return (
    <main className="shell">
      <Hero back />
      <p className="mt-6 text-center text-[13px] leading-relaxed text-[var(--ink-muted)]">
        {t.goldDesc}
      </p>
      {/* 전체 페이지: 펼친 상태(폴딩 토글·전체보기 링크 숨김) */}
      <Leaderboard lang={lang} defaultOpen showAllLink={false} />
      <Footer />
    </main>
  );
}
