"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = BlobImage;

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _ImageContainer = _interopRequireDefault(require("../../containers/media/ImageContainer"));

var _blobHelpers = require("../../helpers/blobHelpers");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const propTypes = {
  csid: _propTypes.default.string.isRequired,
  derivative: _propTypes.default.string
};
const defaultProps = {
  derivative: 'Thumbnail'
};

function BlobImage(props) {
  const {
    csid,
    derivative
  } = props;
  const path = (0, _blobHelpers.getDerivativePath)(csid, derivative);
  return (// TODO: Is there any alt text that would be helpful? Leaving it off for now.

    /* eslint-disable jsx-a11y/img-has-alt */
    _react.default.createElement(_ImageContainer.default, {
      src: path
    })
    /* eslint-enable jsx-a11y/img-has-alt */

  );
}

BlobImage.propTypes = propTypes;
BlobImage.defaultProps = defaultProps;