'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    b = require('redux'),
    c = require('./fc137838572a83604db39acff8e909e0.js'),
    d = require('./eadce02c750c875a10680bcfedadec88.js'),
    e = require('./3c55dff3626a3ee184d599f076158345.js'),
    f = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    g = require('./common/locales/index.js'),
    { connect: h } = require('react-redux')
  class i extends a.Component {
    clearAuth(a) {
      a.stopPropagation(), this.props.toolbarActions.clearAuth()
    }
    cleanFileCache(a) {
      a.stopPropagation(), this.props.toolbarActions.cleanFileCache()
    }
    cleanStorageCache(a) {
      a.stopPropagation(), this.props.toolbarActions.cleanStorageCache()
    }
    clearWebviewCache(a) {
      a.stopPropagation(), this.props.toolbarActions.cleanWebViewCache()
    }
    clearSession(a) {
      a.stopPropagation(), this.props.toolbarActions.clearSession()
    }
    clearAll(a) {
      a.stopPropagation(), this.props.toolbarActions.cleanAll()
    }
    onSelectClick(a, b) {
      0 == a
        ? this.cleanStorageCache(b)
        : 1 == a
          ? this.cleanFileCache(b)
          : 2 == a
            ? this.clearAuth(b)
            : 3 === a
              ? this.clearWebviewCache(b)
              : 4 === a
                ? this.clearSession(b)
                : 5 === a && this.clearAll(b)
    }
    render() {
      let b = this.props,
        c = g.config,
        d = [
          c.MENU_CLEAR_STORAGE_CACHE,
          c.MENU_CLEAR_FILE_CACHE,
          c.MENU_CLEAR_AUTH_CACHE,
          c.MENU_CLEAR_WEBVIEW_CACHE,
          c.MENU_CLEAR_SESSION,
          c.MENU_CLEAR_ALL
        ]
      return a.createElement(e, {
        id: 'toolbar-cleancache-popup',
        show: b.show,
        left: b.left,
        top: b.top,
        right: b.right,
        list: d,
        divider: [4],
        onSelectClick: this.onSelectClick.bind(this)
      })
    }
  }
  module.exports = h(
    a => {
      let b = a.toolbar.clickKey == d.CLEANCACHE
      return { show: b }
    },
    a => {
      return { toolbarActions: f.bindActionCreators(c, a) }
    }
  )(i)
})(require('lazyload'), require)
