import m from "../../../rc-util/es/hooks/useEvent.mjs";
import "../../../rc-util/es/hooks/useLayoutEffect.mjs";
import * as t from "react";
import "../../../rc-util/node_modules/react-is/index.mjs";
import "../../../rc-util/es/warning.mjs";
function c() {
}
const s = /* @__PURE__ */ t.createContext({
  add: c,
  remove: c
});
function R(n) {
  const r = t.useContext(s), o = t.useRef();
  return m((e) => {
    if (e) {
      const a = n ? e.querySelector(n) : e;
      r.add(a), o.current = a;
    } else
      r.remove(o.current);
  });
}
const l = s;
export {
  l as default,
  R as usePanelRef
};
