"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index = require("../../../../hooks/use-prop/index.js");
const index$1 = require("../../../../hooks/use-size/index.js");
const constants = require("../constants.js");
const Vue = require("vue");
const useFormSize = (fallback, ignore = {}) => {
  const emptyRef = Vue.ref(void 0);
  const size = ignore.prop ? emptyRef : index.useProp("size");
  const globalConfig = ignore.global ? emptyRef : index$1.useGlobalSize();
  const form = ignore.form ? { size: void 0 } : Vue.inject(constants.formContextKey, void 0);
  const formItem = ignore.formItem ? { size: void 0 } : Vue.inject(constants.formItemContextKey, void 0);
  return Vue.computed(() => size.value || Vue.unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig.value || "");
};
const useFormDisabled = (fallback) => {
  const disabled = index.useProp("disabled");
  const form = Vue.inject(constants.formContextKey, void 0);
  return Vue.computed(() => {
    return disabled.value ?? Vue.unref(fallback) ?? (form == null ? void 0 : form.disabled) ?? false;
  });
};
exports.useFormDisabled = useFormDisabled;
exports.useFormSize = useFormSize;
