import { createRouter, createWebHistory } from 'vue-router'
import Dashboard from "../views/Dashboard.vue"

const routes = [
  {
    path: '/settings',
    name: 'Settings',
    component: () => import(/* webpackChunkName: "login" */ '../views/Settings.vue')
  },
  {
    path: '/logout',
    name: 'Logout',
    component: () => import(/* webpackChunkName: "login" */ '../views/Logout.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
  },
  {
    path: '/setup',
    name: 'Setup',
    component: () => import(/* webpackChunkName: "login" */ '../views/Setup.vue')
  },
  {
    path: '/',
    name: 'Dashboard',
    component: Dashboard,
  },
  {
    path: '/admin/applications/new',
    name: 'NewApplication',
    component: () => import(/* webpackChunkName: "login" */ '../views/CreateApplication.vue')
  }
]

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

export default router
