"use client" import { useState } from "react" import { motion, AnimatePresence } from "framer-motion" import { speak } from "@/lib/speech" import { GatoMascota } from "@/components/child/gato-mascota" import type { Exercise } from "@/curriculum/types" interface Props { exercise: Exercise onComplete: (correct: boolean) => void } export default function EjercicioPalabra({ exercise, onComplete }: Props) { const { content } = exercise const options = content.options || [] const handleChoose = async (opt: (typeof options)[0]) => { if (opt.id === "escuchar") { if (content.audioText) await speak(content.audioText) return } onComplete(opt.correct) } return (