import { jsx as r, jsxs as c } from "react/jsx-runtime";
import { TableHeader as g, TableRow as n, TableHead as s } from "../TablePrimitive.js";
import d from "../../hooks/useTableStyles.js";
import { c as l } from "../../../../index-BtlgVD4m.js";
import p from "../../utils/getColumnSizeStyles.js";
import u from "../../../text/Text.js";
const S = ({ columns: t, hasColumnSeparator: b, hasExpandableRows: o }) => {
  const m = d({ backgroundColor: "var(--base-background)" }, "header"), h = d({ color: "muted" }, "headerText");
  return /* @__PURE__ */ r(g, { className: "sticky top-0 bg-[var(--base-background)] shadow-[0_1px_0_0_var(--base-border)] z-[1]", children: /* @__PURE__ */ c(n, { style: m, children: [
    o && /* @__PURE__ */ r(s, { className: l("text-[var(--base-muted-foreground)] h-[var(--height-h-12)] p-0", "w-10 max-w-10") }),
    t.map((e, a) => {
      const i = p(e);
      return /* @__PURE__ */ r(
        s,
        {
          style: i,
          className: l(
            "text-[var(--base-muted-foreground)] h-[var(--height-h-12)]",
            b && a !== t.length - 1 && "border-r border-[var(--base-border)]",
            o && a === 0 && "pl-0"
          ),
          children: /* @__PURE__ */ r(u, { type: "muted", weight: "medium", align: e.align, ...h, children: e.title })
        },
        `jtl-table-header-${e.key}-${a}`
      );
    })
  ] }) });
};
export {
  S as default
};
//# sourceMappingURL=TableHeader.js.map
