import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const permission: AppRouteModule = {
  path: '/permission',
  name: 'Permission',
  component: LAYOUT,
  redirect: '/permission/admin',
  meta: {
    icon: 'bx:bx-lock',
    title: t('routes.permission.management'),
  },
  children: [
    {
      path: 'admin',
      name: 'Admin',
      component: () => import('/@/views/permission/admin/index.vue'),
      meta: {
        title: t('routes.permission.admin'),
        affix: false,
        icon: 'bx:bx-lock',
      },
    },
    {
      path: 'logs',
      name: 'Logs',
      component: () => import('/@/views/permission/admin_log/index.vue'),
      meta: {
        title: t('routes.permission.logs'),
        affix: false,
        icon: 'bx:bx-lock',
      },
    },
    {
      path: 'group',
      name: 'Group',
      component: () => import('/@/views/permission/group/index.vue'),
      meta: {
        title: t('routes.permission.group'),
        affix: false,
        icon: 'bx:bx-lock',
      },
    },
    {
      path: 'rule',
      name: 'Rule',
      component: () => import('/@/views/permission/rule/index.vue'),
      meta: {
        title: t('routes.permission.rule'),
        affix: false,
        icon: 'bx:bx-lock',
      },
    },
  ],
};

export default permission;
