'use strict';

var _typeof = require('./typeof-220bbf73.js');
var React = require('react');
var index = require('./index-65621b6c.js');
var urlFor = require('./urlFor.js');
var moment = require('./moment-f730814d.js');
var styleInject_es = require('./style-inject.es-dcee06b6.js');
var BlockContent = require('./BlockContent-96b44364.js');
var getSerializers = require('./index-1c8109ca.js');
require('./_commonjsHelpers-06173234.js');
require('./core.get-iterator-method-5643aa10.js');
require('./web.dom.iterable-d98303e0.js');
require('./_is-array-54228b29.js');
require('./extends-be0d85bc.js');
require('./_library-dd23b178.js');
require('react-dom');
require('prop-types');
require('./slicedToArray-067dd3bc.js');
require('./index-d48b231c.js');
require('react-bootstrap');
require('./index-7435b964.js');
require('next/router');
require('./index-187c967e.js');
require('./Beam.js');
require('./stringify-f7a37a8d.js');
require('./asyncToGenerator-65df6bf8.js');
require('./_set-species-0c7864a2.js');
require('./_iter-detect-b1df62f0.js');
require('./Segment.js');
require('./main-812888f1.js');
require('./urlForFile-5084fc48.js');
require('./brightcove-react-player-loader.es-35faab67.js');
require('./_object-to-array-9337ba83.js');
require('./keys-e982b3fa.js');
require('./_object-sap-d1978572.js');
require('react-bootstrap/Modal');
require('react-bootstrap/Button');
require('react-bootstrap/Form');
require('react-ga');
require('./GroupDeck.js');
require('./smoothscroll-99df7f93.js');
require('./SocialShare.js');
require('next/head');
require('react-share');
require('./toConsumableArray-d7797c2b.js');
require('react-bootstrap/Pagination');
require('./entities-df1aed86.js');
require('./AdSlot.js');
require('./debounce-d4a2369b.js');
require('./isSymbol-03abbdf0.js');
require('./toNumber-5e1fac58.js');
require('react-bootstrap/Row');
require('react-bootstrap/Col');
require('./inherits-e47b5342.js');
require('./define-property-e8404b64.js');
require('./index.esm-d81454e7.js');
require('./iconBase-be4097c0.js');
require('react-bootstrap/Figure');
require('react-bootstrap/OverlayTrigger');
require('react-bootstrap/Tooltip');
require('react-bootstrap/Popover');
require('./checkSisterSite-c3a4ac98.js');

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

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

var css = ".MediaSeriesCard-module_article__SAFYK {\n  width: 100%;\n  margin: 0 0 1rem 0;\n}\n.MediaSeriesCard-module_article__SAFYK a {\n  display: flex;\n  width: 100%;\n  color: #000000;\n}\n.MediaSeriesCard-module_thumb__3jRAU {\n  width: 25%;\n}\n.MediaSeriesCard-module_thumb__3jRAU img {\n  width: 100%;\n  height: auto;\n}\n.MediaSeriesCard-module_info__3L7_o {\n  width: 75%;\n  font-size: 1rem;\n}\n.MediaSeriesCard-module_info__3L7_o h2 {\n  font-weight: bold;\n  font-size: 1.25rem;\n  margin: 0;\n}\n.MediaSeriesCard-module_published__E4oiz {\n  color: #6d6d6d;\n  margin: 0;\n}\n.MediaSeriesCard-module_summary__1xanh {\n  margin: 0.5rem 0 0 0;\n}\n.MediaSeriesCard-module_author__e5fuR {\n  margin: 0;\n}\n.MediaSeriesCard-module_author__e5fuR span {\n  color: #6d6d6d;\n}\n.MediaSeriesCard-module_name__2m5KY {\n  font-size: 1.3rem;\n  font-weight: bold;\n}\n@media only screen and (max-width: 568px) {\n  .MediaSeriesCard-module_article__SAFYK {\n    margin: 1rem 0;\n    box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n  }\n  .MediaSeriesCard-module_article__SAFYK a {\n    flex-direction: column;\n    align-items: center;\n  }\n  .MediaSeriesCard-module_thumb__3jRAU {\n    overflow: hidden;\n    width: 100%;\n    margin-bottom: 1rem;\n  }\n  .MediaSeriesCard-module_thumb__3jRAU img{\n    border-radius: 10px 10px 0 0;    \n  }\n  .MediaSeriesCard-module_thumb__3jRAU figure {\n    margin: 0;\n  }\n  .MediaSeriesCard-module_info__3L7_o {\n    width: 90%;\n    padding: 0rem !important;\n  }\n  .MediaSeriesCard-module_info__3L7_o h2 {\n    font-size: 1rem;\n  }\n  .MediaSeriesCard-module_name__2m5KY {\n    font-size: 1rem;\n    \n  }\n}\n";
var styles = { "article": "MediaSeriesCard-module_article__SAFYK", "thumb": "MediaSeriesCard-module_thumb__3jRAU", "info": "MediaSeriesCard-module_info__3L7_o", "published": "MediaSeriesCard-module_published__E4oiz", "summary": "MediaSeriesCard-module_summary__1xanh", "author": "MediaSeriesCard-module_author__e5fuR", "name": "MediaSeriesCard-module_name__2m5KY" };
styleInject_es.styleInject(css);

var MediaSeriesCard = function MediaSeriesCard(props) {
  var data = props.data,
      variant = props.variant,
      defaultImage = props.defaultImage,
      client = props.client;


  return React__default["default"].createElement(
    'div',
    { className: 'media-series-article ' + styles.article },
    React__default["default"].createElement(
      'a',
      { href: '/' + data.parentUrl + '/' + data.identifier.current, style: variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
      React__default["default"].createElement(
        'div',
        { className: 'media-series-thumbnail ' + styles.thumb },
        data.thumbnail && data.thumbnail.asset && React__default["default"].createElement(
          'figure',
          null,
          React__default["default"].createElement(
            index.LazyLoad,
            null,
            React__default["default"].createElement('img', {
              src: data.thumbnail && data.thumbnail.asset ? urlFor({ client: client, source: data.thumbnail }) : data.thumbnail && _typeof._typeof(data.thumbnail == 'string') ? data.thumbnail : defaultImage
            })
          )
        )
      ),
      React__default["default"].createElement(
        'div',
        { className: 'media-series-info ' + styles.info, style: variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
        React__default["default"].createElement(
          'div',
          { className: 'media-series-name ' + styles.name },
          data.name
        ),
        data.published && React__default["default"].createElement(
          'p',
          { className: 'media-series-published ' + styles.published },
          moment.moment(data.published).format('MMMM Do YYYY')
        ),
        data.authorMapping && data.authorMapping.displayName && React__default["default"].createElement(
          'p',
          { className: 'media-series-author ' + styles.author },
          'By ',
          React__default["default"].createElement(
            'span',
            null,
            data.authorMapping.displayName
          )
        ),
        data.description && React__default["default"].createElement(
          'div',
          { className: 'media-series-desc' },
          React__default["default"].createElement(BlockContent.BlockContent, { blocks: data.description, serializers: getSerializers.getSerializers(client) })
        )
      )
    )
  );
};

module.exports = MediaSeriesCard;
