'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./3b5f8e2469c474c8d433c1c6926d8999.js'),
    c = require('./59394b696f4be6762ad2b2bf3e1575a7.js')
  class d extends a.Component {
    constructor(a) {
      super(a)
    }
    componentWillReceiveProps(a) {
      a.show && (a.current == this.props.current || (this.current = a.current))
    }
    onPickerSelect(a) {
      this.current = a
    }
    hide() {
      this.props.hidePicker({
        callbackID: this.props.callbackID,
        webviewID: this.props.webviewID,
        res: { errMsg: 'showPickerView:cancel' }
      })
    }
    confirm() {
      const a =
        'Number' === Object.prototype.toString.call(this.current).slice(8, -1)
          ? this.current
          : this.props.current
      this.props.hidePicker({
        callbackID: this.props.callbackID,
        webviewID: this.props.webviewID,
        res: { errMsg: 'showPickerView:ok', index: parseInt(a) }
      })
    }
    render() {
      let d = this.props
      return a.createElement(
        'div',
        { style: d.show ? {} : b.displayNone },
        a.createElement('div', {
          className: 'weui-mask weui-animate-fade-in',
          onClick: this.hide.bind(this)
        }),
        a.createElement(
          'div',
          { className: 'weui-picker weui-animate-slide-up' },
          a.createElement(
            'div',
            { className: 'weui-picker__hd' },
            a.createElement(
              'a',
              {
                className: 'weui-picker__action',
                onClick: this.hide.bind(this)
              },
              '\u53D6\u6D88'
            ),
            a.createElement(
              'a',
              {
                className: 'weui-picker__action',
                onClick: this.confirm.bind(this)
              },
              '\u786E\u5B9A'
            )
          ),
          a.createElement(
            'div',
            { className: 'weui-picker__bd' },
            a.createElement(c, {
              array: d.array,
              current: d.current,
              onPickerSelect: this.onPickerSelect.bind(this)
            })
          )
        )
      )
    }
  }
  module.exports = d
})(require('lazyload'), require)
