import { _ as _extends } from './extends-60e0e1c6.js';
import React from 'react';
import ArticleCarousel from './ArticleCarousel.js';
import { I as IoIosArrowForward } from './index.esm-3fdda599.js';
import { B as BlockContent } from './BlockContent-52cf21c5.js';
import { g as getSerializers } from './index-1654b705.js';
import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-b50e61c3.js';
import './_object-pie-133f504a.js';
import './YoutubeGroup.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';
import './iconBase-602d52fe.js';
import 'react-bootstrap';
import './index-2446af28.js';
import './events-6c3a7a63.js';
import 'next/router';
import './util-3ab476bf.js';
import './Beam.js';
import './stringify-59c8f690.js';
import './asyncToGenerator-7f8f9219.js';
import './_iter-detect-7e5e5ce2.js';
import './Segment.js';
import './brightcove-react-player-loader.es-b43c695a.js';
import './GroupDeck.js';
import './moment-bc12cb97.js';
import './SocialShare.js';
import 'next/head';
import 'react-share';
import './_object-to-array-0f197f89.js';
import './toConsumableArray-6d9a4616.js';
import 'react-bootstrap/Pagination';
import 'react-bootstrap/Button';
import './entities-932b50cf.js';
import './AdSlot.js';
import './debounce-533d9748.js';
import './isSymbol-a7e9aafe.js';
import './toNumber-5aeba6e7.js';
import 'react-bootstrap/Row';
import 'react-bootstrap/Col';
import './inherits-a41fe93f.js';
import './_object-sap-f353c2a9.js';
import './define-property-fe54dc9f.js';
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.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;
