import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-86d4db69.js';
import './_object-pie-33c40e79.js';
import { _ as _extends } from './extends-5b1796d4.js';
import './web.dom.iterable-f8f967cd.js';
import React__default from 'react';
import 'prop-types';
import 'react-dom';
import './slicedToArray-67a08c9c.js';
import './index-73819142.js';
import './urlFor.js';
import './index-5f7e79e7.js';
import './main-e4a934b2.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;
