import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-86d4db69.js';
import './_library-528f1934.js';
import './_iter-detect-130ee549.js';
import './toConsumableArray-32282905.js';
import './_object-pie-33c40e79.js';
import { _ as _extends } from './extends-a4230287.js';
import './_object-sap-8b8ea5a9.js';
import './inherits-91a2c374.js';
import './define-property-6d26cb48.js';
import './web.dom.iterable-f8f967cd.js';
import './typeof-f1b7564e.js';
import './_is-array-4df618a6.js';
import React from 'react';
import './index-1819118a.js';
import 'prop-types';
import 'react-bootstrap/Row';
import 'react-bootstrap/Col';
import './moment-b6f49411.js';
import 'next/router';
import './isSymbol-1981418f.js';
import './debounce-9207d8ee.js';
import './toNumber-2f7a84cd.js';
import 'react-dom';
import './slicedToArray-67a08c9c.js';
import './index-51a80699.js';
import './urlFor.js';
import './index-6c12bdd5.js';
import './main-43ca42fe.js';
import './entities-7cc3bf45.js';
import './stringify-70b72959.js';
import './asyncToGenerator-64812e90.js';
import './Segment.js';
import './Beam.js';
import './AdSlot.js';
import 'react-bootstrap/Button';
import { B as BlockContent } from './BlockContent-d05b5b23.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-55f22b35.js';
import ArticleCarousel from './ArticleCarousel.js';
import { g as getSerializers } from './index-85bb0372.js';
import './util-7700fc59.js';
import './urlForFile-d2a27665.js';
import './brightcove-react-player-loader.es-4abff0b1.js';
import 'react-bootstrap/Modal';
import 'react-bootstrap/Form';
import 'next/head';
import 'react-share';
import './SocialShare.js';
import './_object-to-array-c54dd835.js';
import 'react-bootstrap/Pagination';
import 'react-bootstrap/Figure';
import 'react-bootstrap/OverlayTrigger';
import 'react-bootstrap/Tooltip';
import 'react-bootstrap/Popover';
import 'react-script-tag';

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

export default HorizontalArticleListing;
