import type { RouteRecordRaw } from 'vue-router'

const Layout = () => import('@/layouts/index.vue')

const routes: RouteRecordRaw[] = [
  {
    path: '/company',
    component: Layout,
    redirect: '/company/personal',
    name: 'company',
    meta: {
      title: '组织管理',
      i18n: 'system.company',
      icon: 'ep:office-building',
    },
    children: [
      {
        path: 'personal',
        name: 'company_profile',
        component: () => import('@/views/system/profile/company_profile.vue'),
        meta: {
          title: '基本信息',
        },
      },
      {
        path: 'user',
        name: 'company_user',
        component: () => import('@/views/system/group/index.vue'),
        meta: {
          title: '账号管理',
        },
      },
      {
        path: 'position',
        name: 'company_position',
        component: () => import('@/views/system/position/index.vue'),
        meta: {
          title: '岗位管理',
        },
      },
    ],
  },
  {
    path: '/system/role',
    component: Layout,
    redirect: '/system/role/index',
    name: 'system_role',
    meta: {
      title: '角色管理',
      icon: 'ep:pointer',
    },
    children: [
      {
        path: 'index',
        name: 'system_role_index',
        component: () => import('@/views/system/role/index.vue'),
        meta: {
          title: '角色管理',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/system/role',
        },
      },
    ],
  },
  {
    path: '/setting',
    component: Layout,
    redirect: '/setting/ent-cat',
    name: 'system-setting',
    meta: {
      title: '系统配置',
      icon: 'ep:setting',
    },
    children: [
      {
        path: 'oc-cat',
        name: 'oc_cat',
        component: () => import('@/views/system/setting/oc_cat/index.vue'),
        meta: {
          title: '客户分类',
        },
      },
      {
        path: 'group-cat',
        name: 'group_cat',
        component: () => import('@/views/system/setting/group_cat/index.vue'),
        meta: {
          title: '部门类别',
        },
      },
      {
        path: 'task-cat',
        name: 'task_cat',
        component: () => import('@/views/system/setting/task_cat/index.vue'),
        meta: {
          title: '任务分类',
        },
      },
      {
        path: 'app-cat',
        name: 'app_cat',
        component: () => import('@/views/app_center/cat/index.vue'),
        meta: {
          title: '应用分类',
        },
      },
      {
        path: 'database_type',
        name: 'database_type',
        component: () => import('@/views/database/type/index.vue'),
        meta: {
          title: '数据库类型',
        },
      },
    ],
  },
]
export default routes
