<template>
  <div class="navigation-bar">
    <div class="nav-item" v-for="item in navItems" :key="item.id" @click="navigate(item)">
      <div class="nav-icon">{{ item.icon }}</div>
      <div class="nav-label">{{ item.label }}</div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();

const navItems = ref([
  { id: 1, icon: '📚', label: '资源中心', path: '/resource-center' },
  { id: 2, icon: '📝', label: '学习计划', path: '/study-plan' },
  { id: 3, icon: '👤', label: '个人中心', path: '/user-center' },
  { id: 4, icon: '🤖', label: 'AI助手', path: '/ai-assistant' }
]);

function navigate(item: any) {
  router.push(item.path);
}
</script>

<style lang="scss" scoped>
.navigation-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  background: white;
  border-radius: 8px;
  margin: 20px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.3s;
  
  &:hover {
    transform: translateY(-5px);
  }
}

.nav-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #C62828, #E53935);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.nav-label {
  font-size: 16px;
  font-weight: 500;
  color: #141F38;
}
</style>

