'use client' import { useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' import { Lightbulb, ChevronDown, ChevronUp, CheckCircle, XCircle, Clock, Circle } from 'lucide-react' import { type Question } from '@/lib/questions' import { getProblemStatus } from '@/lib/progress' import ReactMarkdown from 'react-markdown' interface QuestionDisplayProps { question: Question } export default function QuestionDisplay({ question }: QuestionDisplayProps) { const [showHints, setShowHints] = useState(false) const [hintIndex, setHintIndex] = useState(0) const problemStatus = getProblemStatus(question.id) const difficultyColors = { Easy: 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400', Medium: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400', Hard: 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400', } const statusConfig = { solved: { icon: CheckCircle, color: 'text-green-600 dark:text-green-400', bg: 'bg-green-50 dark:bg-green-900/20', border: 'border-green-200 dark:border-green-800', label: 'Solved', }, attempted: { icon: Clock, color: 'text-yellow-600 dark:text-yellow-400', bg: 'bg-yellow-50 dark:bg-yellow-900/20', border: 'border-yellow-200 dark:border-yellow-800', label: 'Attempted', }, not_started: { icon: Circle, color: 'text-gray-400 dark:text-gray-500', bg: 'bg-gray-50 dark:bg-gray-800', border: 'border-gray-200 dark:border-gray-700', label: 'Not Started', }, } const status = statusConfig[problemStatus] const StatusIcon = status.icon return (
{example.input}
{example.output}
{hint}