'use client' import { useState, Fragment } from 'react' import { motion, AnimatePresence } from 'framer-motion' import { Language } from '@/lib/types' import { t } from '@/lib/i18n' import GradientText from '../ui/GradientText' import FadeInView from '../ui/FadeInView' import { X, Users, Lock, Server, BadgeCheck } from 'lucide-react' import { type NodeId, type NodeDef, getNodes, LAYERS } from './ArchitectureSlide.data' import { CSS_KF, MONO, useIsLight, LayerConnector, LayerSlab } from './ArchitectureSlide.parts' interface ArchitectureSlideProps { lang: Language } // ── Main slide ──────────────────────────────────────────────────────────────── export default function ArchitectureSlide({ lang }: ArchitectureSlideProps) { const i = t(lang) const de = lang === 'de' const isLight = useIsLight() const allNodes = getNodes(de) const nodeMap = Object.fromEntries(allNodes.map(n => [n.id, n])) as Record const [activeId, setActiveId] = useState(null) function toggle(id: NodeId) { setActiveId(prev => prev === id ? null : id) } const active = activeId ? nodeMap[activeId] : null const tenants = de ? ['Mandant A', 'Mandant B', 'Mandant C', 'Mandant N…'] : ['Namespace A', 'Namespace B', 'Namespace C', 'Namespace N…'] const layerLabels = de ? ['01 · Anwendung', '02 · Gateway', '03 · Infrastruktur'] : ['01 · Application', '02 · Gateway', '03 · Infrastructure'] const layerSublabels = de ? ['Benutzeroberflächen', 'Routing & Guardrails', 'Compute & Daten'] : ['User-facing services', 'Routing & guardrails', 'Compute & data'] return (

{de ? 'Anhang' : 'Appendix'}

{i.annex.architecture.title}

{de ? 'Klicke auf eine Station für Details' : 'Click any node to explore'}

{de ? 'Kundenmandanten' : 'Customer Namespaces'} {tenants.map(tn => ( {tn} ))}
{/* ── Main canvas ── */}
{/* Ambient glows */} {!isLight && ( <>
)} {/* Slabs + connectors */}
{LAYERS.map((layer, li) => { const nodes = layer.nodeIds.map(id => nodeMap[id]) return ( {li < LAYERS.length - 1 && } ) })}
{/* Footer badges */}
{([ { Icon: Lock, label: de ? 'Kein US-Anbieter · 100% DSGVO' : 'No US providers · 100% GDPR' }, { Icon: Server, label: de ? 'BSI-zertifiziertes Rechenzentrum' : 'BSI-certified data center' }, { Icon: BadgeCheck, label: de ? 'EU-souveräne Inferenz' : 'EU-sovereign inference' }, ] as { Icon: React.ElementType; label: string }[]).map(({ Icon, label }) => (
{label}
))}
{/* Detail panel */} {active && (
{active.title} {active.tier === 'product' ? (de ? 'Anwendung' : 'Application') : active.tier === 'proxy' ? 'Gateway' : (de ? 'Inferenz' : 'Inference')}
{active.subtitle}
{de ? 'Stack' : 'Tech Stack'}
{active.tech.map(tk => ( {tk} ))}
{de ? 'Funktionen' : 'Capabilities'}
{active.services.map(s => (
{s.name} {s.desc}
))}
)}
) }