"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;
