'use client' import React from 'react' import { DSRStatus, DSR_STATUS_INFO } from '@/lib/sdk/dsr/types' interface WorkflowStep { id: DSRStatus label: string description?: string } const WORKFLOW_STEPS: WorkflowStep[] = [ { id: 'intake', label: 'Eingang', description: 'Anfrage dokumentiert' }, { id: 'identity_verification', label: 'ID-Pruefung', description: 'Identitaet verifizieren' }, { id: 'processing', label: 'Bearbeitung', description: 'Anfrage bearbeiten' }, { id: 'completed', label: 'Abschluss', description: 'Antwort versenden' } ] interface DSRWorkflowStepperProps { currentStatus: DSRStatus onStepClick?: (status: DSRStatus) => void className?: string } export function DSRWorkflowStepper({ currentStatus, onStepClick, className = '' }: DSRWorkflowStepperProps) { const currentIndex = WORKFLOW_STEPS.findIndex(s => s.id === currentStatus) const isRejectedOrCancelled = currentStatus === 'rejected' || currentStatus === 'cancelled' const getStepState = (index: number): 'completed' | 'current' | 'upcoming' => { if (isRejectedOrCancelled) { return index <= currentIndex ? 'completed' : 'upcoming' } if (index < currentIndex) return 'completed' if (index === currentIndex) return 'current' return 'upcoming' } return (