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

const routes: RouteRecordRaw[] = [
  {
    path: '/common',
    name: 'Common',
    component: () => import('#/layouts').then((m) => m.BasicLayout),
    meta: {
      title: '系统管理',
      icon: 'ep:setting',
      order: 1000,
    },
    children: [
      {
        path: 'user',
        name: 'CommonUser',
        meta: {
          title: '用户管理',
          icon: 'ep:user',
        },
        children: [
          {
            path: 'admin',
            name: 'CommonUserAdmin',
            component: () => import('#/views/common/user/admin/index.vue'),
            meta: {
              title: '管理员',
              icon: 'ep:user-filled',
            },
          },
          {
            path: 'member',
            name: 'CommonUserMember',
            component: () => import('#/views/common/user/member/index.vue'),
            meta: {
              title: '会员用户',
              icon: 'ep:avatar',
            },
          },
        ],
      },
      {
        path: 'rbac',
        name: 'CommonRbac',
        meta: {
          title: '权限管理',
          icon: 'ep:lock',
        },
        children: [
          {
            path: 'role',
            name: 'CommonRbacRole',
            component: () => import('#/views/common/rbac/role/index.vue'),
            meta: {
              title: '角色管理',
              icon: 'ep:user-filled',
            },
          },
          {
            path: 'menu',
            name: 'CommonRbacMenu',
            component: () => import('#/views/common/rbac/menu/index.vue'),
            meta: {
              title: '菜单管理',
              icon: 'ep:menu',
            },
          },
          {
            path: 'permission',
            name: 'CommonRbacPermission',
            component: () => import('#/views/common/rbac/permission/index.vue'),
            meta: {
              title: '权限管理',
              icon: 'ep:key',
            },
          },
        ],
      },
      {
        path: 'settings',
        name: 'CommonSettings',
        meta: {
          title: '系统设置',
          icon: 'ep:tools',
        },
        children: [
          {
            path: 'email',
            name: 'CommonSettingsEmail',
            component: () => import('#/views/common/settings/email/index.vue'),
            meta: {
              title: '邮件设置',
              icon: 'ep:message',
            },
          },
          {
            path: 'sms',
            name: 'CommonSettingsSms',
            component: () => import('#/views/common/settings/sms/index.vue'),
            meta: {
              title: '短信设置',
              icon: 'ep:chat-dot-round',
            },
          },
          {
            path: 'storage',
            name: 'CommonSettingsStorage',
            component: () => import('#/views/common/settings/storage/index.vue'),
            meta: {
              title: '存储设置',
              icon: 'ep:folder',
            },
          },
          {
            path: 'payment',
            name: 'CommonSettingsPayment',
            component: () => import('#/views/common/settings/payment/index.vue'),
            meta: {
              title: '支付设置',
              icon: 'ep:credit-card',
            },
          },
          {
            path: 'login',
            name: 'CommonSettingsLogin',
            component: () => import('#/views/common/settings/login/index.vue'),
            meta: {
              title: '登录设置',
              icon: 'ep:unlock',
            },
          },
          {
            path: 'system',
            name: 'CommonSettingsSystem',
            component: () => import('#/views/common/settings/system/index.vue'),
            meta: {
              title: '系统设置',
              icon: 'ep:setting',
            },
          },
          {
            path: 'security',
            name: 'CommonSettingsSecurity',
            component: () => import('#/views/common/settings/security/index.vue'),
            meta: {
              title: '安全设置',
              icon: 'ep:lock',
            },
          },
          {
            path: 'notification',
            name: 'CommonSettingsNotification',
            component: () => import('#/views/common/settings/notification/index.vue'),
            meta: {
              title: '通知设置',
              icon: 'ep:bell',
            },
          },
        ],
      },
      {
        path: 'file',
        name: 'CommonFile',
        component: () => import('#/views/common/file/index.vue'),
        meta: {
          title: '文件管理',
          icon: 'ep:folder',
        },
      },
    ],
  },
];

export default routes;