<template>
  <ie-page :fix-height="userStore.isVHS">
    <vhs-voluntary v-if="userStore.isVHS" />
    <ie-voluntary v-else />
    <template #tabbar>
      <ie-tabbar :active="1" />
    </template>
  </ie-page>
</template>

<script lang="ts" setup>
import VhsVoluntary from './components/vhs-voluntary.vue';
import IeVoluntary from './components/ie-voluntary.vue';
import { useUserStore } from '@/store/userStore';
import { useTransferPage } from '@/hooks/useTransferPage';
import { EnumDictName } from '@/common/enum';
const { transferTo } = useTransferPage();
const userStore = useUserStore();
type MenuItem = {
  title: string;
  desc: string;
  icon: string;
  pagePath: string;
};
const menu: MenuItem[] = [
  {
    title: '院校录取概率测试',
    desc: '输入院校专业，精准测算录取结果',
    icon: '/volunteer/single.png',
    pagePath: '/pagesOther/pages/ie/entry-single/entry-single'
  },
  // {
  //   title: '模拟志愿分析',
  //   desc: '精准分析你的志愿表',
  //   icon: '/volunteer/analysis.png',
  //   pagePath: '/pagesOther/pages/ie/entry-analysis/entry-analysis'
  // },
  // {
  //   title: 'AI志愿',
  //   desc: '精准推荐合理志愿，生成志愿表',
  //   icon: '/volunteer/ai.png',
  //   pagePath: '/pagesOther/pages/ie/entry-ai/entry-ai'
  // },
  {
    title: '测职业技能分',
    desc: '结合院校录取规则，快速测算',
    icon: '/volunteer/calculate.png',
    pagePath: '/pagesOther/pages/ie/entry-calculate/entry-calculate'
  }
];
const handleClick = async (item: MenuItem) => {
  const isLogin = await userStore.checkLogin();
  if (isLogin) {
    transferTo(item.pagePath);
  }
}
</script>

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