<script setup lang="ts">
const route = useRoute()
const pages = [
    { link: '/', text: 'Главная' },
    { link: '/kompas', text: 'Компас 3D' },
]
</script>
<template>
    <nav class="p-4 space-y-2">
        <template v-for="page in pages">
            <RouterLink :to="page.link" class="block px-4 py-2 text-gray-700 hover:bg-rose-100 rounded"
                :class="{ 'bg-rose-100': route.fullPath == page.link }">
                {{ page.text }}
            </RouterLink>
        </template>
    </nav>
</template>