//
// Copyright 2025 DXOS.org
//
import React, { useMemo } from 'react';
import { SyntaxHighlighter, createElement } from '@dxos/react-ui-syntax-highlighter';
export const RawDataPanel = ({ classNames, span, objects }) => {
    const combinedData = useMemo(() => {
        return {
            span,
            traceEvents: objects ?? [],
        };
    }, [span, objects]);
    const rowRenderer = ({ rows, stylesheet, useInlineStyles, }) => {
        return rows.map((row, index) => {
            return createElement({
                node: row,
                stylesheet,
                style: {},
                useInlineStyles,
                key: index,
            });
        });
    };
    return (React.createElement(SyntaxHighlighter, { language: 'json', className: classNames, renderer: rowRenderer }, JSON.stringify(combinedData, null, 2)));
};
//# sourceMappingURL=RawDataPanel.js.map