import { jsxs as R, jsx as l } from "react/jsx-runtime";
import { memo as T } from "react";
import { TableCell as v } from "../../../table/components/TablePrimitive.js";
import D from "../../../table/utils/areCellPropsEqual.js";
import N from "./hooks/useDataTableCell.js";
import { c as r } from "../../../../index-BtlgVD4m.js";
const j = ({
  hasColumnSeparator: a,
  cell: o,
  cellsLength: s,
  isSelected: t,
  columnSizingId: i,
  columnSizingDeltaOffset: n,
  handleClickRow: c,
  columnSizeNumber: m,
  record: f,
  rowIndex: p,
  cellEdit: u,
  columns: b
}) => {
  const { cellClasses: d, newStyle: C, canResize: h, handleClick: x, handleResize: e, renderCellContent: g, setNodeRef: w, isResizing: z } = N({
    hasColumnSeparator: a,
    cell: o,
    cellsLength: s,
    isSelected: t,
    columnSizingId: i,
    columnSizingDeltaOffset: n,
    handleClickRow: c,
    columnSizeNumber: m,
    record: f,
    rowIndex: p,
    cellEdit: u,
    columns: b
  });
  return /* @__PURE__ */ R(v, { className: d, style: C, onClick: x, ref: w, children: [
    g(),
    h && /* @__PURE__ */ l(
      "div",
      {
        "aria-label": "Resize pointer",
        onMouseDown: e,
        onTouchStart: e,
        className: r("absolute flex items-center justify-center top-0 -right-1 h-full w-[8px] cursor-col-resize"),
        children: /* @__PURE__ */ l("div", { className: r("w-[1px] h-full bg-[var(--base-border)]", z && "w-[1px] bg-[var(--base-foreground)]") })
      }
    )
  ] });
}, P = T(j, D);
export {
  j as DataTableCell,
  P as default
};
//# sourceMappingURL=DataTableCell.js.map
