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