import { Button } from "@/components/ui/button"; import { motion } from "framer-motion"; import { useState } from "react"; import { HighScoreBoard } from "../HighScoreBoard"; import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { LanguageSelector } from "./LanguageSelector"; import { useTranslation } from "@/hooks/useTranslation"; import { useContext } from "react"; import { LanguageContext } from "@/contexts/LanguageContext"; interface WelcomeScreenProps { onStart: () => void; } export const WelcomeScreen = ({ onStart }: WelcomeScreenProps) => { const [showHighScores, setShowHighScores] = useState(false); const [showHowToPlay, setShowHowToPlay] = useState(false); const t = useTranslation(); const { language } = useContext(LanguageContext); return ( <>

{t.welcome.title}

{t.welcome.subtitle}

setShowHighScores(false)} onPlayAgain={onStart} /> {t.welcome.howToPlay}

{t.howToPlay.setup.title}

{t.howToPlay.setup.description}

{t.howToPlay.goal.title}

{t.howToPlay.goal.description}

{t.howToPlay.rules.title}

    {t.howToPlay.rules.items.map((rule, index) => (
  • {rule}
  • ))}
); };