'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./3b5f8e2469c474c8d433c1c6926d8999.js'),
    c = require('./875171e7b864aa58d026d4fa0999fbd1.js')
  class d extends a.Component {
    constructor(a) {
      super(a), (this.state = { show: a.show })
    }
    componentWillReceiveProps(a) {
      a.show != this.props.show && this.setState({ show: !1 })
    }
    onCancelClick() {
      this.setState({ show: !1, result: !1 })
    }
    onConfirmClick() {
      this.setState({ show: !1, result: !0 })
    }
    onAnimationOut() {
      'function' == typeof this.props.callback &&
        this.props.callback(this.state.result)
    }
    render() {
      let d = this.props,
        e = ''
      try {
        e = decodeURIComponent(
          'string' === d.content ? d.content : d.content.toString()
        )
      } catch (a) {
        e = 'string' === d.content ? d.content : d.content.toString()
      }
      let f = e.split('\n').map((b, c) => {
        return a.createElement(
          'span',
          { key: c },
          b,
          a.createElement('br', null)
        )
      })
      return a.createElement(
        c,
        {
          show: this.state.show,
          style: { width: 420, marginLeft: -210 },
          inClassName: 'ui-animate-pull-down ui-dialog',
          outClassName: 'ui-animate-pull-up ui-dialog',
          onAnimationOut: this.onAnimationOut.bind(this)
        },
        a.createElement(
          'div',
          { className: 'ui-dialog-bd' },
          a.createElement(
            'div',
            { className: 'ui-msg' },
            a.createElement(
              'div',
              { className: 'ui-msg-icon' },
              a.createElement('i', { className: 'ui-icon-info' })
            ),
            a.createElement('p', { className: 'ui-msg-content' }, f)
          ),
          a.createElement(
            'div',
            { className: 'ui-msg-action' },
            a.createElement(
              'button',
              {
                className: 'ui-button ui-button-default',
                style: d.showCancel ? {} : b.displayNone,
                onClick: this.onCancelClick.bind(this)
              },
              d.cancelText || '\u53D6\u6D88'
            ),
            a.createElement(
              'button',
              {
                className: 'ui-button ui-button-primary',
                style: d.showConfirm ? {} : b.displayNone,
                onClick: this.onConfirmClick.bind(this)
              },
              d.confirmText || '\u786E\u5B9A'
            )
          )
        )
      )
    }
  }
  module.exports = d
})(require('lazyload'), require)
