import { DataSourceType } from "lowcode/_utils/formKeyType";
export function getFormItemValue(children, cLowCodeService) {
  var result = {};
  if (children !== null && children !== void 0 && children.length) {
    children.forEach(function (item) {
      if (item.props.defaultObj) {
        var valueData = cLowCodeService.getVVData({
          data: item.props.defaultObj
        });
        result[item.props.name] = valueData;
      }
    });
  }
  return result;
}
export function isWalletInfo(children) {
  var result = false;
  for (var i = 0; i < children.length; i++) {
    var _item$props, _item$props$defaultOb;
    var item = children[i];
    if ((item === null || item === void 0 ? void 0 : (_item$props = item.props) === null || _item$props === void 0 ? void 0 : (_item$props$defaultOb = _item$props.defaultObj) === null || _item$props$defaultOb === void 0 ? void 0 : _item$props$defaultOb.formKey) === DataSourceType.currentWalletConnectType) {
      result = true;
      break;
    }
  }
  return result;
}