'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');

const MenuContextKey = Symbol("menuContextKey");
function useProvideMenu(props) {
  vue.provide(MenuContextKey, props);
}
function useInjectMenu() {
  return vue.inject(MenuContextKey);
}
const ForceRenderKey = Symbol("ForceRenderKey");
function useProvideForceRender(forceRender) {
  vue.provide(ForceRenderKey, forceRender);
}
function useInjectForceRender() {
  return vue.inject(ForceRenderKey, false);
}
const MenuFirstLevelContextKey = Symbol("menuFirstLevelContextKey");
function useProvideFirstLevel(firstLevel) {
  vue.provide(MenuFirstLevelContextKey, firstLevel);
}
function useInjectFirstLevel() {
  return vue.inject(MenuFirstLevelContextKey, true);
}
const MenuContextProvider = vue.defineComponent({
  compatConfig: { MODE: 3 },
  name: "MenuContextProvider",
  inheritAttrs: false,
  props: {
    mode: { type: String, default: void 0 },
    overflowDisabled: { type: Boolean, default: void 0 }
  },
  setup(props, { slots }) {
    const menuContext = useInjectMenu();
    const newContext = { ...menuContext };
    if (props.mode !== void 0)
      newContext.mode = vue.toRef(props, "mode");
    if (props.overflowDisabled !== void 0)
      newContext.overflowDisabled = vue.toRef(props, "overflowDisabled");
    useProvideMenu(newContext);
    return () => {
      var _a;
      return (_a = slots.default) == null ? void 0 : _a.call(slots);
    };
  }
});

exports.MenuContextKey = MenuContextKey;
exports.MenuContextProvider = MenuContextProvider;
exports.MenuFirstLevelContextKey = MenuFirstLevelContextKey;
exports.default = useProvideMenu;
exports.useInjectFirstLevel = useInjectFirstLevel;
exports.useInjectForceRender = useInjectForceRender;
exports.useInjectMenu = useInjectMenu;
exports.useProvideFirstLevel = useProvideFirstLevel;
exports.useProvideForceRender = useProvideForceRender;
exports.useProvideMenu = useProvideMenu;
//# sourceMappingURL=useMenuContext.cjs.map
