'use client' import { SDK_FLOW_STEPS, FLOW_PACKAGES, findProducerStep, type SDKFlowStep } from '../flow-data' import { completionColor, completionLabel } from './helpers' export function DetailPanel({ step, onClose, }: { step: SDKFlowStep onClose: () => void }) { const pkg = FLOW_PACKAGES[step.package] const baseUrl = 'https://macmini:3007' return (

{step.name}

{pkg.icon} {pkg.name} seq {step.seq} {step.isOptional && ( Optional )}
{/* Fertigstellungsgrad */} {step.completion !== undefined && (
Fertigstellungsgrad {step.completion}%
{completionLabel(step.completion)}
)} {/* Beschreibung */}

{step.description}

{step.descriptionLong}

{step.legalBasis && (
Rechtsgrundlage: {step.legalBasis}
)}
{/* Inputs */} {step.inputs.length > 0 && (

Inputs (SDKState)

{step.inputs.map(input => { const producer = findProducerStep(input) return (
{input} {producer && ( ← {producer.nameShort} )}
) })}
)} {/* Outputs */} {step.outputs.length > 0 && (

Outputs (SDKState)

{step.outputs.map(output => (
{output}
))}
)} {/* DB Tables */} {step.dbTables.length > 0 && (

DB-Tabellen

{step.dbTables.map(table => (
{table} {step.dbMode}
))}
)} {/* RAG Collections */} {step.ragCollections.length > 0 && (

RAG-Collections

{step.ragCollections.map(rag => (
{rag}
))} {step.ragPurpose && (

{step.ragPurpose}

)}
)} {/* Checkpoint */} {step.checkpointId && (

Checkpoint

{step.checkpointId} {step.checkpointType}
{step.checkpointReviewer && step.checkpointReviewer !== 'NONE' && (
Reviewer: {step.checkpointReviewer}
)}
)} {/* Generated Docs */} {step.generates && step.generates.length > 0 && (

Generierte Dokumente

{step.generates.map(doc => (
{doc}
))}
)} {/* Prerequisites */} {step.prerequisiteSteps.length > 0 && (

Voraussetzungen

{step.prerequisiteSteps.map(preId => { const preStep = SDK_FLOW_STEPS.find(s => s.id === preId) return (
{preStep?.name || preId}
) })}
)} {/* Open in SDK */}
) }