import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
import { Layout } from '@/utils/routerHelper'
const pre = 'authorization'

export default {
  path: '/authorization',
  component: Layout,
  name: `${pre}`,
  redirect: '/authorization/user',
  meta: {
    title: t('router.authorization'),
    icon: 'vi-eos-icons:role-binding',
    alwaysShow: true
  },
  children: [
    {
      path: 'user',
      component: () => import('@/views/Authorization/User/User.vue'),
      name: `${pre}-user`,
      meta: {
        title: t('router.user')
      }
    },
    {
      path: 'menu',
      component: () => import('@/views/Authorization/Menu/Menu.vue'),
      name: `${pre}-menu`,
      meta: {
        title: t('router.menuManagement')
      }
    },
    {
      path: 'role',
      component: () => import('@/views/Authorization/Role/Role.vue'),
      name: `${pre}-role`,
      meta: {
        title: t('router.role')
      }
    }
  ]
}
