import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

import AdminMain from '../views/admin/Main.vue'
import Dashboard from '../views/admin/main/Dashboard.vue'
import create from '../views/admin/main/Create.vue'
import Test from '../views/admin/main/Test.vue'
import Test2 from '../views/admin/main/Test2.vue'
import Test3 from '../views/admin/main/Test3.vue'
import Test4 from '../views/admin/main/Test4.vue'
import Test5 from '../views/admin/main/Test5.vue'


import User from '../views/user/User.vue'



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },

  {
    path: '/admin',
    component: AdminMain,
    children: [
      {
        path: '/',
        name: 'Dashboard',
        component: Dashboard,
      },
    ]
  },

  {
    path: '/create',
    name: 'create',
    component: create
  },


  {
    path: '/test',
    name: 'Test',
    component: Test
  },

  {
    path: '/Test2',
    name: 'Test2',
    component: Test2
  },

  {
    path: '/Test3',
    name: 'Test3',
    component: Test3
  },

  {
    path: '/Test4',
    name: 'Test4',
    component: Test4
  },

  {
    path: '/Test5',
    name: 'Test5',
    component: Test5
  },

  {
    path: '/user',
    name: 'User',
    component: User
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
