import { createWebHashHistory, createRouter } from 'vue-router'
import GPIO from '../views/GPIO.vue'
import Devices from '../views/Devices.vue'
import AtemKeySync from '../views/AtemKeySync.vue'
import VideohubEmulator from '../views/VideohubEmulator.vue'
import System from '../views/System.vue'

const routes = [
  {
    path: '/',
    name: 'gpio',
    component: GPIO
  },
  {
    path: '/devices',
    name: 'devices',
    component: Devices
  },
  {
    path: '/atem-keysync',
    name: 'atem-keysync',
    component: AtemKeySync
  },
  {
    path: '/videohub-emulator',
    name: 'videohub-emulator',
    component: VideohubEmulator
  },
  {
    path: '/system',
    name: 'system',
    component: System
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    // component: () => import(/* webpackChunkName: "about" */ '../views/System.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
