"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const settingStore = require("../../store/modules/settingStore/settingStore.js");
const settingStore_d = require("../../store/modules/settingStore/settingStore.d.js");
require("../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.js");
require("../../../node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.js");
require("../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js");
require("../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js");
require("../../../node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.js");
require("../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js");
require("../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.js");
require("../../enums/pageEnum.js");
require("../../router/index.js");
require("../../store/modules/designStore/designStore.js");
require("../../settings/designSetting.js");
require("../GoLoading/index.js");
require("../GoSkeleton/index.vue.js");
const icon = require("../../plugins/icon.js");
const runtimeCore_esmBundler = require("../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
const reactivity_esmBundler = require("../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const shared_esmBundler = require("../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.js");
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    modelShow: Boolean
  },
  emits: ["update:modelShow"],
  setup(__props, { emit }) {
    const props = __props;
    const { HelpOutlineIcon, CloseIcon } = icon.icon.ionicons5;
    const settingStore$1 = settingStore.useSettingStore();
    const modelShowRef = reactivity_esmBundler.ref(false);
    const list = reactivity_esmBundler.reactive([
      {
        key: settingStore_d.SettingStoreEnums.ASIDE_ALL_COLLAPSED,
        value: settingStore$1.getAsideAllCollapsed,
        type: "switch",
        name: "菜单折叠",
        desc: "首页菜单折叠时隐藏至界面外"
      },
      {
        key: settingStore_d.SettingStoreEnums.HIDE_PACKAGE_ONE_CATEGORY,
        value: settingStore$1.getHidePackageOneCategory,
        type: "switch",
        name: "隐藏分类",
        desc: "工作空间表单分类只有单项时隐藏"
      },
      {
        key: settingStore_d.SettingStoreEnums.CHANGE_LANG_RELOAD,
        value: settingStore$1.getChangeLangReload,
        type: "switch",
        name: "切换语言",
        desc: "切换语言重新加载页面",
        tip: "若遇到部分区域语言切换失败，则建议开启"
      },
      {
        key: "divider1",
        type: "divider",
        name: "",
        desc: "",
        value: ""
      },
      {
        key: settingStore_d.SettingStoreEnums.CHART_TOOLS_STATUS_HIDE,
        value: settingStore$1.getChartToolsStatusHide,
        type: "switch",
        name: "隐藏工具栏",
        desc: "鼠标移入时，会展示切换到展开模式"
      },
      {
        key: settingStore_d.SettingStoreEnums.CHART_TOOLS_STATUS,
        value: settingStore$1.getChartToolsStatus,
        type: "select",
        name: "工具栏展示",
        desc: "工作空间工具栏展示方式",
        options: [
          {
            label: "侧边栏",
            value: settingStore_d.ToolsStatusEnum.ASIDE
          },
          {
            label: "底部 Dock",
            value: settingStore_d.ToolsStatusEnum.DOCK
          }
        ]
      },
      {
        key: "divider0",
        type: "divider",
        name: "",
        desc: "",
        value: ""
      },
      {
        key: settingStore_d.SettingStoreEnums.CHART_MOVE_DISTANCE,
        value: settingStore$1.getChartMoveDistance,
        type: "number",
        name: "移动距离",
        min: 1,
        step: 1,
        suffix: "px",
        desc: "工作空间方向键控制移动距离"
      },
      {
        key: settingStore_d.SettingStoreEnums.CHART_ALIGN_RANGE,
        value: settingStore$1.getChartAlignRange,
        type: "number",
        name: "吸附距离",
        min: 10,
        step: 2,
        suffix: "px",
        desc: "工作空间移动图表时的吸附距离"
      }
    ]);
    runtimeCore_esmBundler.watch(() => props.modelShow, (newValue) => {
      modelShowRef.value = newValue;
    });
    const closeHandle = () => {
      emit("update:modelShow", false);
    };
    const handleChange = (e, item) => {
      settingStore$1.setItem(item.key, item.value);
    };
    return (_ctx, _cache) => {
      const _component_n_h3 = runtimeCore_esmBundler.resolveComponent("n-h3");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_space = runtimeCore_esmBundler.resolveComponent("n-space");
      const _component_n_divider = runtimeCore_esmBundler.resolveComponent("n-divider");
      const _component_n_text = runtimeCore_esmBundler.resolveComponent("n-text");
      const _component_n_switch = runtimeCore_esmBundler.resolveComponent("n-switch");
      const _component_n_input_number = runtimeCore_esmBundler.resolveComponent("n-input-number");
      const _component_n_select = runtimeCore_esmBundler.resolveComponent("n-select");
      const _component_n_tooltip = runtimeCore_esmBundler.resolveComponent("n-tooltip");
      const _component_n_list_item = runtimeCore_esmBundler.resolveComponent("n-list-item");
      const _component_n_list = runtimeCore_esmBundler.resolveComponent("n-list");
      const _component_n_modal = runtimeCore_esmBundler.resolveComponent("n-modal");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_modal, {
        show: modelShowRef.value,
        "onUpdate:show": _cache[0] || (_cache[0] = ($event) => modelShowRef.value = $event),
        onAfterLeave: closeHandle
      }, {
        default: runtimeCore_esmBundler.withCtx(() => [
          runtimeCore_esmBundler.createVNode(_component_n_list, {
            bordered: "",
            class: "go-system-setting"
          }, {
            header: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_space, { justify: "space-between" }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_h3, { class: "go-mb-0" }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createTextVNode("系统设置")
                    ]),
                    _: 1
                  }),
                  runtimeCore_esmBundler.createVNode(_component_n_icon, {
                    size: "20",
                    class: "go-cursor-pointer",
                    onClick: closeHandle
                  }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(CloseIcon))
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            default: runtimeCore_esmBundler.withCtx(() => [
              (runtimeCore_esmBundler.openBlock(true), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, runtimeCore_esmBundler.renderList(list, (item) => {
                return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_list_item, {
                  key: item.key
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    item.type === "divider" ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_divider, {
                      key: 0,
                      style: { "margin": "0" }
                    })) : (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_space, {
                      key: 1,
                      size: 40
                    }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_space, null, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createVNode(_component_n_text, { class: "item-left" }, {
                              default: runtimeCore_esmBundler.withCtx(() => [
                                runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(item.name), 1)
                              ]),
                              _: 2
                            }, 1024),
                            item.type === "switch" ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_switch, {
                              key: 0,
                              value: item.value,
                              "onUpdate:value": [($event) => item.value = $event, ($event) => handleChange($event, item)],
                              size: "small"
                            }, null, 8, ["value", "onUpdate:value"])) : item.type === "number" ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_input_number, {
                              key: 1,
                              value: item.value,
                              "onUpdate:value": [($event) => item.value = $event, ($event) => handleChange($event, item)],
                              class: "input-num-width",
                              size: "small",
                              step: item.step || null,
                              suffix: item.suffix || null,
                              min: item.min || 0
                            }, null, 8, ["value", "onUpdate:value", "step", "suffix", "min"])) : item.type === "select" ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_select, {
                              key: 2,
                              class: "select-min-width",
                              value: item.value,
                              "onUpdate:value": [($event) => item.value = $event, ($event) => handleChange($event, item)],
                              size: "small",
                              options: item.options
                            }, null, 8, ["value", "onUpdate:value", "options"])) : runtimeCore_esmBundler.createCommentVNode("", true)
                          ]),
                          _: 2
                        }, 1024),
                        runtimeCore_esmBundler.createVNode(_component_n_space, null, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createVNode(_component_n_text, { class: "item-right" }, {
                              default: runtimeCore_esmBundler.withCtx(() => [
                                runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(item.desc), 1)
                              ]),
                              _: 2
                            }, 1024),
                            item.tip ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_tooltip, {
                              key: 0,
                              trigger: "hover"
                            }, {
                              trigger: runtimeCore_esmBundler.withCtx(() => [
                                runtimeCore_esmBundler.createVNode(_component_n_icon, { size: "21" }, {
                                  default: runtimeCore_esmBundler.withCtx(() => [
                                    runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(HelpOutlineIcon))
                                  ]),
                                  _: 1
                                })
                              ]),
                              default: runtimeCore_esmBundler.withCtx(() => [
                                runtimeCore_esmBundler.createElementVNode("span", null, shared_esmBundler.toDisplayString(item.tip), 1)
                              ]),
                              _: 2
                            }, 1024)) : runtimeCore_esmBundler.createCommentVNode("", true)
                          ]),
                          _: 2
                        }, 1024)
                      ]),
                      _: 2
                    }, 1024))
                  ]),
                  _: 2
                }, 1024);
              }), 128))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["show"]);
    };
  }
});
exports.default = _sfc_main;
