import { _ as _extends } from './extends-6d8e3924.js';
import React__default from 'react';
import YoutubeGroup from './YoutubeGroup.js';
import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-ea258bb1.js';
import './_object-pie-133f504a.js';
import './slicedToArray-6ebcbfea.js';
import './web.dom.iterable-ab4dea5c.js';
import './index-c7e2ac95.js';
import './index-755f2cc2.js';
import 'react-dom';
import 'prop-types';
import './smoothscroll-fa4e3f8c.js';
import './urlFor.js';
import './index-3f5c03b2.js';
import './main-1894c974.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 { ArticleCarousel as default };
