<template>
  <n-config-provider :theme="theme" :themeOverrides="themeOverrides">
    <div class="page" :class="routeName">
      <router-view />
    </div>
  </n-config-provider>
</template>

<script setup>
import { computed, ref } from "vue";
import { themeOverrides } from "./theme/override.js";
import { darkTheme } from "naive-ui";
import { useRouter } from "vue-router";
const router = useRouter();
const routeName = ref();
const theme = ref(null);
router.beforeEach((to, from, next) => {
  document.title = to.meta.title;
  routeName.value = to.name;
  next();
});
</script>

<style scoped>
.layout,
.n-config-provider {
  height: 100%;
}
.n-layout-scroll-container {
  overflow: hidden;
}

.main {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
}
</style>
