<script setup lang="ts">
import { computed } from 'vue';
import { RouterView, useRoute } from 'vue-router';
import { Sidebar } from './sidebar';

const route = useRoute();

const hideSidebar = computed(() => {
    return route.name === 'callback' || route.name === 'about';
});
</script>

<template>
    <template v-if="hideSidebar">
        <RouterView />
    </template>
    <template v-else>
    <Sidebar />
        <div class="main-container">
            <RouterView />
        </div>
    </template>
</template>

<style scoped>
@reference "tailwindcss";

div.main-container {
    @apply px-4 sm:ml-64;
}
</style>

