"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var React = _interopRequireWildcard(require("react"));
var _excluded = ["imgSrc", "onClick", "children"];
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var Image = function Image(_ref) {
  var imgSrc = _ref.imgSrc,
    onClick = _ref.onClick,
    children = _ref.children,
    otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
  var _otherProps = otherProps || {};
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
    className: "image"
  }, _otherProps, {
    onClick: onClick
  }), imgSrc ? /*#__PURE__*/React.createElement("img", {
    src: imgSrc,
    alt: ""
  }) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E"));
};
Image.displayName = 'Image';
var _default = exports["default"] = Image;