'use client' import { RiskScoreGauge } from './RiskScoreGauge' interface AssessmentResult { feasibility: string risk_level: string risk_score: number complexity: string dsfa_recommended: boolean art22_risk: boolean training_allowed: string summary: string recommendation: string alternative_approach?: string triggered_rules?: Array<{ rule_code: string title: string severity: string gdpr_ref: string }> required_controls?: Array<{ id: string title: string description: string effort: string }> recommended_architecture?: Array<{ id: string title: string description: string benefit: string }> } interface AssessmentResultCardProps { result: AssessmentResult } const FEASIBILITY_STYLES: Record = { YES: { bg: 'bg-green-100', text: 'text-green-700', label: 'Machbar' }, CONDITIONAL: { bg: 'bg-yellow-100', text: 'text-yellow-700', label: 'Bedingt machbar' }, NO: { bg: 'bg-red-100', text: 'text-red-700', label: 'Nicht empfohlen' }, } const SEVERITY_STYLES: Record = { INFO: 'bg-blue-100 text-blue-700', WARN: 'bg-yellow-100 text-yellow-700', BLOCK: 'bg-red-100 text-red-700', } export function AssessmentResultCard({ result }: AssessmentResultCardProps) { const feasibility = FEASIBILITY_STYLES[result.feasibility] || FEASIBILITY_STYLES.YES return (
{/* Header with Score and Feasibility */}
{feasibility.label} Komplexitaet: {result.complexity} {result.dsfa_recommended && ( DSFA empfohlen )} {result.art22_risk && ( Art. 22 Risiko )}

{result.summary}

{result.recommendation}

{result.alternative_approach && (
Alternative: {result.alternative_approach}
)}
{/* Triggered Rules */} {result.triggered_rules && result.triggered_rules.length > 0 && (

Ausgeloeste Regeln ({result.triggered_rules.length})

{result.triggered_rules.map((rule) => (
{rule.severity} {rule.rule_code} {rule.title} {rule.gdpr_ref}
))}
)} {/* Required Controls */} {result.required_controls && result.required_controls.length > 0 && (

Erforderliche Kontrollen ({result.required_controls.length})

{result.required_controls.map((control) => (
{control.title} {control.effort}

{control.description}

))}
)} {/* Recommended Architecture Patterns */} {result.recommended_architecture && result.recommended_architecture.length > 0 && (

Empfohlene Architektur-Patterns

{result.recommended_architecture.map((pattern) => (

{pattern.title}

{pattern.description}

Vorteil: {pattern.benefit}

))}
)}
) }