import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-cedb5b78.js';
import './es6.string.iterator-1577cb76.js';
import './_library-528f1934.js';
import './core.get-iterator-method-227107e6.js';
import './_object-pie-33c40e79.js';
import { _ as _extends } from './extends-be71a29a.js';
import './web.dom.iterable-ace8ed30.js';
import './typeof-ad2c7a21.js';
import './_is-array-328b85b7.js';
import React__default from 'react';
import 'prop-types';
import 'react-dom';
import './index-f7fdcc91.js';
import './urlFor.js';
import './index-5f7e79e7.js';
import './main-ae902629.js';
import './slicedToArray-f0edf3d6.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__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;
