import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-86d4db69.js';
import './_object-pie-33c40e79.js';
import { _ as _extends } from './extends-a4230287.js';
import './web.dom.iterable-f8f967cd.js';
import React from 'react';
import 'prop-types';
import 'react-dom';
import './slicedToArray-67a08c9c.js';
import './index-51a80699.js';
import './urlFor.js';
import './index-6c12bdd5.js';
import './main-43ca42fe.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.createElement(
    React.Fragment,
    null,
    articles ? React.createElement(YoutubeGroup, _extends({ key: 'articleCarousel-0', dataset: data }, props)) : React.createElement(
      'p',
      null,
      'No Article Found.'
    )
  );
}

export default ArticleCarousel;
