'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

require('./_commonjsHelpers-06173234.js');
require('./_to-object-7a3ce269.js');
require('./es6.string.iterator-ab94a594.js');
require('./_library-dd23b178.js');
require('./core.get-iterator-method-6cd7682d.js');
require('./_object-pie-68c5bcbc.js');
var _extends = require('./extends-acc1318d.js');
require('./web.dom.iterable-68e3aaf2.js');
require('./typeof-e83d4a26.js');
require('./_is-array-39ff55dd.js');
var React = require('react');
var React__default = _interopDefault(React);
require('prop-types');
require('react-dom');
require('./index-ff69979f.js');
require('./urlFor.js');
require('./index-96b3db50.js');
require('./main-bc7d4bf8.js');
require('./slicedToArray-41819145.js');
require('./index-187c967e.js');
require('./smoothscroll-5054361f.js');
var YoutubeGroup = require('./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._extends({ key: 'articleCarousel-0', dataset: data }, props)) : React__default.createElement(
      'p',
      null,
      'No Article Found.'
    )
  );
}

module.exports = ArticleCarousel;
