'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./3b5f8e2469c474c8d433c1c6926d8999.js')
  class c extends a.Component {
    constructor(a) {
      super(a), (this.state = { lazyLoaded: !1 })
    }
    componentWillReceiveProps(a) {
      a.show && this.setState({ lazyLoaded: !0 })
    }
    renderPlainTextToast() {
      return a.createElement(
        'div',
        { style: this.props.show ? {} : b.displayNone },
        a.createElement('div', {
          className: 'weui-mask_transparent',
          style: this.props.mask ? {} : b.displayNone
        }),
        a.createElement(
          'div',
          { className: 'weui-simple-toast' },
          a.createElement(
            'p',
            { className: 'weui-simple-toast__text' },
            this.props.title
          )
        )
      )
    }
    render() {
      if (!this.state.lazyLoaded) return null
      if (!this.props.image && !this.props.icon)
        return this.renderPlainTextToast()
      let c = null
      if (this.props.image)
        c = a.createElement('img', {
          className: 'weui-toast__icon',
          src: this.props.image
        })
      else {
        let b = 'weui-icon_toast '
        ;(b +=
          'loading' == this.props.icon
            ? 'weui-loading'
            : 'weui-icon-success-no-circle'),
          (c = a.createElement('i', { className: b }))
      }
      return a.createElement(
        'div',
        { style: this.props.show ? {} : b.displayNone },
        a.createElement('div', {
          className: 'weui-mask_transparent',
          style: this.props.mask ? {} : b.displayNone
        }),
        a.createElement(
          'div',
          { className: 'weui-toast', style: { top: '50%', marginTop: -48 } },
          c,
          a.createElement(
            'p',
            { className: 'weui-toast__content' },
            this.props.title
          )
        )
      )
    }
  }
  module.exports = c
})(require('lazyload'), require)
