import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { AlertCircle } from 'lucide-react';
/**
 * Shared error display component for tool results with ok: false
 * Matches the structure and colors of ErrorRenderer
 */
export function ToolErrorDisplay({ error, stack, showStack = false, }) {
    return (_jsx("div", { className: "mt-2 ml-5 p-3 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded text-sm", children: _jsxs("div", { className: "flex items-start gap-2", children: [_jsx(AlertCircle, { className: "h-4 w-4 flex-shrink-0 text-red-600 dark:text-red-400 mt-0.5" }), _jsxs("div", { className: "flex-1 space-y-2", children: [_jsxs("div", { children: [_jsx("div", { className: "font-medium text-red-600 dark:text-red-400", children: "Tool Error:" }), _jsx("div", { className: "mt-1 text-red-900 dark:text-red-200 whitespace-pre-wrap", children: error })] }), showStack && stack && (_jsxs("details", { className: "mt-2", children: [_jsx("summary", { className: "cursor-pointer text-xs text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200", children: "View stack trace" }), _jsx("pre", { className: "mt-2 p-2 bg-red-100/50 dark:bg-red-900/20 rounded text-xs overflow-x-auto text-red-800 dark:text-red-300", children: stack })] }))] })] }) }));
}
//# sourceMappingURL=ToolErrorDisplay.js.map