'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./3b5f8e2469c474c8d433c1c6926d8999.js'),
    c = require('./9fdd4ac31a05c27355910f0d74accd4c.js'),
    d = require('classnames'),
    { enterBackground: e } = require('./a3959bb900db9f65ed2e9c5dfa6977b7.js')
  class f extends a.Component {
    constructor(a) {
      super(a)
    }
    componentDidMount() {}
    componentWillUnmount() {}
    onRightExitBtnClick() {
      e('toolbarAndBackMode'),
        this.props.setBackground({ show: !this.props.backgroundShow })
    }
    render() {
      let c = this.props,
        e = {
          height: c.height,
          backgroundColor:
            c.backgroundColor ||
            (c.useCapsuleNavigationBar ? '#3267CA' : '#000000'),
          transition: c.transition,
          zIndex: 10,
          visibility:
            c.useCapsuleNavigationBar && c.customNavigationBar
              ? 'hidden'
              : 'visible'
        },
        f = { color: c.frontColor },
        g = { color: c.frontColor },
        h = c.showLeftBtn ? {} : { visibility: 'hidden' },
        i = c.showRightBtn ? {} : { visibility: 'hidden' }
      i.color = c.frontColor
      let j = null
      if (c.rightBtnIconPath) {
        let b = `${c.baseURL}${c.rightBtnIconPath}?r=${Math.random()}`
        ;(i.height = 30),
          (j = a.createElement('img', {
            style: i,
            src: b,
            onClick: this.props.onCustomRightClick
          }))
      } else if (c.rightBtnText)
        j = a.createElement(
          'p',
          {
            style: i,
            onClick: this.props.onCustomRightClick,
            id: 'simulator-navigationbar-right'
          },
          c.rightBtnText
        )
      else if (c.useCapsuleNavigationBar) {
        let b = null
        ;(b = c.showRecordWording
          ? a.createElement('i', {
              className: 'ui-icon-voice ui-animate-fadeInOut'
            })
          : c.showPositioning
            ? a.createElement('i', {
                className: 'ui-icon-poi ui-animate-fadeInOut'
              })
            : a.createElement('i', { className: 'ui-icon-menu' })),
          (j = a.createElement(
            'div',
            { className: 'capsule', style: { visibility: 'visible' } },
            a.createElement(
              'a',
              {
                onClick: this.props.onRightBtnClick,
                id: 'simulator-navigationbar-right'
              },
              b
            ),
            a.createElement('span', { className: 'capsule-sep' }),
            a.createElement(
              'a',
              {
                onClick: this.onRightExitBtnClick.bind(this),
                id: 'simulator-navigationbar-right-exit'
              },
              a.createElement('i', { className: 'ui-icon-exit' })
            )
          ))
      } else
        j = a.createElement(
          'a',
          {
            style: i,
            onClick: this.props.onRightBtnClick,
            id: 'simulator-navigationbar-right'
          },
          a.createElement('i', { className: 'ui-icon-menu' })
        )
      let k = null
      return (
        (k = c.leftBtnText
          ? a.createElement('p', null, c.leftBtnText)
          : a.createElement(
              'a',
              null,
              a.createElement('i', { className: 'ui-icon-arrow-left' })
            )),
        a.createElement(
          'div',
          {
            className: d('navigator', {
              'navigator-white': 'black' != c.titleStyle,
              'navigator-black': 'black' == c.titleStyle
            }),
            style: e
          },
          a.createElement(
            'div',
            {
              className: 'navigator-hd auto_test_navigation_bar_left_btn',
              style: h,
              onClick: this.props.onLeftBtnClick,
              id: 'simulator-navigationbar-left'
            },
            k
          ),
          a.createElement(
            'div',
            { className: 'navigator-bd', style: f },
            a.createElement(
              'h3',
              { className: 'navigator-title' },
              c.showLoading
                ? a.createElement('i', { className: 'ui-icon-spinner' })
                : '',
              c.title
            ),
            a.createElement(
              'p',
              {
                className: 'navigator-subtitle',
                style:
                  c.showRecordWording && !c.useCapsuleNavigationBar
                    ? {}
                    : b.displayNone
              },
              a.createElement('i', { className: 'ui-icon-recording' })
            )
          ),
          a.createElement(
            'div',
            { className: 'navigator-ft' },
            c.useCapsuleNavigationBar
              ? null
              : a.createElement(
                  'a',
                  {
                    style: c.home ? {} : b.displayNone,
                    onClick: c.onHomeClick,
                    id: 'simulator-navigationbar-home'
                  },
                  a.createElement('i', { className: 'ui-icon-home' })
                ),
            j
          )
        )
      )
    }
  }
  module.exports = f
})(require('lazyload'), require)
