import layoutHeaderAside from '@/layout/header-aside'

const meta = { auth: true }

const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

export default {
  path: '/system_settings',
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'index',
      name: `${pre}index`,
      meta: { ...meta, title: '系统设置', root: '/system_settings' },
      component: _import('system/function/module-index')
    },
    {
      path: 'user_management/role',
      name: `${pre}user_management-role`,
      meta: { ...meta, cache: true, title: '角色' },
      component: _import('system-administration/user-management/role')
    },
    {
      path: 'user_management/user',
      name: `${pre}user_management-user`,
      meta: { ...meta, cache: true, title: '用户' },
      component: _import('system-administration/user-management/user')
    },
    {
      path: 'menu_configuration/menu',
      name: `${pre}menu_configuration-menu`,
      meta: { ...meta, cache: true, title: '菜单配置' },
      component: _import('system-administration/menu-management/menu-configuration')
    },
    {
      path: 'system_assistant/interface_log',
      name: `${pre}system_assistant-interface_log`,
      meta: { ...meta, cache: true, title: '接口日志' },
      component: _import('system-administration/system-utilities/api-logs')
    },
    {
      path: 'system_assistant/operate_log',
      name: `${pre}system_assistant-operate_log`,
      meta: { ...meta, cache: true, title: '操作日志' },
      component: _import('system-administration/system-utilities/operation-logs')
    },
    {
      path: 'system_assistant/problem_help',
      name: `${pre}system_assistant-problem_help`,
      meta: { ...meta, cache: true, title: '问题帮助' },
      component: _import('system-administration/system-utilities/problem-help')
    }
  ])('system_settings-')
}
