'use client'; import { useState } from 'react'; import confetti from 'canvas-confetti'; import styles from './ResultCard.module.css'; import TypeBadge from './TypeBadge'; import ConfidenceBar from './ConfidenceBar'; import StatsRadar from './StatsRadar'; import TopPredictions from './TopPredictions'; import FeedbackWidget from './FeedbackWidget'; export default function ResultCard({ predictionData, pokemonDetails, originalImage, onReset, onShinyActivated, onDislikeActivated }) { const [showShiny, setShowShiny] = useState(false); if (!predictionData) return null; const { pokemon_id, name, confidence, top_5 } = predictionData; const types = pokemonDetails?.types || []; const stats = pokemonDetails?.stats || {}; const spriteUrl = showShiny ? `https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/shiny/${pokemon_id}.png` : pokemonDetails?.sprite_url; return (