import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-a4107da3.js';
import './es6.string.iterator-c990c18c.js';
import './_library-528f1934.js';
import './_iter-detect-5d49a330.js';
import './toConsumableArray-43aa614d.js';
import './core.get-iterator-method-e1de7503.js';
import './_object-pie-33c40e79.js';
import { _ as _extends } from './extends-eb69e8ac.js';
import './_object-sap-964b6feb.js';
import './inherits-fb9b6e8f.js';
import './define-property-8af5f002.js';
import './web.dom.iterable-4439f05a.js';
import './typeof-6435ba1c.js';
import './_is-array-58e95429.js';
import React__default from 'react';
import './index-a9e53f80.js';
import 'prop-types';
import 'react-bootstrap/Row';
import 'react-bootstrap/Col';
import './moment-e2f9b20c.js';
import 'next/router';
import './isSymbol-807e927e.js';
import './debounce-1a993acf.js';
import 'react-dom';
import './index-73819142.js';
import './index-5f9f807a.js';
import './main-e4a934b2.js';
import './entities-7cc3bf45.js';
import './slicedToArray-641f241f.js';
import './stringify-4330ccdc.js';
import './asyncToGenerator-502f13b4.js';
import './_set-species-3f8319f5.js';
import './Segment.js';
import './Beam.js';
import './AdSlot.js';
import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
import './index-c7e2ac95.js';
import './smoothscroll-0cd4c7a6.js';
import './GroupDeck.js';
import './YoutubeGroup.js';
import 'react-bootstrap';
import './iconBase-602d52fe.js';
import { I as IoIosArrowForward } from './index.esm-29e48d38.js';
import ArticleCarousel from './ArticleCarousel.js';
import { g as getSerializers } from './index-c6e49ea4.js';
import './util-7700fc59.js';
import './brightcove-react-player-loader.es-83f53e4e.js';
import 'next/head';
import 'react-share';
import './SocialShare.js';
import './_object-to-array-7e804fce.js';
import 'react-bootstrap/Pagination';
import 'react-bootstrap/Button';
import 'react-bootstrap/Figure';

function HorizontalArticleListing(_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.length > 0 ? data.map(function (taxonomy, index) {
      return React__default.createElement(
        React__default.Fragment,
        null,
        React__default.createElement(
          'div',
          { key: 'articleCarousel_' + taxonomy.identifier + '_' + index, className: 'mb-3 horizontal-article' },
          React__default.createElement(
            'div',
            { className: 'horizontal-article-header', style: { borderBottom: '2px solid ' + color } },
            React__default.createElement(
              'div',
              { className: 'horizontal-article-title-wrapper' },
              React__default.createElement(
                'a',
                { href: '/' + taxonomy.identifier },
                React__default.createElement(
                  'h4',
                  { className: 'article-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', margin: '0' } },
                  taxonomy.name
                )
              ),
              taxonomy.identifier && React__default.createElement(
                'div',
                { style: { width: 'fit-content', whiteSpace: 'nowrap' } },
                React__default.createElement(
                  'a',
                  { href: '/' + taxonomy.identifier },
                  'View All ',
                  React__default.createElement(IoIosArrowForward, null)
                )
              )
            ),
            taxonomy.summary && React__default.createElement(
              'div',
              { className: 'horizontal-article-summary' },
              React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: taxonomy.summary, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
            )
          ),
          taxonomy.data.length > 0 ? React__default.createElement(
            'div',
            { className: 'article-carousel' },
            React__default.createElement(ArticleCarousel, { articles: taxonomy.data, client: client })
          ) : React__default.createElement(
            'div',
            null,
            React__default.createElement(
              'h5',
              { className: 'mt-2' },
              React__default.createElement(
                'em',
                { className: 'pl-3' },
                'New content coming soon, please check back later.'
              )
            )
          )
        ),
        React__default.createElement(
          'style',
          { jsx: 'true' },
          '\n                .article-carousel {\n                  display: flex;\n                  align-items: center;\n                  justify-content: center;\n                }\n                .horizontal-article-title-wrapper {\n                  display: flex;\n                  flex-wrap: no-wrap;\n                  align-items: center;\n                  justify-content: space-between;\n                }\n              '
        )
      );
    }) : React__default.createElement(
      'div',
      null,
      React__default.createElement(
        'h5',
        null,
        React__default.createElement(
          'em',
          { className: 'pl-3' },
          'New content coming soon, please check back later.'
        )
      )
    )
  );
}

export default HorizontalArticleListing;
