import { useState } from 'react'; import { motion } from 'framer-motion'; import { Card } from '../game/Card'; import { emitBurnCard } from '../../socket/socket'; import type { CardInstance } from '@shared/types'; import { useGameStore } from '../../store/gameStore'; interface ViewHandModalProps { cards: CardInstance[]; targetId?: string; onClose: () => void; } export function ViewHandModal({ cards, targetId, onClose }: ViewHandModalProps) { const [selectedCard, setSelectedCard] = useState(null); const gameState = useGameStore((state) => state.gameState); const targetName = gameState?.players.find(p => p.id === targetId)?.name ?? 'Opponent'; const handleBurn = () => { if (selectedCard) { emitBurnCard(selectedCard); onClose(); } }; return ( e.stopPropagation()} >

👁️ {targetName}'s Hand

Select one card to BURN (discard)

🔥 The chosen card will be destroyed!

{cards.map((card, index) => ( setSelectedCard(card.instanceId)} > ))}
); }