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

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var VueCompositionAPI = require('@vue/composition-api');

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

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

      parent = parent.parent;
    }

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

exports["default"] = useFormDisabled;
//# sourceMappingURL=use-form-disabled.js.map
