// TODO: Try to fix this lint error without the disable
/* eslint-disable react/no-array-index-key */
import { Fragment } from 'react';
import classnames from 'classnames';
import get from 'lodash/get';
import customizable from "../../../../utils/css/customizable.js";
import renderNode from './renderNode';
const render = function render(data, props) {
  if (!data) {
    return null;
  }
  const nodes = get(data, 'document.nodes');
  if (!nodes) {
    return null;
  }
  return <div className={classnames(customizable('RenderedContent'))}>
      {nodes.map((d, idx) => <Fragment key={idx}>
          {renderNode(d, props)}
        </Fragment>)}
    </div>;
};
export default render;