'use client' import { css } from '@styled/css' import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels' import { useKnowYourWorld } from '../Provider' import { getFilteredMapDataSync } from '../maps' import { MapRenderer } from './MapRenderer' import { GameInfoPanel } from './GameInfoPanel' export function PlayingPhase() { const { state, clickRegion } = useKnowYourWorld() const mapData = getFilteredMapDataSync( state.selectedMap, state.selectedContinent, state.difficulty ) const totalRegions = mapData.regions.length const foundCount = state.regionsFound.length const progress = (foundCount / totalRegions) * 100 // Get the display name for the current prompt const currentRegionName = state.currentPrompt ? (mapData.regions.find((r) => r.id === state.currentPrompt)?.name ?? null) : null // Debug logging console.log('[PlayingPhase] Current prompt lookup:', { currentPrompt: state.currentPrompt, currentRegionName, difficulty: state.difficulty, totalFilteredRegions: mapData.regions.length, filteredRegionIds: mapData.regions.map((r) => r.id).slice(0, 10), regionsToFindCount: state.regionsToFind.length, regionsToFindSample: state.regionsToFind.slice(0, 5), }) return (
{/* Top Panel: Game Info */} {/* Resize Handle */} {/* Bottom Panel: Map */}
) }