import { CheckCircle, CreditCard, Globe, Server, User } from 'lucide-react'; import type { ReactNode } from 'react'; interface FlowStepProps { step: number; actor: string; description: string; children?: ReactNode; icon?: 'visitor' | 'website' | 'backend' | 'payment' | 'success'; isLast?: boolean; } const iconMap = { visitor: User, website: Globe, backend: Server, payment: CreditCard, success: CheckCircle, }; const iconColorMap = { visitor: 'text-blue-500', website: 'text-green-500', backend: 'text-purple-500', payment: 'text-yellow-500', success: 'text-green-600', }; const iconBorderColorMap = { visitor: 'border-blue-500', website: 'border-green-500', backend: 'border-purple-500', payment: 'border-yellow-500', success: 'border-green-600', }; export function FlowStep({ step, actor, description, children, icon = 'visitor', isLast = false, }: FlowStepProps) { const Icon = iconMap[icon]; return (
{/* Step number and icon */}
{step}
{/* Connector line - extends from badge through content to next step */} {!isLast && (
)}
{/* Content */}
{actor}:{' '} {description}
{children &&
{children}
}
); }