"use client" import { motion } 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 EjercicioSensibilizacion({ exercise, onComplete }: Props) { const { content } = exercise const hasOptions = content.options && content.options.length > 0 const handleClick = async (option: { label: string; correct: boolean }) => { if (content.audioText) await speak(content.audioText) onComplete(option.correct) } return (
{content.emoji && {content.emoji}} {hasOptions && (
{content.options!.map((opt, i) => ( handleClick(opt)} className="touch-target-lg rounded-2xl px-8 py-6 text-xl font-display font-bold shadow-md active:scale-95 transition-transform bg-white" > {opt.label} ))}
)} {!hasOptions && ( )}
) }