import d from "../../../@babel/runtime/helpers/esm/objectWithoutProperties.mjs";
import m from "../../../@babel/runtime/helpers/esm/objectSpread2.mjs";
import * as i from "react";
import f from "../../../rc-util/es/hooks/useMemo.mjs";
import s from "../../../rc-util/es/isEqual.mjs";
var v = ["children", "locked"], a = /* @__PURE__ */ i.createContext(null);
function p(e, o) {
  var n = m({}, e);
  return Object.keys(o).forEach(function(r) {
    var t = o[r];
    t !== void 0 && (n[r] = t);
  }), n;
}
function P(e) {
  var o = e.children, n = e.locked, r = d(e, v), t = i.useContext(a), l = f(function() {
    return p(t, r);
  }, [t, r], function(c, u) {
    return !n && (c[0] !== u[0] || !s(c[1], u[1], !0));
  });
  return /* @__PURE__ */ i.createElement(a.Provider, {
    value: l
  }, o);
}
export {
  a as MenuContext,
  P as default
};
