'use strict';

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

var vue = require('vue');

const OVERFLOW_KEY = "$$__vc-menu-more__key";
const KeyPathContext = Symbol("KeyPathContext");
function useInjectKeyPath() {
  return vue.inject(KeyPathContext, {
    parentEventKeys: vue.computed(() => []),
    parentKeys: vue.computed(() => []),
    parentInfo: {}
  });
}
function useProvideKeyPath(eventKey, key, menuInfo) {
  const { parentEventKeys, parentKeys } = useInjectKeyPath();
  const eventKeys = vue.computed(() => [...parentEventKeys.value, eventKey]);
  const keys = vue.computed(() => [...parentKeys.value, key]);
  vue.provide(KeyPathContext, { parentEventKeys: eventKeys, parentKeys: keys, parentInfo: menuInfo });
  return keys;
}
const measure = Symbol("measure");
const PathContext = vue.defineComponent({
  compatConfig: { MODE: 3 },
  setup(_props, { slots }) {
    vue.provide(measure, true);
    return () => {
      var _a;
      return (_a = slots.default) == null ? void 0 : _a.call(slots);
    };
  }
});
function useMeasure() {
  return vue.inject(measure, false);
}

exports.KeyPathContext = KeyPathContext;
exports.OVERFLOW_KEY = OVERFLOW_KEY;
exports.PathContext = PathContext;
exports.default = useProvideKeyPath;
exports.useInjectKeyPath = useInjectKeyPath;
exports.useMeasure = useMeasure;
exports.useProvideKeyPath = useProvideKeyPath;
//# sourceMappingURL=useKeyPath.cjs.map
