'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 = { lazyLoaded: a.show, show: a.show })
    }
    componentWillReceiveProps(a) {
      a.show != this.props.show &&
        this.setState({ lazyLoaded: !0, show: a.show })
    }
    onSelectClick(a, b) {
      b.stopPropagation(),
        'function' == typeof this.props.onSelectClick &&
          this.props.onSelectClick(a)
    }
    render() {
      if (!this.state.lazyLoaded) return null
      let b = this.props,
        d = b.list.map((c, d) => {
          return a.createElement(
            'div',
            {
              className: 'ui-dropdown-item',
              key: d,
              index: d,
              onClick: this.onSelectClick.bind(this, d)
            },
            a.createElement(
              'div',
              { className: 'ui-dropdown-item-hd' },
              d == b.current
                ? a.createElement('i', { className: 'ui-icon-tick' })
                : null
            ),
            a.createElement(
              'div',
              { className: 'ui-dropdown-item-bd' },
              a.createElement('span', null, c.name),
              c.desc
                ? a.createElement('span', { className: 'ui-desc' }, c.desc)
                : null
            )
          )
        })
      return a.createElement(
        c,
        {
          show: this.state.show,
          style: {
            left: this.props.left || 0,
            top: this.props.top || 0,
            width: this.props.width || 'auto'
          },
          inClassName: 'ui-popover',
          outClassName: 'ui-animate-fadeOut ui-popover'
        },
        a.createElement(
          'div',
          {
            className: 'ui-dropdown',
            id: b.id,
            style: { height: this.props.height || 'auto' }
          },
          d
        )
      )
    }
  }
  module.exports = d
})(require('lazyload'), require)
