import { motion } from "framer-motion"; import { MessageCircle } from "lucide-react"; import { useEffect, useState } from "react"; /** * MascotImage — Anime mascot PNG from GitHub CDN * Replaces ChibiMascot SVG component with external PNG asset * Now includes optional floating chat bubble with AI insights */ interface MascotImageProps { size?: "sm" | "md" | "lg"; className?: string; showChat?: boolean; chatMessage?: string; persistChat?: boolean; } const sizeMap = { sm: "w-16 h-auto", md: "w-32 h-auto", lg: "w-48 h-auto", }; const chatSizeMap = { sm: "max-w-xs", md: "max-w-sm", lg: "max-w-md", }; export function MascotImage({ size = "md", className = "", showChat = false, chatMessage = "", persistChat = false, }: MascotImageProps) { const sizeClass = sizeMap[size]; const chatSizeClass = chatSizeMap[size]; const [isVisible, setIsVisible] = useState(false); useEffect(() => { if (showChat && chatMessage) { setIsVisible(true); if (persistChat) return; const timer = setTimeout(() => setIsVisible(false), 8000); // Auto hide after 8s return () => clearTimeout(timer); } setIsVisible(false); }, [showChat, chatMessage, persistChat]); return (
{chatMessage}
No data to display