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

const DisabledContextKey = Symbol("DisabledContextKey");
function useInjectDisabled() {
  return inject(DisabledContextKey, ref(void 0));
}
function useProviderDisabled(disabled) {
  const parentDisabled = useInjectDisabled();
  provide(
    DisabledContextKey,
    computed(() => {
      var _a;
      return (_a = disabled.value) != null ? _a : parentDisabled.value;
    })
  );
  return disabled;
}

export { useInjectDisabled, useProviderDisabled };
//# sourceMappingURL=disabledContext.mjs.map
