import React from 'react'; interface KeyValueItem { label: string; value: string; unit?: string; } interface VoltageTable { voltageLabel: string; metaItems: KeyValueItem[]; columns: Array<{ key: string; label: string }>; rows: Array<{ configuration: string; cells: string[] }>; } interface ProductTechnicalDataProps { data: { technicalItems: KeyValueItem[]; voltageTables: VoltageTable[]; }; } export default function ProductTechnicalData({ data }: ProductTechnicalDataProps) { if (!data) return null; const { technicalItems = [], voltageTables = [] } = data; return (
{technicalItems.length > 0 && (

General Data

{technicalItems.map((item, idx) => (
{item.label}
{item.value} {item.unit && {item.unit}}
))}
)} {voltageTables.map((table, idx) => (

{table.voltageLabel !== 'Voltage unknown' && table.voltageLabel !== 'Spannung unbekannt' ? table.voltageLabel : 'Technical Specifications'}

{table.metaItems.length > 0 && (
{table.metaItems.map((item, mIdx) => (
{item.label}
{item.value} {item.unit}
))}
)}
{table.columns.map((col, cIdx) => ( ))} {table.rows.map((row, rIdx) => ( {row.cells.map((cell, cellIdx) => ( ))} ))}
Configuration {col.label}
{row.configuration} {cell}
))}
); }