import { jsxs as r, jsx as s } from "react/jsx-runtime";
import b from "../../../utils/classNames.js";
import l from "../SortArrows.js";
const y = (o) => {
  const {
    column: t,
    title: a,
    label: e,
    sortBy: n,
    sortDir: i,
    onClick: c = () => {
    },
    className: m = "",
    children: d,
    ...p
  } = o, h = b("user-select-none", "sort-column", m);
  return /* @__PURE__ */ r(
    "th",
    {
      ...p,
      className: h,
      onClick: c,
      "data-field": t,
      "data-sortby": t,
      title: a ?? (typeof e == "string" ? e : ""),
      children: [
        e && /* @__PURE__ */ r("span", { children: [
          t !== void 0 && n === t ? /* @__PURE__ */ s(l, { direction: i }) : /* @__PURE__ */ s(l, {}),
          /* @__PURE__ */ s("span", { children: e })
        ] }),
        d
      ]
    }
  );
};
export {
  y as default
};
//# sourceMappingURL=TableHead.js.map
