import { Component } from '../components/index.js';
import { map } from 'lodash-es';
import React from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
/**
 * Render an Editorial Content. Renders Editorial Content by going through all it's
 * components and rendering them using the Editorial Component.
 *
 * @param data - Data to render.
 * @param componentProps - Props to be passed to the registered components.
 *
 * @returns Rendered components.
 */
const renderContent = ({
  components
}, componentProps) => /*#__PURE__*/_jsx(_Fragment, {
  children: map(components, (component, key) => /*#__PURE__*/_jsx(Component, {
    component: component,
    ...componentProps
  }, key))
});
export default renderContent;