import React from 'react';
import Media from 'react-bootstrap/Media';
import urlFor from './urlFor.js';
import { L as LazyLoad } from './index-35bdcc81.js';
import { c as clean_html_1 } from './entities-932b50cf.js';
import './slicedToArray-ca2c8b8d.js';
import './_commonjsHelpers-0c4b6f40.js';
import './web.dom.iterable-fdf034f5.js';
import './core.get-iterator-method-e903ff31.js';
import './index-0dbff1d1.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.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;
