'use strict';

var vue = require('vue');

const TreeContextKey = Symbol("TreeContextKey");
const TreeContext = vue.defineComponent({
  compatConfig: { MODE: 3 },
  name: "TreeContext",
  props: {
    value: { type: Object }
  },
  setup(props, { slots }) {
    vue.provide(
      TreeContextKey,
      vue.computed(() => props.value)
    );
    return () => {
      var _a;
      return (_a = slots.default) == null ? void 0 : _a.call(slots);
    };
  }
});
function useInjectTreeContext() {
  return vue.inject(
    TreeContextKey,
    vue.computed(() => ({}))
  );
}
const KeysStateKey = Symbol("KeysStateKey");
function useProvideKeysState(state) {
  vue.provide(KeysStateKey, state);
}
function useInjectKeysState() {
  return vue.inject(KeysStateKey, {
    expandedKeys: vue.shallowRef([]),
    selectedKeys: vue.shallowRef([]),
    loadedKeys: vue.shallowRef([]),
    loadingKeys: vue.shallowRef([]),
    checkedKeys: vue.shallowRef([]),
    halfCheckedKeys: vue.shallowRef([]),
    expandedKeysSet: vue.computed(() => /* @__PURE__ */ new Set()),
    selectedKeysSet: vue.computed(() => /* @__PURE__ */ new Set()),
    loadedKeysSet: vue.computed(() => /* @__PURE__ */ new Set()),
    loadingKeysSet: vue.computed(() => /* @__PURE__ */ new Set()),
    checkedKeysSet: vue.computed(() => /* @__PURE__ */ new Set()),
    halfCheckedKeysSet: vue.computed(() => /* @__PURE__ */ new Set()),
    flattenNodes: vue.shallowRef([])
  });
}

exports.TreeContext = TreeContext;
exports.useInjectKeysState = useInjectKeysState;
exports.useInjectTreeContext = useInjectTreeContext;
exports.useProvideKeysState = useProvideKeysState;
//# sourceMappingURL=contextTypes.cjs.map
