import {
  createRouter,
  createWebHistory
} from 'vue-router'
import {
  Layout
} from '@/components/'

export const staticRoutes = [
  {
    path: '/',
    name: 'Main',
    component: Layout,
    meta: {
      title: '成本管理',
      icon: ''
    },
    hidden: true,
    children: [{
      path: '/index',
      name: 'NewCostList',
      meta: {
        title: '成本管理',
        icon: 'el-icon-s-home'
      },
      hidden: true,
      component: () => import('@/views/index/index')
    }]
  },
  {
    path: '/login',
    name: 'Login',
    hidden: true,
    component: () => import('@/views/login/index'),
    meta: {
      title: '登录页'
    }
  },
  {
    path: '/404',
    name: '404',
    hidden: true,
    component: () => import('@/views/public/404'),
    meta: {
      title: '页面未找到'
    }
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes: staticRoutes
})

export default router
