'use client'; import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared'; import { FlashCard } from '../components/FlashCard'; export function Steps({ track, progress, onStepComplete }: LearningViewProps) { const currentStepIndex = track.steps.findIndex( (s) => !progress.completedStepIds.includes(s.id) ); return (
{/* Header */}

Complete Your Challenges

Tap each card to reveal the action, then mark as complete

{/* Card Stack */}
{track.steps.map((step, index) => { const isCompleted = progress.completedStepIds.includes(step.id); const isCurrent = index === currentStepIndex; return ( onStepComplete?.(step.id)} /> ); })}
{/* Progress Summary */}
{progress.completedStepIds.length} of {track.steps.length} completed {track.completionRewards?.xp && ( (+{track.completionRewards.xp} XP bonus on completion) )}
); }