import { useRef as u } from "react";
import f from "../../../../rc-util/es/hooks/useLayoutEffect.mjs";
import c from "../../_util/hooks/useForceUpdate.mjs";
import i from "../../_util/responsiveObserver.mjs";
function d() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
  const e = u({}), s = c(), r = i();
  return f(() => {
    const n = r.subscribe((o) => {
      e.current = o, t && s();
    });
    return () => r.unsubscribe(n);
  }, []), e.current;
}
export {
  d as default
};
