import _extends from "@babel/runtime/helpers/extends";
import * as React from 'react';
import "./index.scss";
var banner2 = function banner2(_ref) {
  var bgImg = _ref.bgImg,
    text = _ref.text,
    font = _ref.font,
    fontSize = _ref.fontSize,
    fontColor = _ref.fontColor,
    fontOpacity = _ref.fontOpacity,
    tops = _ref.tops,
    MessageLintHight = _ref.MessageLintHight,
    textRoate = _ref.textRoate;
  var fontTextCss = {
    style: {
      opacity: fontOpacity / 100,
      color: fontColor,
      fontSize: fontSize + "px",
      fontFamily: font,
      top: tops + "%",
      transform: "translateX(-50%) rotate(" + textRoate + "deg)",
      height: "20px"
    }
  };
  // const bannerBgStyle = {
  //     style: {
  //         opacity: bgOpacity / 100,
  //         backgroundImage: `url(${bgImg}?imageMogr2/interlace/1)`,
  //     },
  // };
  var LiCSS = {
    style: {
      lineHeight: MessageLintHight + "vw"
    }
  };
  var result = text.split(/\n/g).filter(function (item) {
    return !!item;
  });
  return /*#__PURE__*/React.createElement("div", {
    className: "banner"
  }, /*#__PURE__*/React.createElement("img", {
    src: bgImg
  }), /*#__PURE__*/React.createElement("div", {
    className: "title"
  }, /*#__PURE__*/React.createElement("div", {
    className: "titleName"
  }, /*#__PURE__*/React.createElement("div", _extends({
    className: "title-text"
  }, fontTextCss), /*#__PURE__*/React.createElement("ul", null, result && result.length > 0 && result.map(function (item, index) {
    return /*#__PURE__*/React.createElement("li", _extends({
      key: index
    }, LiCSS), item);
  }))), /*#__PURE__*/React.createElement("div", _extends({
    className: "title-text"
  }, fontTextCss), text))));
};
export default banner2;