'use client' import { Scale } from 'lucide-react' import type { CanonicalControl } from './helpers' interface V1Match { matched_control_id: string matched_title: string matched_objective: string matched_severity: string matched_category: string matched_source: string | null matched_article: string | null matched_source_citation: Record | null similarity_score: number match_rank: number match_method: string } interface ControlRegulatorySectionProps { ctrl: CanonicalControl v1Matches: V1Match[] loadingV1: boolean onNavigateToControl?: (controlId: string) => void onCompare?: (ctrl: CanonicalControl, matches: V1Match[]) => void } export function ControlRegulatorySection({ ctrl, v1Matches, loadingV1, onNavigateToControl, onCompare, }: ControlRegulatorySectionProps) { return (

Regulatorische Abdeckung

{loadingV1 && Laden...}
{v1Matches.length > 0 ? (
{v1Matches.map((match, i) => (
{match.matched_source && ( {match.matched_source} )} {match.matched_article && ( {match.matched_article} )} = 0.85 ? 'bg-green-100 text-green-700' : match.similarity_score >= 0.80 ? 'bg-yellow-100 text-yellow-700' : 'bg-gray-100 text-gray-600' }`}> {(match.similarity_score * 100).toFixed(0)}%

{onNavigateToControl ? ( ) : ( {match.matched_control_id} )} {match.matched_title}

{onCompare && ( )}
))}
) : !loadingV1 ? (

Keine regulatorische Abdeckung gefunden. Dieses Control ist eine reine Eigenentwicklung.

) : null}
) }