"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useInjectTreeSelectContext = exports.SelectContext = void 0;

var _vue = require("vue");

var SelectContextKey = Symbol('SelectContextKey');
var SelectContext = (0, _vue.defineComponent)({
  name: 'SelectContext',
  props: {
    value: {
      type: Object
    }
  },
  setup: function setup(props, _ref) {
    var slots = _ref.slots;
    (0, _vue.provide)(SelectContextKey, (0, _vue.computed)(function () {
      return props.value;
    }));
    return function () {
      var _slots$default;

      return (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
    };
  }
});
exports.SelectContext = SelectContext;

var useInjectTreeSelectContext = function useInjectTreeSelectContext() {
  return (0, _vue.inject)(SelectContextKey, (0, _vue.computed)(function () {
    return {};
  }));
};

exports.useInjectTreeSelectContext = useInjectTreeSelectContext;