'use strict'
!(function(require, directRequire) {
  const a = require('react'),
    { connect: b } = require('react-redux'),
    c = require('./e98c60a262d8d98e69e574a9d12a21df.js'),
    d = require('./b627c3d043d88f996c8bbc3f8ee8238f.js'),
    e = require('./56c390e04c10e91a4aa2a2c19d9a885d.js'),
    f = require('./5498e660c05c574f739a28bd5d202cfa.js'),
    g = require('./6620a0cf7dad1b400d60f0fdae40f524.js'),
    h = b(
      a => {
        let b = a.settings,
          c = {}
        switch (a.window.mainWindow) {
          case e.MAIN_WINDOW_TYPE.DEV:
            c = {
              appearance: !0,
              edit: !0,
              proxy: !0,
              notification: !0,
              shortcut: !0
            }
            break
          case e.MAIN_WINDOW_TYPE.WEB_DEBUGGER:
            c = { proxy: !0, notification: !0 }
            break
          case e.MAIN_WINDOW_TYPE.LOGIN:
            c = { proxy: !0 }
            break
          case e.MAIN_WINDOW_TYPE.ENTRANCE:
          case e.MAIN_WINDOW_TYPE.SELECT_PROJECT:
          case e.MAIN_WINDOW_TYPE.CREATE_PROJECT:
            c = { proxy: !0, notification: !0 }
            break
          default:
            c = {
              appearance: !0,
              edit: !0,
              proxy: !0,
              notification: !0,
              shortcut: !0
            }
        }
        let d = {},
          g = b.currentCategory || 'proxy'
        return (
          a.window.mainWindow === e.MAIN_WINDOW_TYPE.DEV
            ? (d = b || {})
            : ((d = { proxy: b ? b.proxy || {} : {} }), (g = 'proxy')),
          {
            currentCategory: g,
            enabled: c,
            show: a.settings.show,
            settings: b,
            defaults: f.settings
          }
        )
      },
      a => {
        return {
          save(b) {
            a(c.saveIDESettings(b))
          },
          cancel() {
            a(c.closeIDESettings())
          },
          closeIDESettings() {
            a(c.closeIDESettings())
          }
        }
      }
    )(d)
  module.exports = class extends a.Component {
    constructor(a) {
      super(a)
    }
    onSettingsWindowClose() {
      this.props.onSettingsWindowClose()
    }
    render() {
      return a.createElement(
        g,
        {
          title: '\u8BBE\u7F6E',
          registryId: e.WINDOW_REGISTRY.SETTINGS,
          width: e.SIZE.SETTING.WIDTH,
          height: e.SIZE.SETTING.HEIGHT,
          resizable: !1,
          onWindowClose: this.onSettingsWindowClose.bind(this),
          templateHTML: 'html/setting.html'
        },
        a.createElement(h, null)
      )
    }
  }
})(require('lazyload'), require)
