import type { RouteRecordRaw } from 'vue-router'

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

const routes: RouteRecordRaw[] = [
  {
    path: '/company',
    component: Layout,
    redirect: '/company/profile',
    name: 'company',
    meta: {
      title: '组织管理',
      i18n: 'system.company',
      icon: 'ic:twotone-double-arrow',
    },
    children: [
      {
        path: 'profile',
        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: 'bx:bxs-component',
    },
    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: 'ic:twotone-double-arrow',
    },
    children: [
      {
        path: 'ent-cat',
        name: 'ent_cat',
        component: () => import('@/views/system/setting/ent_cat/index.vue'),
        meta: {
          title: '企业分类',
        },
      },
      {
        path: 'partner-cat',
        name: 'partner_cat',
        component: () => import('@/views/system/setting/partner_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: '应用分类',
        },
      },

    ],
  },
]
export default routes
