"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var renderers_exports = {};
__export(renderers_exports, {
  CreateFilePreview: () => import_FilePreviewRenderer.CreateFilePreview,
  DiffPreview: () => import_FilePreviewRenderer.DiffPreview,
  DiffRenderer: () => import_DiffRenderer2.DiffRenderer,
  FileRenderer: () => import_FileRenderer2.FileRenderer,
  GenericRenderer: () => import_GenericRenderer2.GenericRenderer,
  SearchRenderer: () => import_SearchRenderer2.SearchRenderer,
  ShellRenderer: () => import_ShellRenderer2.ShellRenderer,
  ToolResultRenderer: () => ToolResultRenderer
});
module.exports = __toCommonJS(renderers_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_DiffRenderer = require("./DiffRenderer.js");
var import_ShellRenderer = require("./ShellRenderer.js");
var import_SearchRenderer = require("./SearchRenderer.js");
var import_FileRenderer = require("./FileRenderer.js");
var import_GenericRenderer = require("./GenericRenderer.js");
var import_DiffRenderer2 = require("./DiffRenderer.js");
var import_ShellRenderer2 = require("./ShellRenderer.js");
var import_SearchRenderer2 = require("./SearchRenderer.js");
var import_FileRenderer2 = require("./FileRenderer.js");
var import_GenericRenderer2 = require("./GenericRenderer.js");
var import_FilePreviewRenderer = require("./FilePreviewRenderer.js");
function ToolResultRenderer({ display, content, maxLines }) {
  const displayData = display ?? { type: "generic" };
  switch (displayData.type) {
    case "diff":
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DiffRenderer.DiffRenderer, { data: displayData, ...maxLines !== void 0 && { maxLines } });
    case "shell":
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ShellRenderer.ShellRenderer, { data: displayData, ...maxLines !== void 0 && { maxLines } });
    case "search":
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        import_SearchRenderer.SearchRenderer,
        {
          data: displayData,
          ...maxLines !== void 0 && { maxMatches: maxLines }
        }
      );
    case "file":
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FileRenderer.FileRenderer, { data: displayData, ...maxLines !== void 0 && { maxLines } });
    case "generic":
    default:
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GenericRenderer.GenericRenderer, { content, ...maxLines !== void 0 && { maxLines } });
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  CreateFilePreview,
  DiffPreview,
  DiffRenderer,
  FileRenderer,
  GenericRenderer,
  SearchRenderer,
  ShellRenderer,
  ToolResultRenderer
});
