import type { ReactNode } from "react";

type DataTableSectionProps = {
  children: ReactNode;
  pagination: ReactNode;
};

export function DataTableSection({
  children,
  pagination,
}: DataTableSectionProps) {
  return (
    <div className="flex min-h-0 flex-1 flex-col gap-4 overflow-hidden">
      <div
        data-table-scroll
        className="-mx-5 min-h-0 flex-1 overflow-auto px-5"
      >
        <div className="min-w-0 overflow-x-auto">{children}</div>
      </div>
      <div className="shrink-0">{pagination}</div>
    </div>
  );
}
