'use client' import React from 'react' import Link from 'next/link' import { useSDK, getStepsForPhase } from '@/lib/sdk' // ============================================================================= // DASHBOARD CARDS // ============================================================================= function StatCard({ title, value, subtitle, icon, color, }: { title: string value: string | number subtitle: string icon: React.ReactNode color: string }) { return (

{title}

{value}

{subtitle}

{icon}
) } function PhaseCard({ phase, title, description, completion, steps, href, }: { phase: number title: string description: string completion: number steps: number href: string }) { return (
{completion === 100 ? ( ) : ( phase )}

{title}

{description}

{steps} Schritte {completion}%
) } function QuickActionCard({ title, description, icon, href, color, }: { title: string description: string icon: React.ReactNode href: string color: string }) { return (
{icon}

{title}

{description}

) } // ============================================================================= // MAIN DASHBOARD // ============================================================================= export default function SDKDashboard() { const { state, phase1Completion, phase2Completion, completionPercentage } = useSDK() const phase1Steps = getStepsForPhase(1) const phase2Steps = getStepsForPhase(2) // Calculate stats const completedCheckpoints = Object.values(state.checkpoints).filter(cp => cp.passed).length const totalRisks = state.risks.length const criticalRisks = state.risks.filter(r => r.severity === 'CRITICAL' || r.severity === 'HIGH').length return (
{/* Header */}

AI Compliance SDK

Willkommen zum Compliance Assessment. Starten Sie mit Phase 1 oder setzen Sie Ihre Arbeit fort.

{/* Stats Grid */}
} color="bg-purple-50" /> } color="bg-blue-50" /> } color="bg-green-50" /> 0 ? `${criticalRisks} kritisch` : 'Keine kritischen'} icon={ } color="bg-orange-50" />
{/* Phases */}

Phasen

{/* Quick Actions */}

Schnellaktionen

} href="/sdk/advisory-board" color="bg-purple-50" /> } href="/sdk/screening" color="bg-red-50" /> } href="/sdk/dsfa" color="bg-blue-50" /> } href="/sdk/rag" color="bg-green-50" />
{/* Recent Activity */} {state.commandBarHistory.length > 0 && (

Letzte Aktivitäten

{state.commandBarHistory.slice(0, 5).map(entry => (
{entry.success ? ( ) : ( )}

{entry.query}

{new Date(entry.timestamp).toLocaleString('de-DE')}

{entry.type}
))}
)}
) }