'use strict';

var vue = require('vue');

const OverrideContextKey = Symbol("OverrideContextKey");
function useInjectOverride() {
  return vue.inject(OverrideContextKey, void 0);
}
function useProvideOverride(props) {
  var _a, _b, _c;
  const { prefixCls, mode, selectable, validator, onClick, expandIcon } = useInjectOverride() || {};
  vue.provide(OverrideContextKey, {
    prefixCls: vue.computed(() => {
      var _a2, _b2;
      return (_b2 = (_a2 = props.prefixCls) == null ? void 0 : _a2.value) != null ? _b2 : prefixCls == null ? void 0 : prefixCls.value;
    }),
    mode: vue.computed(() => {
      var _a2, _b2;
      return (_b2 = (_a2 = props.mode) == null ? void 0 : _a2.value) != null ? _b2 : mode == null ? void 0 : mode.value;
    }),
    selectable: vue.computed(() => {
      var _a2, _b2;
      return (_b2 = (_a2 = props.selectable) == null ? void 0 : _a2.value) != null ? _b2 : selectable == null ? void 0 : selectable.value;
    }),
    validator: (_a = props.validator) != null ? _a : validator,
    onClick: (_b = props.onClick) != null ? _b : onClick,
    expandIcon: (_c = props.expandIcon) != null ? _c : expandIcon == null ? void 0 : expandIcon.value
  });
}

exports.OverrideContextKey = OverrideContextKey;
exports.useInjectOverride = useInjectOverride;
exports.useProvideOverride = useProvideOverride;
//# sourceMappingURL=OverrideContext.cjs.map
