'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./9c906d27ca74e18d0deaaa231e71fdfa.js'),
    c = require('./fc137838572a83604db39acff8e909e0.js'),
    d = require('./eadce02c750c875a10680bcfedadec88.js'),
    e = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    f = require('./da7c31daaf542cf1796023d8e344b98a.js'),
    { connect: g } = require('react-redux')
  class h extends a.Component {
    onInfoClick(a) {
      a.stopPropagation(),
        this.props.toggleClickKey(d.NOTICECENTER),
        f('weapp_message_center')
    }
    render() {
      let b = {}
      return (
        this.props.titleShow || (b = { width: 22, height: 22 }),
        a.createElement(
          'div',
          {
            className: 'profile',
            onClick: this.onInfoClick.bind(this),
            id: 'toolbar-profile'
          },
          a.createElement(
            'div',
            { className: 'profile-avatar', style: b },
            !this.props.headUrl || 0 > this.props.headUrl.indexOf('http')
              ? a.createElement('i', {
                  className: 'ui-icon-default-avatar',
                  style: { width: 30, height: 30 }
                })
              : a.createElement('img', { src: this.props.headUrl, alt: '' })
          )
        )
      )
    }
  }
  module.exports = g(
    a => {
      let b = a.toolbar.config
      return { titleShow: b.title, headUrl: a.user.headUrl }
    },
    a => {
      return {
        userActions: e.bindActionCreators(b, a),
        toggleClickKey: e.bindActionCreators(c.toggleClickKey, a)
      }
    }
  )(h)
})(require('lazyload'), require)
