import { RouterType, RouterTypeRow } from '@/types'
import React from 'react'

const tabLeftArr: RouterType = [
  {
    id: 1,
    name: '工作台',
    son: [
      {
        id: 100,
        name: '工作台',
        path: '/',
        Com: React.lazy(() => import('../A1workbench'))
      },
      {
        id: 200,
        name: '数据统计',
        path: '/statistics',
        Com: React.lazy(() => import('../A2statistics'))
      }
    ]
  },

  {
    id: 2,
    name: '藏品管理',
    son: [
      {
        id: 300,
        name: '藏品总账',
        path: '/ledger',
        Com: React.lazy(() => import('../B1ledger'))
      },
      {
        id: 400,
        name: '藏品登记',
        path: '/register',
        Com: React.lazy(() => import('../B2register')),
        pageType: 'DJ'
      },
      {
        id: 500,
        name: '藏品修改',
        path: '/edit',
        Com: React.lazy(() => import('../B3edit')),
        pageType: 'XG'
      },
      {
        id: 600,
        name: '藏品删除',
        path: '/delete',
        Com: React.lazy(() => import('../B4delete')),
        pageType: 'SC'
      }
    ]
  },

  {
    id: 3,
    name: '库存管理',
    son: [
      {
        id: 700,
        name: '库房管理',
        path: '/storageSet',
        Com: React.lazy(() => import('../C1storageSet'))
      },
      {
        id: 800,
        name: '藏品入库',
        path: '/storageIn',
        Com: React.lazy(() => import('../C2storageIn')),
        pageType: 'RK'
      },
      {
        id: 900,
        name: '藏品移库',
        path: '/storageMove',
        Com: React.lazy(() => import('../C3storageMove')),
        pageType: 'YK'
      },
      {
        id: 1000,
        name: '藏品出库',
        path: '/storageOut',
        Com: React.lazy(() => import('../C4storageOut')),
        pageType: 'CK'
      }
    ]
  },

  {
    id: 4,
    name: '系统管理',
    son: [
      {
        id: 2300,
        name: '字典管理',
        path: '/dict',
        Com: React.lazy(() => import('../D1dict'))
      },
      {
        id: 2400,
        name: '审批设置',
        path: '/approval',
        Com: React.lazy(() => import('../D2approval'))
      },
      {
        id: 2500,
        name: '角色管理',
        path: '/role',
        Com: React.lazy(() => import('../D3role'))
      },
      {
        id: 2100,
        name: '用户管理',
        path: '/user',
        Com: React.lazy(() => import('../Z1user'))
      },

      {
        id: 2200,
        name: '系统日志',
        path: '/log',
        Com: React.lazy(() => import('../Z2log'))
      },
      // 不需要 高亮的 详情页
      {
        id: 9901,
        name: '藏品详情',
        path: '/goodsLook/:id',
        pathLast: '/goodsLook',
        Com: React.lazy(() => import('../A0goodsInfo'))
      }
    ]
  }
]

export default tabLeftArr

// 里面的页面，不是左边的tab栏
export const routerSon: RouterTypeRow = [
  {
    id: 400,
    name: '藏品登记-查看',
    path: '/register_look/:key/:id',
    Com: React.lazy(() => import('../B2register/B2look'))
  },
  {
    id: 500,
    name: '藏品修改-查看',
    path: '/edit_look/:key/:id',
    Com: React.lazy(() => import('../B3edit/B3look'))
  },
  {
    id: 600,
    name: '藏品删除-查看',
    path: '/delete_look/:key/:id',
    Com: React.lazy(() => import('../B4delete/B4look'))
  },
  {
    id: 800,
    name: '藏品入库-查看',
    path: '/storageIn_look/:key/:id',
    Com: React.lazy(() => import('../C2storageIn/C2look'))
  },
  {
    id: 900,
    name: '藏品移库-查看',
    path: '/storageMove_look/:key/:id',
    Com: React.lazy(() => import('../C3storageMove/C3look'))
  },
  {
    id: 1000,
    name: '藏品出库-查看',
    path: '/storageOut_look/:key/:id',
    Com: React.lazy(() => import('../C4storageOut/C4look'))
  }
]
