'use strict';

var React = require('react');
var reactBootstrap = require('react-bootstrap');
var urlFor = require('./urlFor.js');
var entities = require('./entities-df1aed86.js');
require('./slicedToArray-067dd3bc.js');
require('./_commonjsHelpers-06173234.js');
require('./web.dom.iterable-d98303e0.js');
require('./core.get-iterator-method-5643aa10.js');
require('./extends-be0d85bc.js');
require('./index-d48b231c.js');

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

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

var Hero = function Hero(_ref) {
  var data = _ref.data,
      client = _ref.client,
      imageHeight = _ref.imageHeight,
      imageWidth = _ref.imageWidth;
  var title = data.title,
      summary = data.summary,
      thumbnail = data.thumbnail,
      url = data.url;

  return React__default["default"].createElement(
    'a',
    { href: '/view/' + url.current },
    React__default["default"].createElement(
      reactBootstrap.Card,
      { bsPrefix: 'hero-card' },
      title && React__default["default"].createElement(
        reactBootstrap.Card.Header,
        { className: 'h4' },
        title
      ),
      thumbnail && client && React__default["default"].createElement(reactBootstrap.Card.Img, { src: urlFor({ source: thumbnail, client: client, imageHeight: imageHeight, imageWidth: imageWidth }), alt: title }),
      summary && React__default["default"].createElement(
        reactBootstrap.Card.Footer,
        { className: 'h6' },
        entities.clean_html_1(summary)
      )
    )
  );
};

module.exports = Hero;
