/**
 * ldesign v0.2.3
 * (c) 2022年9月24日 swimly
 * @license MIT
 */

import { computed, getCurrentInstance } from '@vue/composition-api';

function useFormDisabled() {
  const formDisabled = computed(() => {
    const currentInstance = getCurrentInstance();
    let {
      parent
    } = currentInstance;

    while (parent) {
      if (parent.proxy.$options.name === "TForm") {
        return parent.props.disabled;
      }

      parent = parent.parent;
    }

    return false;
  });
  return {
    formDisabled
  };
}

export { useFormDisabled as default };
//# sourceMappingURL=use-form-disabled.js.map
