<template>
  <div class="certificate-index">
    <div class="content-placeholder">
      <h2>证书管理</h2>
      <p>欢迎使用证书管理系统</p>
      <div class="certificate-menu">
        <div class="menu-item" @click="navigateTo('/teacher/certificate/management')">
          <h3>证书管理</h3>
          <p>管理已颁发的证书</p>
        </div>
        <div class="menu-item" @click="navigateTo('/teacher/certificate/template')">
          <h3>证书模板</h3>
          <p>管理证书模板</p>
        </div>
        <div class="menu-item" @click="navigateTo('/teacher/certificate/issuance')">
          <h3>证书颁发</h3>
          <p>颁发新证书</p>
        </div>
        <div class="menu-item" @click="navigateTo('/teacher/certificate/query')">
          <h3>证书查询</h3>
          <p>查询证书信息</p>
        </div>
      </div>
    </div>
  </div>
</template>

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

const router = useRouter()

const navigateTo = (path: string) => {
  router.push(path)
}
</script>

<style scoped>
.certificate-index {
  padding: 20px;
  background: #fff;
  height: 100%;
}

.content-placeholder {
  text-align: center;
  padding: 40px 20px;
}

.content-placeholder h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
}

.content-placeholder p {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
}

.certificate-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.menu-item {
  padding: 30px 20px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-item:hover {
  border-color: #0288D1;
  background: #E2F5FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 136, 209, 0.15);
}

.menu-item h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.menu-item p {
  font-size: 14px;
  color: #666;
  margin: 0;
}
</style>
