import { DEFAULT_LAYOUT } from '@/router/constants'
import { User } from '@/enums/api'
import { AppRouteRecordRaw } from '../types'

const Account: AppRouteRecordRaw = {
  path: '/account',
  name: 'Account',
  component: DEFAULT_LAYOUT,
  meta: {
    title: '账号及权限',
    icon: 'icon-safe',
    iSize: 22,
    requiresAuth: true,
    order: 3
  },
  children: [
    {
      path: 'self',
      name: 'Self',
      component: () => import('@/views/account/self/index.vue'),
      meta: {
        title: '个人中心',
        permissions: [],
        hideInMenu: true,
        requiresAuth: true,
        ignoreCache: true
      }
    },

    {
      path: 'user',
      name: 'User',
      component: () => import('@/views/account/user/index.vue'),
      meta: {
        // icon: 'iot-user',
        title: '账号管理',
        permissions: [User.SYSTEM_USER_LIST],
        requiresAuth: true,
        ignoreCache: true
      }
    }
  ]
}

export default Account
