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

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

export { OverrideContextKey, useInjectOverride, useProvideOverride };
//# sourceMappingURL=OverrideContext.mjs.map
