'use strict';

require('./_commonjsHelpers-06173234.js');
require('./_to-object-329a650b.js');
require('./es6.string.iterator-cc0bbaa4.js');
require('./_library-dd23b178.js');
require('./core.get-iterator-method-f62321d4.js');
require('./_object-pie-68c5bcbc.js');
var _extends = require('./extends-0a918631.js');
require('./web.dom.iterable-a0e279c1.js');
require('./typeof-9d7f610f.js');
require('./_is-array-754e012d.js');
var React = require('react');
require('prop-types');
require('react-dom');
require('./index-b5eb3ff8.js');
require('./index-9d365128.js');
require('./main-7b5e57b0.js');
require('./slicedToArray-8f385299.js');
require('./index-187c967e.js');
require('./smoothscroll-5054361f.js');
var YoutubeGroup = require('./YoutubeGroup.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

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['default'].createElement(
    React__default['default'].Fragment,
    null,
    articles ? React__default['default'].createElement(YoutubeGroup, _extends._extends({ key: 'articleCarousel-0', dataset: data }, props)) : React__default['default'].createElement(
      'p',
      null,
      'No Article Found.'
    )
  );
}

module.exports = ArticleCarousel;
