'use strict';

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');
require('./extends-0a918631.js');
require('./web.dom.iterable-a0e279c1.js');
var React = require('react');
require('./index-e08f00ce.js');
require('prop-types');
require('react-bootstrap/Card');
require('./moment-ca3bd9fb.js');
require('next/router');
require('./isSymbol-04666465.js');
require('./debounce-529c8d06.js');
require('./toNumber-36d1e7e5.js');
require('./index.es-f3e47207.js');
require('react-dom');
require('./visibility-sensor-eb2c5b69.js');
require('./index-b5eb3ff8.js');
require('./index-9d365128.js');
require('./main-7b5e57b0.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-cc30d063.js');
require('./lodash-7fd85bcf.js');
require('./ADlgInfeed-2a757ee9.js');
require('./getContentCategory-f38a4c00.js');
require('./AuthorComponent-ac8972ce.js');
require('react-bootstrap');
require('./timeDifferenceCalc.js');
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
require('react-bootstrap/Breadcrumb');
var Breadcrumbs = require('./Breadcrumbs.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

/* 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['default'].createElement(
    'div',
    { id: 'issueLanding' },
    React__default['default'].createElement(Breadcrumbs, null),
    pubIssue.issue.source && React__default['default'].createElement(
      'p',
      { className: 'badge badge-primary' },
      pubIssue.issue.source
    ),
    React__default['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;
