/**
 * 地图模块路由
 * 
 * 导航跳转路径格式：
 * - 导航: /map/maplist/navigation/:mapName
 * - 编辑: /map/maplist/edit/:mapName  
 * - 标定: /map/maplist/calibration/:mapName
 */
import Layout from '@/layout'

export function getMapRoutes(systemRoutes = []) {
  const mapRoutes = [
    // 地图列表（父路由）
    {
      path: '/map',
      component: Layout,
      hidden: true,
      permissions: ['system:map:list'],
      children: [
        {
          path: 'maplist',
          component: () => import('@/views/map/maplist/index'),
          name: 'MapList',
          meta: { title: '地图列表', icon: 'documentation', noCache: true }
        }
      ]
    },
    // 地图导航页面
    {
      path: '/map/maplist/navigation/:mapName',
      component: () => import('@/views/map/maplist/navigation'),
      name: 'MapNavigation',
      hidden: true,
      permissions: ['system:map:list'],
      meta: { title: '地图导航', icon: 'guide', noCache: true, activeMenu: '/map/maplist' }
    },
    // 地图编辑页面
    {
      path: '/map/maplist/edit/:mapName',
      component: () => import('@/views/map/maplist/edit'),
      name: 'MapEdit',
      hidden: true,
      permissions: ['system:map:list'],
      meta: { title: '地图编辑', icon: 'edit', noCache: true, activeMenu: '/map/maplist' }
    },
    // 坐标系标定页面
    {
      path: '/map/maplist/calibration/:mapName',
      component: () => import('@/views/map/maplist/calibration'),
      name: 'MapCalibration',
      hidden: true,
      permissions: ['system:map:list'],
      meta: { title: '坐标系标定', icon: 'marker', noCache: true, activeMenu: '/map/maplist' }
    },
    // VSLAM实时建图
    {
      path: '/map/vslam/:mapName',
      component: () => import('@/views/map/vslam/index'),
      name: 'VSlamPreview',
      hidden: true,
      permissions: ['system:map:list'],
      meta: { title: 'VSLAM实时建图', icon: '3d', noCache: true, activeMenu: '/map/maplist' }
    }
  ]

  return mapRoutes
}

export default getMapRoutes
