'use client' import { useEffect, useState } from 'react' import { fetchCriterionTree, type QuaidalControl, type QuaidalCriterionTree } from '../_hooks/useQuaidalData' interface Props { sectionId: string onClose: () => void } function ControlBlock({ ctrl, badgeColor }: { ctrl: QuaidalControl; badgeColor: string }) { return (

{ctrl.canonical_name}

{ctrl.source.section}

{ctrl.description}

{ctrl.source.url && ( BSI-Quelle ansehen ({ctrl.source.framework}) )}
) } export function QuaidalCriterionDetail({ sectionId, onClose }: Props) { const [tree, setTree] = useState(null) const [loading, setLoading] = useState(true) useEffect(() => { let active = true setLoading(true) fetchCriterionTree(sectionId).then(t => { if (active) { setTree(t) setLoading(false) } }) return () => { active = false } }, [sectionId]) return (
QUAIDAL Kriterium

{tree?.criterion.canonical_name || sectionId}

{loading &&
Lade...
} {tree && ( <>

Anforderung (eigene Formulierung)

{tree.criterion.description}

Regulierung: {tree.criterion.regulation_anchor || '—'} Quelle: {tree.criterion.source.framework} {tree.criterion.source.section} {tree.criterion.source.url && ( Originalquelle )}
{tree.criterion.external_refs.length > 0 && (

Externe Referenzen (nicht ingestiert, nur Verweis)

{tree.criterion.external_refs.map((ref, i) => ( {ref.framework}{ref.citation ? ` — ${ref.citation}` : ''} ))}
)} {tree.building_blocks.length > 0 && (

Bausteine ({tree.building_blocks.length})

{tree.building_blocks.map(qb => ( ))}
)} {tree.measures.length > 0 && (

Maßnahmen ({tree.measures.length})

{tree.measures.map(m => ( ))}
)} {tree.metrics.length > 0 && (

Metriken & Methoden ({tree.metrics.length})

{tree.metrics.map(qm => ( ))}
)} )}
Eigene Clean-Room-Ableitung von BSI QUAIDAL. Quellverweis und Lizenz-Note pro Eintrag.
) }