"use client"; import Link from "next/link"; import { ClueList } from "@/components/clue-list"; import { CrosswordPlayer } from "@/components/crossword-player"; import { useCrosswordData } from "@/components/use-crossword-data"; import type { Locale } from "@/lib/i18n"; type CrosswordRuntimePageProps = { id: string; locale: Locale; labels: { player: { topic: string; difficulty: string; lexicon: string; }; clues: { across: string; down: string; }; play: { overviewTitle: string; boardTitle: string; cluesTitle: string; instructions: string; actions: { newCrossword: string; viewSolution: string; }; stats: { words: string; intersections: string; filledCells: string; topicWords: string; }; }; loading: string; errorPrefix: string; }; }; export function CrosswordRuntimePage({ id, locale, labels }: CrosswordRuntimePageProps) { const { crossword, errorMessage, isLoading } = useCrosswordData(id, locale); if (errorMessage) { return

{labels.errorPrefix}: {errorMessage}

; } if (isLoading || !crossword) { return

{labels.loading}

; } return (
{crossword.summary.title}

{labels.play.overviewTitle}

{labels.play.instructions}

{labels.play.actions.newCrossword} {labels.play.actions.viewSolution}
{labels.play.stats.words} {crossword.summary.total_words}
{labels.play.stats.intersections} {crossword.summary.intersections}
{labels.play.stats.filledCells} {crossword.diagnostics.filled_cells}
{labels.play.stats.topicWords} {crossword.diagnostics.topic_words}

{labels.play.boardTitle}

{crossword.summary.subtitle}

{labels.play.cluesTitle}

{crossword.summary.title}

); }