'use strict';

var React = require('react');
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
var Breadcrumbs = require('./Breadcrumbs.js');
require('./slicedToArray-5d1bc3b3.js');
require('./_commonjsHelpers-06173234.js');
require('./web.dom.iterable-46657b5c.js');
require('./es6.string.iterator-c2573ffd.js');
require('./_to-object-6de10e57.js');
require('./core.get-iterator-method-f474eacc.js');
require('./toConsumableArray-ddb70795.js');
require('./_iter-detect-55a5657a.js');
require('./extends-29bdbc6d.js');
require('./_object-pie-083f2dd6.js');
require('react-bootstrap');
require('./index-efca863c.js');
require('./index.es-f3e47207.js');
require('./moment-aca40de1.js');
require('./visibility-sensor-eb2c5b69.js');
require('react-dom');
require('./index-0e4427c8.js');
require('prop-types');
require('next/router');
require('./index-eadd5035.js');
require('./main-f1c77adb.js');
require('./entities-3f9d0f2f.js');
require('./ADInfeed-7cf51090.js');
require('react-bootstrap/Card');
require('./AdSlot.js');
require('./debounce-d4a2369b.js');
require('./isSymbol-03abbdf0.js');
require('./toNumber-5e1fac58.js');
require('./Beam.js');
require('./stringify-c9ac1214.js');
require('./asyncToGenerator-58c289d9.js');
require('./_library-dd23b178.js');
require('./Segment.js');
require('./AuthorComponent-c21aac7f.js');
require('./lodash-f0783643.js');
require('./ADlgInfeed-bf24708d.js');
require('./getContentCategory-f38a4c00.js');
require('./timeDifferenceCalc.js');
require('react-bootstrap/Breadcrumb');

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;
