'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('./_iter-detect-60b2f026.js');
require('./toConsumableArray-9a3476fe.js');
require('./core.get-iterator-method-f62321d4.js');
require('./_object-pie-68c5bcbc.js');
var _extends = require('./extends-0a918631.js');
require('./_object-sap-5e74ba08.js');
require('./inherits-9953db94.js');
require('./define-property-f4d12f4e.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('./events-1b438fe7.js');
require('./index-98e01cb9.js');
require('prop-types');
require('react-bootstrap/Row');
require('react-bootstrap/Col');
require('react-bootstrap/Card');
require('./moment-575fe24c.js');
require('next/router');
require('./isSymbol-04666465.js');
require('./debounce-529c8d06.js');
require('./toNumber-36d1e7e5.js');
require('./index.es-9110add6.js');
require('react-dom');
require('./visibility-sensor-ad5e3116.js');
require('./index-be0c82be.js');
require('./urlFor.js');
require('./index-96b3db50.js');
require('./main-02daeefe.js');
require('./entities-310b46ee.js');
require('./slicedToArray-8f385299.js');
require('./stringify-7c5aff47.js');
require('./asyncToGenerator-140e5f89.js');
require('./Segment.js');
require('./Beam.js');
require('./AdSlot.js');
require('./ADInfeed-8d621d3c.js');
require('./lodash-fc2922d0.js');
require('./ADlgInfeed-0e26bccb.js');
require('./getContentCategory-f38a4c00.js');
require('./AuthorComponent-bb831b74.js');
var BlockContent = require('./BlockContent-091a991f.js');
require('./index-187c967e.js');
require('./smoothscroll-5054361f.js');
require('./GroupDeck.js');
require('react-bootstrap');
require('./timeDifferenceCalc.js');
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
require('./iconBase-68959171.js');
require('./index.esm-90433435.js');
var getSerializers = require('./index-a0bdcb69.js');
require('./util-f2c1b65b.js');
require('./brightcove-react-player-loader.es-156bd4d6.js');
require('next/head');
require('react-share');
require('./SocialShare.js');
require('./_object-to-array-5762f850.js');
require('react-bootstrap/Pagination');
require('react-bootstrap/Button');
require('react-bootstrap/Figure');
require('react-bootstrap/Breadcrumb');
var Breadcrumbs = require('./Breadcrumbs.js');

/* usage
import Settings, { Ads } from '../../../../settings'
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
import client from '../../../../client'
import moment from 'moment'
import Shell from '../../../../components/2.0/Shell'
import { pageview } from '../../../../utilities/gtag'

const Issue = (props) => {
  const { pubIssue, cache } = props
  const targeting = {
    content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
    document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
  }
  return (
    <Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
      <IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
    </Shell>
  )
}

Issue.getInitialProps = async (ctx) => {
  const { query } = ctx
  const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
  )
  return { pubIssue }
}

export default Issue
*/

var IssueLanding = function IssueLanding(props) {
  var pubIssue = props.pubIssue,
      client = props.client,
      settings = props.settings,
      pageview = props.pageview,
      rightItems = props.rightItems,
      _props$showCategory = props.showCategory,
      showCategory = _props$showCategory === undefined ? true : _props$showCategory,
      _props$showPublished = props.showPublished,
      showPublished = _props$showPublished === undefined ? true : _props$showPublished,
      _props$seoPaginate = props.seoPaginate,
      seoPaginate = _props$seoPaginate === undefined ? true : _props$seoPaginate,
      _props$autoScroll = props.autoScroll,
      autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
      _props$showAuthor = props.showAuthor,
      showAuthor = _props$showAuthor === undefined ? false : _props$showAuthor,
      _props$showPubInfo = props.showPubInfo,
      showPubInfo = _props$showPubInfo === undefined ? false : _props$showPubInfo,
      _props$imageHeight = props.imageHeight,
      imageHeight = _props$imageHeight === undefined ? 270 : _props$imageHeight,
      _props$imageWidth = props.imageWidth,
      imageWidth = _props$imageWidth === undefined ? 480 : _props$imageWidth;

  return React__default.createElement(
    'div',
    { id: 'issueLanding' },
    React__default.createElement(Breadcrumbs, null),
    pubIssue.issue.source && React__default.createElement(
      'p',
      { className: 'badge badge-primary' },
      pubIssue.issue.source
    ),
    pubIssue.issue.description && React__default.createElement(
      React__default.Fragment,
      null,
      React__default.createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers.getSerializers(client), blocks: pubIssue.issue.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
      React__default.createElement('div', { style: { clear: 'both' } })
    ),
    React__default.createElement(QueueDeckExpanded, {
      client: client,
      mapping: settings.mapping,
      dataRecord: pubIssue.issue.articles,
      seoPaginate: seoPaginate,
      pageview: pageview,
      showAuthor: showAuthor,
      autoScroll: autoScroll,
      defaultImage: settings.logo,
      showPublished: showPublished,
      showCategory: showCategory,
      imageHeight: imageHeight,
      imageWidth: imageWidth,
      rightItems: rightItems,
      showPubInfo: showPubInfo,
      columns: 'rotate',
      variant: 'top',
      contentCategoryMapping: settings.contentCategoryMapping ? settings.contentCategoryMapping : []
    })
  );
};

module.exports = IssueLanding;
