'use strict'
var _extends =
  Object.assign ||
  function(a) {
    for (var b, c = 1; c < arguments.length; c++)
      for (var d in ((b = arguments[c]), b))
        Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d])
    return a
  }
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./3b5f8e2469c474c8d433c1c6926d8999.js'),
    c = require('redux'),
    d = require('./a1dd553cc059d528bb0ef56afed53968.js'),
    e = require('./eadce02c750c875a10680bcfedadec88.js'),
    f = require('./5dc59f418d85e854c1a12d402d29e2d7.js'),
    g = require('./35a5c665bbd039baf968211c3ff216fc.js'),
    h = require('classnames'),
    { connect: i } = require('react-redux')
  class j extends a.Component {
    constructor(a) {
      super(a), (this.state = { lazyLoaded: !1, src: '' })
    }
    componentDidMount() {}
    componentWillUnmount() {}
    componentWillReceiveProps(a) {
      a.show && this.setState({ lazyLoaded: !0 })
    }
    playOrPause(a) {
      a.stopPropagation(),
        this.props.status == f.MUSIC_STATE_PLAY
          ? g.pauseMusic()
          : g.resumeMusic()
    }
    render() {
      let c = this.props,
        d = c.coverImgUrl ? {} : b.displayNone,
        e = c.title
      if ('background' == c.mode) {
        let a = c.singer
        e ? a && (e = `${a} - ${e}`) : (e = a)
      }
      return a.createElement(
        'div',
        { className: 'container' },
        a.createElement(
          'div',
          null,
          a.createElement(
            'div',
            null,
            a.createElement(
              'div',
              {
                className: 'music-item ui-flex',
                onClick: this.playOrPause.bind(this)
              },
              a.createElement(
                'div',
                { className: 'music-icon-area' },
                a.createElement('i', {
                  className: h({
                    'ui-icon-pause': c.status == f.MUSIC_STATE_PLAY,
                    'ui-icon-play': c.status == f.MUSIC_STATE_PAUSE
                  })
                })
              ),
              a.createElement(
                'div',
                { className: 'ui-flex-item' },
                a.createElement('h3', null, '\u6B63\u5728\u64AD\u653E'),
                a.createElement('p', null, e)
              ),
              a.createElement(
                'div',
                { style: d },
                a.createElement('img', {
                  className: 'music-thumb',
                  src: c.coverImgUrl
                })
              )
            )
          )
        )
      )
    }
  }
  module.exports = i(
    a => {
      const b = a.simulator.music || {}
      return _extends({}, b)
    },
    () => {
      return {}
    }
  )(j)
})(require('lazyload'), require)
