"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 /*#__PURE__*/_react.default.createElement(_ImageContainer.default, {
    src: path
  });
}

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