import React__default from 'react';
import Media from 'react-bootstrap/Media';
import urlFor from './urlFor.js';
import { L as LazyLoad } from './index-755f2cc2.js';
import { c as clean_html_1 } from './entities-6d9154b4.js';
import './slicedToArray-6ebcbfea.js';
import './_commonjsHelpers-0c4b6f40.js';
import './web.dom.iterable-ab4dea5c.js';
import './core.get-iterator-method-ea258bb1.js';
import './extends-1559c147.js';
import './index-3f5c03b2.js';
import 'react-dom';
import 'prop-types';

var ThumbnailCard = function ThumbnailCard(_ref) {
  var size = _ref.size,
      mediaData = _ref.mediaData,
      client = _ref.client,
      defaultImage = _ref.defaultImage;


  return React__default.createElement(
    'div',
    null,
    mediaData && mediaData.map(function (item, index) {
      return React__default.createElement(
        Media,
        { className: 'mb-3 thumbnail-card' },
        React__default.createElement(
          LazyLoad,
          { height: size },
          React__default.createElement('img', { width: size, height: size, className: 'mr-3', src: item.thumbnail ? urlFor({ client: client, source: item.thumbnail }) : defaultImage, alt: 'Generic placeholder' })
        ),
        React__default.createElement(
          Media.Body,
          null,
          React__default.createElement(
            'h5',
            null,
            item.title
          ),
          React__default.createElement(
            'p',
            null,
            clean_html_1(item.summary)
          )
        )
      );
    })
  );
};

export { ThumbnailCard as default };
