function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
import React from "react";
var DEFAULT_STYLE = {
    background: 'rgb(242, 241, 241)',
    padding: '1em',
    borderRadius: '0.5em',
    margin: '0.75em 0',
    fontSize: '0.8em',
    whiteSpace: 'pre-wrap',
    wordBreak: 'break-all'
};
/**
 * Agentic UI 内嵌 JSON 代码块解析失败时的统一兜底展示。
 * 替代 task / toolusebar / filemap 三处重复 <pre> 实现。
 */ var RendererJsonFallbackComponent = function RendererJsonFallbackComponent(param) {
    var testId = param.testId, code = param.code, style = param.style;
    return /*#__PURE__*/ React.createElement("pre", {
        "data-testid": testId,
        style: _object_spread({}, DEFAULT_STYLE, style)
    }, /*#__PURE__*/ React.createElement("code", null, code));
};
RendererJsonFallbackComponent.displayName = 'RendererJsonFallback';
export var RendererJsonFallback = /*#__PURE__*/ React.memo(RendererJsonFallbackComponent);
