import { _ as _extends } from './extends-60e0e1c6.js';
import React from 'react';
import YoutubeGroup from './YoutubeGroup.js';
import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-b50e61c3.js';
import './_object-pie-133f504a.js';
import './typeof-a286cf0c.js';
import './es6.string.iterator-bc33758b.js';
import './web.dom.iterable-4109ff68.js';
import './_is-array-3e99e06e.js';
import './_library-528f1934.js';
import './slicedToArray-be2f7a22.js';
import './core.get-iterator-method-133dfacd.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;
