'use client' import { Check } from 'lucide-react' import { Phase } from '@/lib/companion/types' import { PHASE_COLORS, formatMinutes } from '@/lib/companion/constants' interface PhaseTimelineProps { phases: Phase[] currentPhaseIndex: number onPhaseClick?: (index: number) => void compact?: boolean } export function PhaseTimeline({ phases, currentPhaseIndex, onPhaseClick, compact = false, }: PhaseTimelineProps) { return (
{phases.map((phase, index) => { const isActive = index === currentPhaseIndex const isCompleted = phase.status === 'completed' const isPast = index < currentPhaseIndex const colors = PHASE_COLORS[phase.id] return (
{/* Phase Dot/Circle */} {/* Connector Line */} {index < phases.length - 1 && (
)}
) })}
) } /** * Detailed Phase Timeline with labels and durations */ export function PhaseTimelineDetailed({ phases, currentPhaseIndex, onPhaseClick, }: PhaseTimelineProps) { return (

Unterrichtsphasen

{phases.map((phase, index) => { const isActive = index === currentPhaseIndex const isCompleted = phase.status === 'completed' const isPast = index < currentPhaseIndex const colors = PHASE_COLORS[phase.id] return (
{/* Top connector line */}
{index > 0 && (
)} {index === 0 &&
} {/* Phase Circle */} {index < phases.length - 1 && (
)} {index === phases.length - 1 &&
}
{/* Phase Label */} {phase.displayName} {/* Duration */} {formatMinutes(phase.duration)} {/* Actual time if completed */} {phase.actualTime !== undefined && phase.actualTime > 0 && ( (tatsaechlich: {Math.round(phase.actualTime / 60)} Min) )}
) })}
) }