text: "use strict";
  
  exports.__esModule = true;
  exports.StyledImage = void 0;
  
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
  
  var _utils = require("../../utils");
  
  var _defaultProps = require("../../default-props");
  
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
  
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  
  var FIT_MAP = {
    cover: 'cover',
    contain: 'contain'
  };
  var fitStyle = (0, _styledComponents.css)(["flex:1 1;overflow:hidden;object-fit:", ";"], function (props) {
    return FIT_MAP[props.fit];
  });
  var fillStyle = (0, _styledComponents.css)(["width:100%;height:100%;"]);
  
  var StyledImage = _styledComponents["default"].img.withConfig({
    displayName: "StyledImage",
    componentId: "ey4zx9-0"
  })(["", " ", " ", " ", " ", ""], _utils.genericStyles, function (props) {
    return props.fit && fitStyle;
  }, function (props) {
    return props.fillProp && fillStyle;
  }, function (props) {
    return props.theme.image && props.theme.image.extend;
  }, function (props) {
    return props.opacityProp && "opacity: " + (props.opacityProp === true ? props.theme.global.opacity.medium : props.theme.global.opacity[props.opacityProp] || props.opacityProp) + ";\n  ";
  });
  
  exports.StyledImage = StyledImage;
  StyledImage.defaultProps = {};
  Object.setPrototypeOf(StyledImage.defaultProps, _defaultProps.defaultProps);