"use strict";

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

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

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

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

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

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

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

var _react = require("react");

var _excluded = ["children"];

var FormVirtualGroup = /*#__PURE__*/function (_PureComponent) {
  (0, _inherits2["default"])(FormVirtualGroup, _PureComponent);

  var _super = (0, _createSuper2["default"])(FormVirtualGroup);

  function FormVirtualGroup() {
    (0, _classCallCheck2["default"])(this, FormVirtualGroup);
    return _super.apply(this, arguments);
  }

  (0, _createClass2["default"])(FormVirtualGroup, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          children = _this$props.children,
          otherProps = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);

      if (children) {
        return _react.Children.map(children, function (child) {
          if ( /*#__PURE__*/(0, _react.isValidElement)(child)) {
            return /*#__PURE__*/(0, _react.cloneElement)(child, otherProps);
          }

          return child;
        });
      }

      return null;
    }
  }]);
  return FormVirtualGroup;
}(_react.PureComponent);

exports["default"] = FormVirtualGroup;
FormVirtualGroup.displayName = 'FormVirtualGroup';
FormVirtualGroup.__PRO_FORM_VIRTUAL_GROUP = true;
//# sourceMappingURL=FormVirtualGroup.js.map
