import { jsx } from "react/jsx-runtime";
import { DiffRenderer } from "./DiffRenderer.js";
import { ShellRenderer } from "./ShellRenderer.js";
import { SearchRenderer } from "./SearchRenderer.js";
import { FileRenderer } from "./FileRenderer.js";
import { GenericRenderer } from "./GenericRenderer.js";
import { DiffRenderer as DiffRenderer2 } from "./DiffRenderer.js";
import { ShellRenderer as ShellRenderer2 } from "./ShellRenderer.js";
import { SearchRenderer as SearchRenderer2 } from "./SearchRenderer.js";
import { FileRenderer as FileRenderer2 } from "./FileRenderer.js";
import { GenericRenderer as GenericRenderer2 } from "./GenericRenderer.js";
import { DiffPreview, CreateFilePreview } from "./FilePreviewRenderer.js";
function ToolResultRenderer({ display, content, maxLines }) {
  const displayData = display ?? { type: "generic" };
  switch (displayData.type) {
    case "diff":
      return /* @__PURE__ */ jsx(DiffRenderer, { data: displayData, ...maxLines !== void 0 && { maxLines } });
    case "shell":
      return /* @__PURE__ */ jsx(ShellRenderer, { data: displayData, ...maxLines !== void 0 && { maxLines } });
    case "search":
      return /* @__PURE__ */ jsx(
        SearchRenderer,
        {
          data: displayData,
          ...maxLines !== void 0 && { maxMatches: maxLines }
        }
      );
    case "file":
      return /* @__PURE__ */ jsx(FileRenderer, { data: displayData, ...maxLines !== void 0 && { maxLines } });
    case "generic":
    default:
      return /* @__PURE__ */ jsx(GenericRenderer, { content, ...maxLines !== void 0 && { maxLines } });
  }
}
export {
  CreateFilePreview,
  DiffPreview,
  DiffRenderer2 as DiffRenderer,
  FileRenderer2 as FileRenderer,
  GenericRenderer2 as GenericRenderer,
  SearchRenderer2 as SearchRenderer,
  ShellRenderer2 as ShellRenderer,
  ToolResultRenderer
};
