import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'lucide:building-2',
      order: 7,
      title: $t('page.school.title'),
      roles: ['super_admin'], // 仅超级管理员可见
    },
    name: 'School',
    path: '/school',
    redirect: '/school/list',
    children: [
      {
        name: 'SchoolList',
        path: 'list',
        component: () => import('#/views/school/list.vue'),
        meta: {
          icon: 'lucide:list',
          title: $t('page.school.list'),
        },
      },
      {
        name: 'SchoolDetail',
        path: 'detail/:id?',
        component: () => import('#/views/school/detail.vue'),
        meta: {
          hideInMenu: true,
          title: $t('page.school.detail'),
        },
      },
    ],
  },
];

export default routes;

