'use client'
import React from 'react'
import { motion } from 'framer-motion'
import { Check } from 'lucide-react'
interface ProgressStepperProps {
step: number
basketItemsCount: number
orientation?: 'horizontal' | 'vertical'
}
const STEP_LABELS = ['Kunde', 'Modell', 'Software', 'Abschluss']
export function ProgressStepper({ step, basketItemsCount, orientation = 'horizontal' }: ProgressStepperProps) {
const progressPercent = ((step - 1) / 3) * 100
if (orientation === 'vertical') {
return (
{/* Background Line */}
{/* Animated Active Line */}
{[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}
)}
)
})}
)
}
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}
)}
)
})}
)
}