import _extends from "@babel/runtime/helpers/extends";
import "./index.scss";
import * as React from 'react';
var rules03 = function rules03(rules03Props) {
  var bgColor = rules03Props.bgColor,
    lineHeight = rules03Props.lineHeight,
    textColor = rules03Props.textColor,
    textFontFamily = rules03Props.textFontFamily,
    textFontSize = rules03Props.textFontSize,
    titleBold = rules03Props.titleBold,
    titleTextAlign = rules03Props.titleTextAlign,
    titleFontSize = rules03Props.titleFontSize,
    titleFontFamily = rules03Props.titleFontFamily,
    titleColor = rules03Props.titleColor,
    textRules = rules03Props.textRules,
    contentBgColor = rules03Props.contentBgColor,
    title = rules03Props.title;
  var getContent = function getContent(item) {
    var result = item && item.toString().split(/\n/g).filter(function (e) {
      return !!e;
    });
    return result;
  };
  var mainStyle = {
    style: {
      backgroundColor: bgColor,
      lineHeight: lineHeight + "px"
    }
  };
  var titleStyle = {
    style: {
      fontWeight: titleBold ? 'bolder' : 'normal',
      textAlign: titleTextAlign,
      fontSize: titleFontSize,
      fontFamily: titleFontFamily,
      color: titleColor,
      paddingBottom: '2vw'
    }
  };
  var textStyle = {
    style: {
      color: textColor,
      fontSize: textFontSize + "px",
      fontFamily: textFontFamily
    }
  };
  var otherStyle = {
    style: {
      background: contentBgColor
    }
  };
  return /*#__PURE__*/React.createElement("div", _extends({
    className: "rules"
  }, mainStyle), /*#__PURE__*/React.createElement("div", titleStyle, title), /*#__PURE__*/React.createElement("div", _extends({
    className: "rules-content"
  }, otherStyle), /*#__PURE__*/React.createElement("ul", textStyle, textRules && getContent(textRules).map(function (item2, index2) {
    return /*#__PURE__*/React.createElement("li", {
      key: index2
    }, item2);
  }))));
};
export default rules03;