import { DashboardIcon } from 'tdesign-icons-vue-next';
import { shallowRef } from 'vue';

import Layout from '@/layouts/index.vue';

export default [
  {
    path: '/dashboard',
    component: Layout,
    redirect: '/dashboard/base',
    name: 'dashboard',
    meta: {
      title: {
        zh_CN: '仪表盘',
        en_US: 'Dashboard',
      },
      icon: shallowRef(DashboardIcon),
      orderNo: 0,
    },
    children: [
      {
        path: 'base',
        name: 'DashboardBase',
        component: () => import('@/pages/dashboard/base/index.vue'),
        meta: {
          title: {
            zh_CN: '首页',
            en_US: 'Home',
          },
        },
      },
      {
        path: 'detail',
        name: 'DashboardDetail',
        component: () => import('@/pages/dashboard/detail/index.vue'),
        meta: {
          title: {
            zh_CN: '统计报表',
            en_US: 'Dashboard Detail',
          },
        },
      },
    ],
  },
  {
    path: '/permission',
    name: 'permission',
    component: Layout,
    meta: { title: { zh_CN: '用户中心', en_US: 'User Center' }, icon: 'user-circle' },
    children: [
      {
        path: 'users',
        name: 'Users',
        component: () => import('@/pages/permission/users/index.vue'),
        meta: { title: { zh_CN: '用户管理', en_US: 'Users Management' } },
      },
      {
        path: 'character',
        name: 'Scope',
        component: () => import('@/pages/permission/character/index.vue'),
        meta: { title: { zh_CN: '权限管理', en_US: 'Scope Management' } },
      },
      {
        path: 'user',
        name: 'Personal',
        component: () => import('@/pages/permission/user/index.vue'),
        meta: { title: { zh_CN: '个人中心', en_US: 'Personal Center' } },
      },
    ],
  },
];
