import React, { Component } from "react"
import "./index.scss"

class BlessingPrehead extends Component {
  constructor(props) {
    super(props)
    this.state = {
      rules: [
        "•	抽奖的次数可通过积福气获得，福气值越高，抽奖的次数越多;",
        "•	本次抽奖形式为开奖制，下一时段开启抽奖前会公布上一次中奖结果及名单，可关注“七月在线”服务号及时获取中奖结果，提醒参与下次抽奖;",
        "•	每个时段仅可使用一次抽奖机会，每日抽奖次数限当日用，抽奖次数不累加至次日;",
        "•	中奖后请及时填写邮寄信息，不填写视为主动放弃奖品；",
        "•	解释权归北京七月在线所有。",
      ],
    }
  }

  render() {
    const { rules } = this.state
    const { handleToHide } = this.props
    return (
      <div className="rule-popup__container">
        <div className="rule-popup">
          <h2 className="rule-popup__title">活动规则</h2>
          <ul className="rule-popup__list">
            {rules.map((item, index) => (
              <li className="rule-popup__item" key={index}>
                {item}
              </li>
            ))}
          </ul>
        </div>
        <i className="iconfont iconiconfront-2" onClick={handleToHide}></i>
      </div>
    )
  }
}

export default BlessingPrehead
