"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 index_vue_vue_type_script_setup_true_lang = require("../ProjectLayoutCreate/index.vue.js");
const index = require("../ProjectLayoutAsideFooter/index.vue.js");
const designSetting = require("../../../../../settings/designSetting.js");
const vueRouter_esmBundler = require("../../../../../../node_modules/.pnpm/vue-router@4.0.12_vue@3.3.4/node_modules/vue-router/dist/vue-router.esm-bundler.js");
const settingStore = require("../../../../../store/modules/settingStore/settingStore.js");
const menu = require("./menu.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 _hoisted_1 = { class: "go-project-sider-flex" };
const _hoisted_2 = { class: "sider-bottom" };
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  setup(__props) {
    const collapsed = reactivity_esmBundler.ref(false);
    const { getAsideCollapsedWidth } = reactivity_esmBundler.toRefs(settingStore.useSettingStore());
    const route = vueRouter_esmBundler.useRoute();
    const menuValue = runtimeCore_esmBundler.computed(() => route.name);
    const menuOptions = menu.menuOptionsInit();
    const defaultExpandedKeys = menu.expandedKeys();
    const watchWidth = () => {
      const Width = document.body.clientWidth;
      if (Width <= 950) {
        collapsed.value = true;
      } else
        collapsed.value = false;
    };
    runtimeCore_esmBundler.onMounted(() => {
      window.addEventListener("resize", watchWidth);
    });
    runtimeCore_esmBundler.onUnmounted(() => {
      window.removeEventListener("resize", watchWidth);
    });
    return (_ctx, _cache) => {
      const _component_n_space = runtimeCore_esmBundler.resolveComponent("n-space");
      const _component_n_menu = runtimeCore_esmBundler.resolveComponent("n-menu");
      const _component_n_layout_sider = runtimeCore_esmBundler.resolveComponent("n-layout-sider");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_layout_sider, {
        class: "go-project-sider",
        bordered: "",
        "collapse-mode": "width",
        "show-trigger": "bar",
        collapsed: collapsed.value,
        "native-scrollbar": false,
        "collapsed-width": reactivity_esmBundler.unref(getAsideCollapsedWidth),
        width: reactivity_esmBundler.unref(designSetting.asideWidth),
        onCollapse: _cache[0] || (_cache[0] = ($event) => collapsed.value = true),
        onExpand: _cache[1] || (_cache[1] = ($event) => collapsed.value = false)
      }, {
        default: runtimeCore_esmBundler.withCtx(() => [
          runtimeCore_esmBundler.createElementVNode("div", _hoisted_1, [
            runtimeCore_esmBundler.createElementVNode("aside", null, [
              runtimeCore_esmBundler.createVNode(_component_n_space, {
                vertical: "",
                class: "go-project-sider-top"
              }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index_vue_vue_type_script_setup_true_lang.default), { collapsed: collapsed.value }, null, 8, ["collapsed"])
                ]),
                _: 1
              }),
              runtimeCore_esmBundler.createVNode(_component_n_menu, {
                value: menuValue.value,
                options: reactivity_esmBundler.unref(menuOptions),
                "collapsed-width": reactivity_esmBundler.unref(getAsideCollapsedWidth),
                "collapsed-icon-size": 22,
                "default-expanded-keys": reactivity_esmBundler.unref(defaultExpandedKeys)
              }, null, 8, ["value", "options", "collapsed-width", "default-expanded-keys"])
            ]),
            runtimeCore_esmBundler.createElementVNode("div", _hoisted_2, [
              runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index.default), { collapsed: collapsed.value }, null, 8, ["collapsed"])
            ])
          ])
        ]),
        _: 1
      }, 8, ["collapsed", "collapsed-width", "width"]);
    };
  }
});
exports.default = _sfc_main;
