import { _ as _extends } from './extends-6d8e3924.js';
import React__default from 'react';
import ArticleCarousel from './ArticleCarousel.js';
import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
import { g as getSerializers } from './index-076baa11.js';
import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-ea258bb1.js';
import './_object-pie-133f504a.js';
import './YoutubeGroup.js';
import './slicedToArray-6ebcbfea.js';
import './web.dom.iterable-ab4dea5c.js';
import './index-c7e2ac95.js';
import './index-755f2cc2.js';
import 'react-dom';
import 'prop-types';
import './smoothscroll-fa4e3f8c.js';
import './urlFor.js';
import './index-3f5c03b2.js';
import './main-9f6806ea.js';
import './iconBase-ccc56b97.js';
import 'react-bootstrap';
import './index-f0fc23eb.js';
import './events-6c3a7a63.js';
import 'next/router';
import './empty-a8042e3c.js';
import './Beam.js';
import './stringify-2b084bee.js';
import './asyncToGenerator-958ef5fc.js';
import './_library-528f1934.js';
import './_iter-detect-98db3b07.js';
import './Segment.js';
import './urlForFile-b69adffc.js';
import './typeof-e9fc0c5d.js';
import './_is-array-8d21b9e3.js';
import './brightcove-react-player-loader.es-57a70a56.js';
import 'react-bootstrap/Modal';
import 'react-bootstrap/Button';
import 'react-bootstrap/Form';
import './index-e7075467.js';
import './GroupDeck.js';
import './moment-bc12cb97.js';
import './SocialShare.js';
import 'next/head';
import 'react-share';
import './_object-to-array-2300e51b.js';
import './toConsumableArray-f7074d7c.js';
import 'react-bootstrap/Pagination';
import './entities-6d9154b4.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-a6ba2ec4.js';
import './_object-sap-7cee6f84.js';
import './define-property-5f1bda73.js';
import 'react-bootstrap/Figure';
import 'react-bootstrap/OverlayTrigger';
import 'react-bootstrap/Tooltip';
import 'react-bootstrap/Popover';
import './checkSisterSite-baa4fb6b.js';

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 { HorizontalArticleListing as default };
