'use client' import React from 'react' import { REGULATIONS, DOC_TYPES, INDUSTRIES_LIST, INDUSTRIES, INDUSTRY_REGULATION_MAP, TYPE_COLORS, THEMATIC_GROUPS, KEY_INTERSECTIONS, RAG_DOCUMENTS, isInRag, } from '../rag-data' import type { UseRAGPageReturn } from '../_hooks/useRAGPage' import { FutureOutlookSection, RagCoverageSection, FutureRegulationsSection, LegalBasisSection, } from './MapTabSections' interface MapTabProps { hook: UseRAGPageReturn } export function MapTab({ hook }: MapTabProps) { const { expandedRegulation, setExpandedRegulation, expandedDocTypes, setExpandedDocTypes, expandedMatrixDoc, setExpandedMatrixDoc, setActiveTab, } = hook return (
{/* Industry Filter */} {/* Thematic Groups */} {/* Key Intersections */} {/* Regulation Matrix */} {/* Future Outlook Section */} {/* RAG Coverage Overview */} {/* Potential Future Regulations */} {/* Legal Basis Info */}
) } // --- Sub-components --- function IndustryFilter({ expandedRegulation, setExpandedRegulation, }: { expandedRegulation: string | null setExpandedRegulation: (v: string | null) => void }) { return (

Regulierungen nach Branche

Waehlen Sie Ihre Branche, um relevante Regulierungen zu sehen.

{INDUSTRIES.map((industry) => { const regs = INDUSTRY_REGULATION_MAP[industry.id] || [] return ( ) })}
{/* Selected Industry Details */} {expandedRegulation && INDUSTRIES.find(i => i.id === expandedRegulation) && (
{(() => { const industry = INDUSTRIES.find(i => i.id === expandedRegulation)! const regCodes = INDUSTRY_REGULATION_MAP[industry.id] || [] const regs = REGULATIONS.filter(r => regCodes.includes(r.code)) return ( <>
{industry.icon}

{industry.name}

{industry.description}

{regs.map((reg) => { const regInRag = isInRag(reg.code) return (
{reg.code} {regInRag ? ( RAG ) : ( )}
{reg.name}
{reg.description}
) })}
) })()}
)}
) } function ThematicGroupsSection({ setActiveTab, setExpandedRegulation, }: { setActiveTab: (v: any) => void setExpandedRegulation: (v: string | null) => void }) { return (

Thematische Cluster

Regulierungen gruppiert nach Themenbereichen - zeigt Ueberschneidungen.

{THEMATIC_GROUPS.map((group) => (
{group.name} {group.regulations.length} Regulierungen

{group.description}

{group.regulations.map((code) => { const reg = REGULATIONS.find(r => r.code === code) const codeInRag = isInRag(code) return ( { setActiveTab('regulations') setExpandedRegulation(code) }} title={`${reg?.fullName || code}${codeInRag ? ' (im RAG)' : ' (nicht im RAG)'}`} > {codeInRag ? '✓ ' : '✗ '}{code} ) })}
))}
) } function KeyIntersectionsSection() { return (

Wichtige Schnittstellen

Bereiche, in denen sich mehrere Regulierungen ueberschneiden und zusammenwirken.

{KEY_INTERSECTIONS.map((intersection, idx) => (
{intersection.regulations.map((code) => ( {isInRag(code) ? '✓ ' : '✗ '}{code} ))}
{intersection.topic}
{intersection.description}
))}
) } function RegulationMatrix({ expandedDocTypes, setExpandedDocTypes, expandedMatrixDoc, setExpandedMatrixDoc, }: { expandedDocTypes: string[] setExpandedDocTypes: (fn: (prev: string[]) => string[]) => void expandedMatrixDoc: string | null setExpandedMatrixDoc: (v: string | null) => void }) { return (

Branchen-Regulierungs-Matrix

{RAG_DOCUMENTS.length} Dokumente in {DOC_TYPES.length} Kategorien

{INDUSTRIES_LIST.filter((i: any) => i.id !== 'all').map((industry: any) => ( ))} {DOC_TYPES.map((docType: any) => { const docsInType = RAG_DOCUMENTS.filter((d: any) => d.doc_type === docType.id) if (docsInType.length === 0) return null const isExpanded = expandedDocTypes.includes(docType.id) return ( { setExpandedDocTypes(prev => prev.includes(docType.id) ? prev.filter((id: string) => id !== docType.id) : [...prev, docType.id] ) }} > {isExpanded && docsInType.map((doc: any) => ( setExpandedMatrixDoc(expandedMatrixDoc === doc.code ? null : doc.code)} > {INDUSTRIES_LIST.filter((i: any) => i.id !== 'all').map((industry: any) => { const applies = doc.industries.includes(industry.id) || doc.industries.includes('all') return ( ) })} {expandedMatrixDoc === doc.code && (doc.applicability_note || doc.description) && ( )} ))} ) })}
Regulierung
{industry.icon} {industry.name.split('/')[0]}
{isExpanded ? '\u25BC' : '\u25B6'} {docType.icon} {docType.label} ({docsInType.length})
{isInRag(doc.code) ? ( ) : ( )} {doc.name} {(doc.applicability_note || doc.description) && ( {expandedMatrixDoc === doc.code ? '▼' : 'ⓘ'} )} {applies ? ( ) : ( )}
{doc.full_name && (

{doc.full_name}

)} {doc.applicability_note && (

Branchenrelevanz: {doc.applicability_note}

)} {doc.description && (

{doc.description}

)} {doc.effective_date && (

In Kraft: {doc.effective_date}

)}
) } // FutureOutlookSection, RagCoverageSection, FutureRegulationsSection, // LegalBasisSection are imported from ./MapTabSections.tsx