import { inject, computed, provide, defineComponent } from 'vue';

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

export { KeyPathContext, OVERFLOW_KEY, PathContext, useProvideKeyPath as default, useInjectKeyPath, useMeasure, useProvideKeyPath };
//# sourceMappingURL=useKeyPath.mjs.map
