import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-ded78eb9.js';
import './es6.string.iterator-9b2af4a5.js';
import './_library-528f1934.js';
import './core.get-iterator-method-54d2e411.js';
import './_object-pie-71ac75a4.js';
import { _ as _extends } from './extends-cc5da797.js';
import './web.dom.iterable-8956f9a5.js';
import './typeof-08f2c380.js';
import './_is-array-49698029.js';
import React__default from 'react';
import 'prop-types';
import 'react-dom';
import './index-73819142.js';
import './index-5f9f807a.js';
import './slicedToArray-7021e5df.js';
import './smoothscroll-4b699764.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__default.createElement(
    React__default.Fragment,
    null,
    articles ? React__default.createElement(YoutubeGroup, _extends({ key: 'articleCarousel-0', dataset: data }, props)) : React__default.createElement(
      'p',
      null,
      'No Article Found.'
    )
  );
}

export default ArticleCarousel;
