'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

require('./_commonjsHelpers-06173234.js');
require('./_to-object-329a650b.js');
require('./es6.string.iterator-cc0bbaa4.js');
require('./_library-dd23b178.js');
require('./core.get-iterator-method-f62321d4.js');
require('./_object-pie-68c5bcbc.js');
require('./extends-60837c34.js');
require('./web.dom.iterable-a0e279c1.js');
require('./typeof-725500bc.js');
require('./_is-array-754e012d.js');
var React = require('react');
var React__default = _interopDefault(React);
require('prop-types');
require('react-dom');
require('./index-be0c82be.js');
require('./index-da796b8c.js');
require('./slicedToArray-8f385299.js');
require('./smoothscroll-95231a70.js');
require('./YoutubeGroup.js');
var ArticleCarousel = require('./ArticleCarousel.js');

function BrowseVideosListing(_ref) {
  var _ref$data = _ref.data,
      data = _ref$data === undefined ? null : _ref$data,
      _ref$client = _ref.client,
      client = _ref$client === undefined ? null : _ref$client,
      _ref$color = _ref.color,
      color = _ref$color === undefined ? '#FFFFFF' : _ref$color;

  // Look at AJMC for query setup
  // Data format = Array of Objects based on Taxonomies with videos and latest videos
  // {
  // name: ...,
  // identifier: ...,
  // data: Array of latest articles with videos
  // }
  return React__default.createElement(
    'div',
    null,
    data && data.map(function (taxonomy, index) {
      return React__default.createElement(
        'div',
        { key: 'articleCarousel_' + taxonomy.identifier + '_' + index, className: 'mb-5' },
        React__default.createElement(
          'div',
          { style: { borderBottom: '3px solid ' + color } },
          React__default.createElement(
            'h3',
            { style: { color: color, marginBottom: '.25rem' } },
            taxonomy.name
          ),
          taxonomy.identifier && React__default.createElement(
            'p',
            { style: { width: 'fit-content', marginBottom: '.25rem' } },
            React__default.createElement(
              'a',
              { href: '/' + taxonomy.identifier },
              'View All >'
            )
          )
        ),
        taxonomy.data && React__default.createElement(
          'div',
          null,
          React__default.createElement(ArticleCarousel, { articles: taxonomy.data, client: client })
        )
      );
    })
  );
}

module.exports = BrowseVideosListing;
