import { createHashHistory } from 'history'

interface RouteItem {
  title: string,
  path: string,
  navigation:boolean,
  icon?: string,
  parent?: RouteItem,
  component: any
}
export const history = createHashHistory()

const config: Array<RouteItem> = [
  {
    title: '栅格数据',
    path: '/grid',
    navigation: true,
    icon: require('./assets/images/icon_sys01.png'),
    component: require('./page/List/ResterList').default
  },
  {
    title: '3D模型',
    path: '/model',
    navigation: true,
    icon: require('./assets/images/icon_sys02.png'),
    component: require('./page/List/ModelList').default
  },
  {
    title: '矢量数据',
    path: '/gis',
    navigation: true,
    icon: require('./assets/images/icon_sys03.png'),
    component: require('./page/List/GeoList').default
  }
]

config.push({
  title: '编辑样式',
  path: '/style/:id',
  navigation: false,
  component: require('./page/StyleEdit').default,
  parent: config[2]
})

export default config
