'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    c = require('./3b5f8e2469c474c8d433c1c6926d8999.js'),
    d = require('./ActionSheet.js'),
    e = require('./ba23d8b47b1f4ea08b9fd49939b9443f.js'),
    f = require('./e3681b47a6ce46a8998b8cdff40bdb12.js'),
    { connect: g } = require('react-redux')
  class h extends a.Component {
    constructor(a) {
      super(a)
    }
    onSelect(a) {
      let b = this.props
      if (0 == a && b.shareBtnState.show) {
        let a = {
          path: '',
          dynamic: !!b.shareBtnState.isDynamic,
          mode: b.shareBtnState.withShareTicket ? 'withShareTicket' : 'common'
        }
        f.triggerOnEvent({ eventName: 'onShareAppMessage', data: a })
      }
      this.hide()
    }
    onCancel() {
      this.hide()
    }
    onMaskClick() {
      this.hide()
    }
    hide() {
      this.props.setRightBtnActionSheet({ show: !1 })
    }
    render() {
      const b = this.props
      return a.createElement(d, {
        show: b.show,
        style: b.style,
        landscape: b.landscape,
        itemList: b.itemList,
        cancelColor: b.cancelColor,
        cancelText: b.cancelText,
        itemColor: b.itemColor,
        onSelect: this.onSelect.bind(this),
        onCancel: this.onCancel.bind(this),
        onMaskClick: this.onMaskClick.bind(this)
      })
    }
  }
  module.exports = g(
    a => {
      let b = a.simulator.menu || {},
        c = b.style || 'dark',
        d =
          a.simulator.orientation &&
          'landscape' == a.simulator.orientation.value,
        e = a.simulator.rightBtnActionSheet,
        f = a.simulator.currentWebviewID,
        g = a.simulator.webviewInfos[f] || {},
        h = g.shareBtnState || {},
        i = e.show,
        j = h.show
          ? ['\u8F6C\u53D1']
          : ['\u5F53\u524D\u9875\u9762\u672A\u8BBE\u7F6E\u5206\u4EAB']
      return {
        style: b.style,
        cancelText: '\u53D6\u6D88',
        cancelColor: 'light' == c ? '#000000' : '#ffffff',
        itemColor: 'light' == c ? '#000000' : '#ffffff',
        alertIndex: -1,
        show: i,
        shareBtnState: h,
        itemList: j,
        landscape: d
      }
    },
    a => {
      return {
        setRightBtnActionSheet: b.bindActionCreators(
          e.setRightBtnActionSheet,
          a
        )
      }
    }
  )(h)
})(require('lazyload'), require)
