import { motion, AnimatePresence } from 'framer-motion'; import { useState } from 'react'; import { ChevronDown, ChevronUp, CheckCircle2, Lock, Play } from 'lucide-react'; import { courseDays } from '../data/courseData'; interface CourseTimelineProps { onBeginDay: (day: number) => void; onCompleteDay: (day: number) => void; completedDays: Set; } const typeColors: Record = { game:'from-amber-500/80 to-orange-400/80', survey:'from-blue-500/80 to-cyan-400/80', prompt:'from-purple-500/80 to-pink-400/80', learning:'from-emerald-500/80 to-teal-400/80', media:'from-rose-500/80 to-red-400/80', reflection:'from-indigo-500/80 to-violet-400/80', }; const typeLabels: Record = { game:'Game', survey:'Survey', prompt:'Writing', learning:'Learning', media:'Media', reflection:'Reflection' }; export default function CourseTimeline({ onBeginDay, onCompleteDay, completedDays }: CourseTimelineProps) { const [expandedDay, setExpandedDay] = useState(null); const [week, setWeek] = useState<1|2>(1); const days = courseDays.filter(d => week===1 ? d.day<=7 : d.day>7); const isLocked = (d: number) => d > 1 && !completedDays.has(d - 1); return (
{/* Header */}

Your 14-Day Journey

Two weeks of escalating exploration — each day unlocks when the previous one is complete

{/* Week toggle */}
{([1,2] as const).map(w => ( ))}
{/* Progress */}
{completedDays.size} of 14 completed {Math.round((completedDays.size/14)*100)}%
{/* Days */}
{days.map((day, i) => { const open = expandedDay===day.day; const done = completedDays.has(day.day); const locked = isLocked(day.day); return ( {open && (

{day.description}

{day.content.map((item,j) => ( ◆ {item} ))}
{day.tips && (

Tips

{day.tips.map((t,j)=>

💡 {t}

)}
)}
{!done && ( )}
)}
); })}
); }