import { jsx as _jsx } from "react/jsx-runtime";
import { JSONCode } from './JSONCode.js';
import { JSONView } from './JSONView.js';
export function JSONDisplay({ value, viewCode = false }) {
    if (!value) {
        return (_jsx("pre", { className: "whitespace-pre-wrap", children: "No Data to display" }));
    }
    return (_jsx("div", { className: 'relative w-full', children: viewCode ? _jsx(JSONCode, { data: value }) : _jsx(JSONView, { value: value }) }));
}
//# sourceMappingURL=JSONDisplay.js.map