<template>
  <div class="full nav-page">
    <div class="flex flex-wrap">
      <div class="radius-base nav-card">考试管理</div>
      <router-link v-show="hasPermissions('/exam/manage')" to="/exam/manage">
        <div class="radius-base fill-blank m-l-base nav-item">
          <div class="full-w">
            <img class="nav-img" src="@img/考试批次管理.png" alt="" />
            <div class="m-t-extra-base nav-title">考试批次管理</div>
          </div>
        </div>
      </router-link>
      <router-link v-show="hasPermissions('/exam/manage')" to="/subject/manage">
        <div class="radius-base fill-blank m-l-base nav-item">
          <div class="full-w">
            <img class="nav-img" src="@img/科目管理.png" alt="" />
            <div class="m-t-extra-base nav-title">科目管理</div>
          </div>
        </div>
      </router-link>
    </div>
  </div>
</template>

<script setup lang="ts" name="ExamManageNav">
/** 考试管理导航页 */
import useNavPermissions from '@/hooks/useNavPermissions'

const { hasPermissions } = useNavPermissions()
</script>

<style scoped lang="scss">
.nav-page {
  padding: 160px;
  .nav-card {
    width: 420px;
    height: 180px;
    background: url(@img/nav-page-card.png) no-repeat center center / cover;
    padding: 32px;
    font-size: 22px;
    color: $color--white;
  }
  .nav-item {
    width: 200px;
    height: 180px;
    text-align: center;
    display: flex;
    place-items: center;
    cursor: pointer;
    &:hover {
      box-shadow: 0px 0px 8px $ShadowColor;
    }
    .nav-img {
      width: 64px;
      height: 64px;
    }
    .nav-title {
      color: $PrimaryPlusFontColor;
      font-size: $MediumFont;
    }
  }
}
</style>
