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

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

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'material-symbols:brightness-empty-outline',
      order: -1,
      title: $t('page.admin.title'),
      authority:['super'],
    },
    name: 'Admin',
    path: '/admin',
    children: [
      {
        name: 'UserManagement',
        path: '/user-management',
        component: () => import('#/views/admin/user/index.vue'),
        meta: {
          authority: ['super', 'admin'],
          affixTab: false,
          icon: 'majesticons:user-box-line',
          title: $t('page.admin.user'),
        },
      },
      {
        name: 'UserManagementLog',
        path: '/user-management-log',
        component: () => import('#/views/admin/log/index.vue'),
        meta: {
          authority: ['super', 'admin'],
          affixTab: false,
          icon: 'material-symbols:assignment-rounded',
          title: $t('page.admin.log'),
        },
      },
    ],
  },
];

export default routes;
