<template>
  <!-- <v-app id="nav"> -->
  <v-navigation-drawer v-model="drawer">
    <div class="pa-2">
      <v-btn
        density="default"
        icon="mdi-close"
        @click="drawer = !drawer"
      ></v-btn>
    </div>

    <!-- <v-divider></v-divider> -->

    <v-list density="compact" nav>
      <template v-for="item in items">
        <v-list-item
          rounded="lg"
          :prepend-icon="item.icon"
          :title="item.text"
          :value="item.text"
          :to="item.to"
        ></v-list-item>
      </template>

      <!-- <v-list-item
        prepend-icon="mdi-forum"
        title="About"
        value="about"
      ></v-list-item> -->
    </v-list>
  </v-navigation-drawer>

  <v-app-bar>
    <v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>

    <v-app-bar-title>{{ configStore.appName }}</v-app-bar-title>
  </v-app-bar>
  <!-- </v-app> -->
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { useConfigStore } from "@/stores/config";

const configStore = useConfigStore();

const drawer = ref(false);

const items = [
  { icon: "mdi-home", text: "首页", to: { name: "home" } },
  // { icon: "mdi-content-copy", text: "资料库", to: { name: "libraries" } },
  // // { icon: "mdi-history", text: "Frequently contacted", to: "/documents" },
  // { icon: "mdi-account", text: "登录", to: { name: "login" } },
];
</script>
