import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-a4107da3.js';
import './es6.string.iterator-c990c18c.js';
import './_library-528f1934.js';
import './core.get-iterator-method-e1de7503.js';
import './_object-pie-33c40e79.js';
import { _ as _extends } from './extends-6f2fcc99.js';
import './web.dom.iterable-4439f05a.js';
import './typeof-af9c50d8.js';
import './_is-array-58e95429.js';
import React from 'react';
import 'prop-types';
import 'react-dom';
import './index-51a80699.js';
import './index-6c12bdd5.js';
import './main-747e7d25.js';
import './slicedToArray-641f241f.js';
import './index-c7e2ac95.js';
import './smoothscroll-0cd4c7a6.js';
import YoutubeGroup from './YoutubeGroup.js';

function ArticleCarousel(props) {
  //Passed in array of articles to pass into YoutubeGroup
  var articles = props.articles;

  //Setup article.link URL

  var data = articles.map(function (article, index) {
    article.link = '/view/' + article.url.current;
    return article;
  });

  return React.createElement(
    React.Fragment,
    null,
    articles ? React.createElement(YoutubeGroup, _extends({ key: 'articleCarousel-0', dataset: data }, props)) : React.createElement(
      'p',
      null,
      'No Article Found.'
    )
  );
}

export default ArticleCarousel;
