import { jsx as t } from "react/jsx-runtime";
import p from "../../utils/classNames.js";
import { useOptionalTableInteractionContext as b } from "./context/TableInteractionContext.js";
import { useOptionalTableSection as w, useTableBodyContext as x } from "./context/TableStructureContext.js";
import { useOptionalTableRenderContext as f } from "./context/TableRenderContext.js";
const v = (s) => {
  const { children: a, className: c, noHover: i, ...d } = s, o = f(), n = b(), m = w(), r = x();
  if (!o || !n || o.columns.length === 0 || m !== "body" || !r)
    return null;
  const e = r.nextRowIndex(), u = o.columns.length + (n.showSelectionColumn ? 1 : 0), l = /* @__PURE__ */ t(
    "div",
    {
      ...d,
      className: p("table-row", "table-row-group-footer", i && "table-row-no-hover", c),
      "data-index": e,
      role: "row",
      children: /* @__PURE__ */ t("div", { className: "table-cell table-group-cell", role: "cell", "aria-colspan": u, children: /* @__PURE__ */ t("div", { className: "table-cell-content", children: a }) })
    }
  );
  return o.renderDraft.bodyRows.push({
    rowId: `group-footer-${e}`,
    rowIndex: e,
    kind: "group-footer",
    render: () => l
  }), o.isRegisteringBodyRows ? null : l;
};
export {
  v as default
};
//# sourceMappingURL=TableGroupFooterRow.js.map
