import './_commonjsHelpers-0c4b6f40.js';
import './core.get-iterator-method-86d4db69.js';
import './web.dom.iterable-f8f967cd.js';
import React from 'react';
import 'prop-types';
import 'react-dom';
import './slicedToArray-67a08c9c.js';
import './index-51a80699.js';
import urlFor from './urlFor.js';
import { L as LazyLoad } from './index-6c12bdd5.js';
import { c as clean_html_1 } from './entities-7cc3bf45.js';
import Media from 'react-bootstrap/Media';

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


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

export default ThumbnailCard;
