'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 })
    }
    handleConfirm() {
      let a = this.props,
        b = { errMsg: `${a.api}:ok` }
      a.group &&
        (b.shareInfos = [
          { shareKey: a.group.share_key, shareName: a.group.share_name }
        ]),
        this.props.hideShare({ callbackID: a.callbackID, res: b })
    }
    handleCancel() {
      let a = this.props
      this.props.hideShare({
        callbackID: a.callbackID,
        res: { errMsg: `${a.api}:cancel` }
      })
    }
    render() {
      if (!this.state.lazyLoaded) return null
      let c = this.props
      return a.createElement(
        'div',
        { className: 'share-dialog', style: c.show ? {} : b.displayNone },
        a.createElement('div', { className: 'weui-mask' }),
        a.createElement(
          'div',
          { className: 'weui-dialog' },
          a.createElement(
            'div',
            { className: 'weui-dialog__bd' },
            a.createElement(
              'h3',
              { className: 'share-dialog-title' },
              '\u53D1\u9001\u7ED9\uFF1A'
            ),
            a.createElement(
              'div',
              { className: 'share-dialog-target ui-flex' },
              a.createElement(
                'div',
                { className: 'share-dialog-avatar' },
                a.createElement('i', { className: 'ui-icon-default-avatar' })
              ),
              a.createElement(
                'div',
                { className: 'share-dialog-nickname' },
                a.createElement('span', null, ' bear ')
              )
            ),
            a.createElement(
              'div',
              { className: 'share-dialog-desc' },
              a.createElement('p', null, c.desc)
            ),
            a.createElement(
              'div',
              { className: 'share-dialog-content' },
              a.createElement(
                'div',
                { className: 'share-app' },
                a.createElement(
                  'div',
                  { className: 'share-app-hd' },
                  a.createElement(
                    'h3',
                    { className: 'share-app-title' },
                    c.title
                  )
                ),
                a.createElement(
                  'div',
                  { className: 'share-app-bd' },
                  a.createElement(
                    'div',
                    { className: 'share-app-thumb', style: { maxHeight: 183 } },
                    a.createElement('img', { src: c.imageUrl })
                  )
                ),
                a.createElement(
                  'div',
                  { className: 'share-app-ft' },
                  a.createElement(
                    'p',
                    { className: 'share-app-tail' },
                    '\u5C0F\u7A0B\u5E8F'
                  )
                )
              )
            )
          ),
          a.createElement(
            'div',
            { className: 'weui-dialog__ft' },
            a.createElement(
              'a',
              {
                className:
                  'weui-dialog__btn weui-dialog__btn_default auto_test_btn_default',
                'data-type': 'share',
                onClick: this.handleCancel.bind(this)
              },
              '\u53D6\u6D88'
            ),
            a.createElement(
              'a',
              {
                className:
                  'weui-dialog__btn weui-dialog__btn_primary auto_test_btn_primary',
                'data-type': 'share',
                onClick: this.handleConfirm.bind(this)
              },
              '\u53D1\u9001'
            )
          )
        )
      )
    }
  }
  module.exports = c
})(require('lazyload'), require)
