"use strict";

exports.__esModule = true;
exports.default = void 0;
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _novaIcons = require("@coorpacademy/nova-icons");
var _provider = _interopRequireDefault(require("../provider"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const CardImagePreview = ({
  image
}, {
  skin
}) => {
  const whiteColor = (0, _get2.default)('common.white', skin);
  const emptyIcon = !image ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyPictures, {
    className: _style.default.emptyIcon,
    style: {
      color: whiteColor
    }
  }) : null;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.image,
    style: {
      backgroundImage: image ? `url('${image}')` : 'none'
    },
    "data-name": "card-image-preview"
  }, emptyIcon);
};
CardImagePreview.contextTypes = {
  skin: _provider.default.childContextTypes.skin
};
CardImagePreview.propTypes = process.env.NODE_ENV !== "production" ? {
  image: _propTypes.default.string
} : {};
var _default = exports.default = CardImagePreview;
//# sourceMappingURL=index.js.map