import g from "../../../@babel/runtime/helpers/esm/extends.mjs";
import * as m from "react";
import y from "../Cell/index.mjs";
import w from "../context/TableContext.mjs";
import { useContext as N } from "../../../@rc-component/context/es/context.mjs";
import "../../../rc-util/node_modules/react-is/index.mjs";
import { getCellFixedInfo as h } from "../utils/fixUtil.mjs";
import k from "./SummaryContext.mjs";
function q(e) {
  var s = e.className, n = e.index, c = e.children, l = e.colSpan, t = l === void 0 ? 1 : l, d = e.rowSpan, p = e.align, a = N(w, ["prefixCls", "direction"]), x = a.prefixCls, u = a.direction, o = m.useContext(k), f = o.scrollColumnIndex, C = o.stickyOffsets, S = o.flattenColumns, r = o.columns, v = n + t - 1, i = v + 1 === f ? t + 1 : t, I = h(n, n + i - 1, S, C, u, r == null ? void 0 : r[n]);
  return /* @__PURE__ */ m.createElement(y, g({
    className: s,
    index: n,
    component: "td",
    prefixCls: x,
    record: null,
    dataIndex: null,
    align: p,
    colSpan: i,
    rowSpan: d,
    render: function() {
      return c;
    }
  }, I));
}
export {
  q as default
};
