"use strict";

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

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

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

function EmptyBackGround(props) {
  var imgSrc = props.imgSrc,
      content = props.content,
      behave = props.behave,
      styles = props.styles;

  function BeHave() {
    if (behave && behave.type === "button") {
      return /*#__PURE__*/_react["default"].createElement("div", {
        className: "grid-component-emptybg",
        style: {
          transform: "translateY(6px)"
        }
      }, /*#__PURE__*/_react["default"].createElement("img", {
        src: imgSrc
      }), /*#__PURE__*/_react["default"].createElement("div", {
        className: "grid-component-emptybg__text",
        style: {
          marginTop: "-26px"
        }
      }, content), /*#__PURE__*/_react["default"].createElement("a", {
        onClick: behave.onClick
      }, /*#__PURE__*/_react["default"].createElement("div", {
        className: "grid-component-emptybg__button"
      }, "+", behave.text)));
    }

    if (behave && behave.type === "moreinfo") {
      return /*#__PURE__*/_react["default"].createElement("div", {
        className: "grid-component-emptybg",
        style: {
          transform: "translateY(18px)"
        }
      }, /*#__PURE__*/_react["default"].createElement("img", {
        src: imgSrc
      }), /*#__PURE__*/_react["default"].createElement("div", {
        className: "grid-component-emptybg__text",
        style: {
          marginTop: "-26px"
        }
      }, content), /*#__PURE__*/_react["default"].createElement("a", {
        href: behave.link,
        target: "_blank",
        rel: "noreferrer"
      }, /*#__PURE__*/_react["default"].createElement("div", {
        className: "grid-component-emptybg__moreinfo"
      }, /*#__PURE__*/_react["default"].createElement("i", {
        className: "tu-icon-shoushi",
        style: {
          height: "18px",
          width: "18px"
        }
      }), " ", behave.text)));
    }

    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "grid-component-emptybg",
      style: styles
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: imgSrc
    }), /*#__PURE__*/_react["default"].createElement("div", {
      className: "grid-component-emptybg__text",
      style: {
        marginTop: "-26px"
      }
    }, content));
  }

  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, BeHave());
}