import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import { mapValues } from 'lodash';
import { useMemo } from 'react';
import ArrayField from './ArrayField';
var fields = {
  ArrayField: ArrayField
};
export default (function (props) {
  return _objectSpread(_objectSpread({}, props), {}, {
    fields: useMemo(function () {
      return mapValues(fields, function (value, key) {
        var _props$fields;

        return value((_props$fields = props.fields) === null || _props$fields === void 0 ? void 0 : _props$fields[key]);
      });
    }, [props.fields])
  });
});
//# sourceMappingURL=index.js.map