import S from "../../../@babel/runtime/helpers/esm/typeof.mjs";
import * as v from "react";
import y from "../../../rc-util/es/Dom/canUseDom.mjs";
var l = y() ? window : null;
function C(o, r) {
  var e = S(o) === "object" ? o : {}, t = e.offsetHeader, f = t === void 0 ? 0 : t, a = e.offsetSummary, n = a === void 0 ? 0 : a, i = e.offsetScroll, s = i === void 0 ? 0 : i, c = e.getContainer, d = c === void 0 ? function() {
    return l;
  } : c, m = d() || l;
  return v.useMemo(function() {
    var u = !!o;
    return {
      isSticky: u,
      stickyClassName: u ? "".concat(r, "-sticky-holder") : "",
      offsetHeader: f,
      offsetSummary: n,
      offsetScroll: s,
      container: m
    };
  }, [s, f, n, r, m]);
}
export {
  C as default
};
