<script setup>
import { useDisplay } from "vuetify/lib/framework.mjs";
import { ref } from "vue";
import { navigateTo } from "#app";

const { mobile } = useDisplay();
const navOpen = ref(!mobile.value);
</script>

<template>
  <VAppBar v-if="mobile" order="5">
    <VAppBarNavIcon @click.end="navOpen = !navOpen" />
    <VToolbarTitle>Database Project</VToolbarTitle>
  </VAppBar>
  <VNavigationDrawer v-model="navOpen" :temporary="mobile">
    <VList density="compact" nav>
      <VListItem prepend-icon="mdi-login" title="Login" value="/login" @click="navigateTo('/login')" />
      <VListItem prepend-icon="mdi-account" title="Clients" value="/clients" @click="navigateTo('/clients')" />
      <VDivider />
    </VList>
  </VNavigationDrawer>
</template>
