import { motion } from "framer-motion"; import { useState, useEffect } from "react"; import { HighScoreBoard } from "../HighScoreBoard"; import { Dialog, DialogContent } from "@/components/ui/dialog"; import { LanguageSelector } from "./LanguageSelector"; import { useTranslation } from "@/hooks/useTranslation"; import { ContestSection } from "./welcome/ContestSection"; import { HuggingFaceLink } from "./welcome/HuggingFaceLink"; import { MainActions } from "./welcome/MainActions"; import { HowToPlayDialog } from "./welcome/HowToPlayDialog"; import { CreditsDialog } from "./welcome/CreditsDialog"; import { Mail } from "lucide-react"; import { StatsDialog } from "./welcome/StatsDialog"; interface WelcomeScreenProps { onStartDaily: () => void; onStartNew: () => void; } export const WelcomeScreen = ({ onStartDaily, onStartNew }: WelcomeScreenProps) => { const [showHighScores, setShowHighScores] = useState(false); const [showHowToPlay, setShowHowToPlay] = useState(false); const [showCredits, setShowCredits] = useState(false); const [showStats, setShowStats] = useState(false); const t = useTranslation(); useEffect(() => { const handleKeyPress = (event: KeyboardEvent) => { if (event.key === 'Enter') { onStartDaily(); } }; window.addEventListener('keydown', handleKeyPress); return () => window.removeEventListener('keydown', handleKeyPress); }, [onStartDaily]); return ( <>

{t.welcome.title}

{t.welcome.subtitle}

setShowHowToPlay(true)} onShowHighScores={() => setShowHighScores(true)} />
Feedback
setShowHighScores(false)} /> ); };