'use client' import React from 'react' import { motion } from 'framer-motion' import { Check } from 'lucide-react' interface ProgressStepperProps { step: number basketItemsCount: number } const STEP_LABELS = ['Kunde', 'Modell', 'Software', 'Abschluss'] export function ProgressStepper({ step, basketItemsCount }: ProgressStepperProps) { // Calculate progress percentage for active line (Step 1: 0%, Step 2: 33.3%, Step 3: 66.6%, Step 4: 100%) const progressPercent = ((step - 1) / 3) * 100 return (
{/* Static Background Line */}
{/* Animated Active Line (bg-sky-500) */} {[1, 2, 3, 4].map(s => { const isDone = step > s const isActive = step === s return (
{isDone ? : s} {STEP_LABELS[s - 1]} {s === 3 && basketItemsCount > 0 && ( {basketItemsCount} )}
) })}
) }