"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _react = require("react");
require("./index.scss");
var LuckDrawSucc = /*#__PURE__*/function (_Component) {
  (0, _inheritsLoose2["default"])(LuckDrawSucc, _Component);
  function LuckDrawSucc() {
    return _Component.apply(this, arguments) || this;
  }
  var _proto = LuckDrawSucc.prototype;
  _proto.render = function render() {
    var _this$props = this.props,
      btnState = _this$props.btnState,
      prizeTextList = _this$props.prizeTextList,
      isOpenPrize = _this$props.isOpenPrize;
    var _setPrizeBgStyle = function _setPrizeBgStyle(imgUrl) {
      return {
        backgroundImage: "url(" + (imgUrl === 'prize' || imgUrl === 'no-prize' ? "//img.maimairen.com/low-code/components/blind-box/" + imgUrl + ".png" : imgUrl) + ")"
      };
    };
    return /*#__PURE__*/React.createElement("div", {
      className: "succ-window " + (isOpenPrize ? 'open-prize' : '')
    }, /*#__PURE__*/React.createElement("div", {
      className: "succ-window-close",
      onClick: btnState
    }), /*#__PURE__*/React.createElement("div", {
      className: "succ-window-content"
    }, /*#__PURE__*/React.createElement("div", {
      className: "succ-icon",
      style: _setPrizeBgStyle(prizeTextList.icon)
    }), /*#__PURE__*/React.createElement("div", {
      className: "succ-title"
    }, prizeTextList.msg), /*#__PURE__*/React.createElement("div", {
      className: "succ-prize-lv"
    }, prizeTextList.prizeLv[0]), /*#__PURE__*/React.createElement("div", {
      className: "succ-prize-content"
    }, prizeTextList.prizeLv[1]), /*#__PURE__*/React.createElement("div", {
      className: "buttons"
    }, prizeTextList.prizeLv[1] ? /*#__PURE__*/React.createElement(_button["default"], {
      className: "succ-btn succ-btn-receive"
    }, "\u9886\u53D6\u5956\u54C1") : '', /*#__PURE__*/React.createElement(_button["default"], {
      className: "succ-btn succ-btn-again",
      onClick: btnState
    }, "\u518D\u73A9\u4E00\u6B21"))));
  };
  return LuckDrawSucc;
}(_react.Component);
exports["default"] = LuckDrawSucc;