'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    c = require('./e3681b47a6ce46a8998b8cdff40bdb12.js'),
    d = require('./ba23d8b47b1f4ea08b9fd49939b9443f.js'),
    { enterBackground: e } = require('./a3959bb900db9f65ed2e9c5dfa6977b7.js'),
    { connect: f } = require('react-redux')
  class g extends a.Component {
    constructor(a) {
      super(a)
    }
    onRightExitBtnClick() {
      e('toolbarAndBackMode'),
        this.props.setBackground({ show: !this.props.backgroundShow })
    }
    render() {
      const b = this.props,
        c = { backgroundColor: '#fff' }
      return a.createElement(
        'div',
        {
          className: 'capsule',
          style: {
            zIndex: 999,
            right: 10,
            top: b.top,
            position: 'absolute',
            borderRadius: 27,
            backgroundSize: 'cover',
            background: 'rgba(0,0,0,.6)'
          }
        },
        a.createElement(
          'a',
          { onClick: b.onRightBtnClick, id: 'simulator-navigationbar-right' },
          a.createElement('i', { className: 'ui-icon-menu', style: c })
        ),
        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', style: c })
        )
      )
    }
  }
  module.exports = f(
    a => {
      let b = a.simulator.currentWebviewID,
        c = a.simulator.webviewInfos[b],
        d = a.toolbar.deviceInfo,
        e = a.simulator.appConfig && a.simulator.appConfig.showStatusBar,
        f = 10,
        g =
          a.simulator.orientation &&
          'landscape' == a.simulator.orientation.value
      return (
        g
          ? (f = 10)
          : 'iPhone X' == d.model
            ? (f = 44)
            : e && (f += d.statusbarHeight),
        {
          top: f * a.toolbar.deviceScale,
          backgroundShow: a.simulator.backgroundShow
        }
      )
    },
    a => {
      return {
        onRightBtnClick: () => {
          a(d.setRightBtnActionSheet({ show: !0 })),
            c.triggerOnEvent({
              eventName: 'onTapNavigationBarRightButton',
              data: {}
            })
        },
        setBackground: b => {
          a(d.setBackground(b))
        }
      }
    }
  )(g)
})(require('lazyload'), require)
