<script setup lang="ts">
import { storeToRefs } from 'pinia'
import { usePageStore } from '~/stores/pages'

import logo from '~/assets/images/logo.gif'
import aboutIcon from '~/assets/images/icons/info.png'
import projectIcon from '~/assets/images/icons/defrag.png'
import socialIcon from '~/assets/images/icons/user.png'

const pageStore = usePageStore()
const { pages } = storeToRefs(pageStore)

const icons = [aboutIcon, projectIcon, socialIcon]
</script>

<template>
  <nav
    class="d-flex flex-column flex-lg-row justify-content-lg-between gap-sm-2 gap-lg-3"
  >
    <Logo
      :src="logo"
      alt="Endermanch"
      title="Enderman"
      description="official website"
    />
    <ul
      class="navbar-nav flex-sm-row align-items-lg-center justify-content-sm-center gap-sm-3 mx-2"
    >
      <li v-for="(page, index) in pages" :key="index" class="nav-item">
        <LinkButton
          :path="page.path"
          :name="page.name"
          :icon="icons[index]"
          alt="Info"
        />
      </li>
    </ul>
  </nav>
</template>

<style scoped lang="scss"></style>
