import { jsx as e } from "react/jsx-runtime";
import { TableHeader as c, TableRow as g } from "../../../table/components/TablePrimitive.js";
import { SortableContext as h, horizontalListSortingStrategy as p } from "@dnd-kit/sortable";
import f from "../../hooks/useDataTableStaticContext.js";
import u from "../../hooks/useDataTableStyles.js";
import y from "../data-table-head-cell/DataTableHeadCell.js";
const H = ({ headerGroups: t, columnSizingId: o, columnSizingDeltaOffset: l, selectedColumns: s }) => {
  const { hasColumnSeparator: d, onHeaderClick: b, columnOrder: i, styles: m } = f(), n = u({ backgroundColor: "var(--base-background)" }, "header", m);
  return /* @__PURE__ */ e(c, { className: "grid sticky top-0 z-1 bg-[var(--base-background)] border-b border-[var(--base-border)]", children: t.map((a) => /* @__PURE__ */ e(g, { className: "flex w-full", style: n, children: /* @__PURE__ */ e(h, { items: i, strategy: p, children: a.headers.map((r) => /* @__PURE__ */ e(
    y,
    {
      header: r,
      columnSizingId: o,
      columnSizingDeltaOffset: l,
      hasColumnSeparator: d,
      onHeaderClick: b,
      cellsLength: a.headers.length,
      selectedColumns: s
    },
    `data-table-head-cell-${r.id}`
  )) }) }, `data-table-header-group-${a.id}`)) });
};
export {
  H as default
};
//# sourceMappingURL=DataTableHeader.js.map
