'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('classnames'),
    c = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    d = require('./ba23d8b47b1f4ea08b9fd49939b9443f.js'),
    { connect: e } = require('react-redux')
  class f extends a.Component {
    constructor(a) {
      super(a), (this.state = { focus: !1, query: '' })
    }
    onInputKeyUp(a) {
      a.stopPropagation()
      let b = a.keyCode
    }
    onInputChange(a) {
      this.setState({ query: a.currentTarget.value })
    }
    onBarClick(a) {
      a.stopPropagation(),
        this.setState({ focus: !0 }),
        this.refs.searchinput.focus()
    }
    onClearClick(a) {
      a.stopPropagation(), this.setState({ query: '' })
    }
    onCancelClick(a) {
      a.stopPropagation(), this.setState({ focus: !1 })
    }
    render() {
      return a.createElement(
        'div',
        {
          className: b('weui-search-bar', {
            'weui-search-bar_focusing': this.state.focus
          }),
          onClick: this.onBarClick.bind(this)
        },
        a.createElement(
          'div',
          { className: 'weui-search-bar__form' },
          a.createElement(
            'div',
            { className: 'weui-search-bar__box' },
            a.createElement('i', { className: 'weui-icon-search' }),
            a.createElement('input', {
              type: 'search',
              className: 'weui-search-bar__input',
              ref: 'searchinput',
              placeholder:
                '\u6682\u4E0D\u652F\u6301\u81EA\u5B9A\u4E49\u641C\u7D22\uFF0C\u8BF7\u4F7F\u7528\u6761\u4EF6\u7F16\u8BD1',
              required: '',
              onKeyUp: this.onInputKeyUp.bind(this),
              onChange: this.onInputChange.bind(this)
            }),
            a.createElement('a', {
              href: 'javascript:',
              className: 'weui-icon-clear',
              onClick: this.onClearClick.bind(this)
            })
          ),
          a.createElement(
            'label',
            { className: 'weui-search-bar__label' },
            a.createElement('i', { className: 'weui-icon-search' }),
            a.createElement('span', null, '\u641C\u7D22')
          )
        ),
        a.createElement(
          'a',
          {
            href: 'javascript:',
            className: 'weui-search-bar__cancel-btn',
            onClick: this.onCancelClick.bind(this)
          },
          '\u53D6\u6D88'
        )
      )
    }
  }
  module.exports = f
})(require('lazyload'), require)
