import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import React from "react";
import { Row as RenderRow } from '@whalecloud/fdx';
import Element from "../../../components/Element";
import { ElementRoot } from "../../../components/ElementRoot";
import ElementAnimation from "../../../components/ElementAnimation";

var Row = function Row(_ref) {
  var element = _ref.element,
      restProps = _objectWithoutProperties(_ref, ["element"]);

  var _element$data = element.data,
      data = _element$data === void 0 ? {} : _element$data;

  var _ref2 = data || {},
      _ref2$formItemSetting = _ref2.formItemSettings,
      formItemSettings = _ref2$formItemSetting === void 0 ? {} : _ref2$formItemSetting;

  var _formItemSettings$cla = formItemSettings.className,
      className = _formItemSettings$cla === void 0 ? "" : _formItemSettings$cla;
  return /*#__PURE__*/React.createElement(ElementAnimation, null, /*#__PURE__*/React.createElement(ElementRoot, {
    element: element,
    className: "webiny-pb-base-page-element-style webiny-pb-layout-row"
  }, /*#__PURE__*/React.createElement(RenderRow, {
    className: className,
    style: {
      display: 'block'
    }
  }, element.elements.map(function (element) {
    return element.data ? /*#__PURE__*/React.createElement(Element, Object.assign({
      key: element.id,
      element: element
    }, restProps)) : null;
  }))));
};

export default Row;
//# sourceMappingURL=Row.js.map