"use client";

import * as React from "react";

import { PreviewTable } from "../../bulk-edit/_components/preview-table";
import type { PreviewRow } from "../../bulk-edit/_lib/schema";

/**
 * Read-only reuse of the Bulk Edit output list. Showing the applied history in
 * exactly the layout the operator approved it in makes an audit a direct
 * comparison rather than a translation.
 */
export function CorporateActionRowsTable({ rows }: { rows: PreviewRow[] }) {
  const noop = React.useCallback(() => {}, []);

  return (
    <PreviewTable
      rows={rows}
      selectedIds={new Set()}
      onToggle={noop}
      onToggleAll={noop}
      readOnly
    />
  );
}
