import _extends from "@babel/runtime/helpers/extends";
import * as React from 'react';
import "./index.scss";
var rules = function rules(_ref) {
  var text = _ref.text,
    font = _ref.font,
    fontSize = _ref.fontSize,
    fontColor = _ref.fontColor,
    fontOpacity = _ref.fontOpacity,
    MessageCssfont = _ref.MessageCssfont,
    MessageCssfontSize = _ref.MessageCssfontSize,
    MessageCssfontColor = _ref.MessageCssfontColor,
    MessageCssfontOpacity = _ref.MessageCssfontOpacity,
    MessageLintHight = _ref.MessageLintHight,
    bgImg = _ref.bgImg,
    rulesText = _ref.rulesText;
  var bottomBg = {
    style: {
      backgroundImage: "url(" + bgImg + "?imageMogr2/interlace/1)"
    }
  };
  var fontTextCss = {
    style: {
      color: fontColor,
      fontSize: fontSize + "px",
      fontFamily: font,
      opacity: fontOpacity / 100
    }
  };
  var MessageCss = {
    style: {
      color: MessageCssfontColor,
      fontSize: MessageCssfontSize + "px",
      fontFamily: MessageCssfont,
      opacity: MessageCssfontOpacity / 100
    }
  };
  var MessageLiCSS = {
    style: {
      lineHeight: MessageLintHight + "vw"
    }
  };
  var result = rulesText.split(/\n/g).filter(function (item) {
    return !!item;
  });
  return /*#__PURE__*/React.createElement("div", {
    className: "bottom"
  }, /*#__PURE__*/React.createElement("div", _extends({
    className: "title"
  }, fontTextCss), text), /*#__PURE__*/React.createElement("div", _extends({
    className: "activity-rules"
  }, MessageCss), /*#__PURE__*/React.createElement("ul", null, result && result.length > 0 && result.map(function (item, index) {
    return /*#__PURE__*/React.createElement("li", _extends({
      key: index
    }, MessageLiCSS), item);
  }))), /*#__PURE__*/React.createElement("div", _extends({
    className: "bottomBG"
  }, bottomBg)));
};
export default rules;