"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _lodash = require("lodash");

var _react = require("react");

var _ArrayField = _interopRequireDefault(require("./ArrayField"));

var fields = {
  ArrayField: _ArrayField["default"]
};

var _default = function _default(props) {
  return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
    fields: (0, _react.useMemo)(function () {
      return (0, _lodash.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])
  });
};

exports["default"] = _default;
//# sourceMappingURL=index.cjs.map