import { _ as _extends } from './extends-dc6a71fd.js';
import React from 'react';
import YoutubeGroup from './YoutubeGroup.js';
import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-e903ff31.js';
import './_object-pie-133f504a.js';
import './slicedToArray-ca2c8b8d.js';
import './web.dom.iterable-fdf034f5.js';
import './index-c7e2ac95.js';
import './index-35bdcc81.js';
import 'react-dom';
import 'prop-types';
import './smoothscroll-fa4e3f8c.js';
import './urlFor.js';
import './index-0dbff1d1.js';
import './main-b5c5aac1.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;
