import { createRouter, createWebHashHistory } from 'vue-router'

import Directory from '@/views/Directory.vue'
import Note from '@/views/Note.vue'
import CreateCategory from '@/views/CreateCategory.vue'
import Category from '@/views/Category.vue'
import Instructions from '@/views/Instructions.vue'

const routes = [
    { path: '/', name: 'directory', component: Directory },
    { path: '/note/:id', name: 'note', component: Note },
    { path: '/category', name: 'create-category', component: CreateCategory },
    { path: '/category/:id', name: 'category', component: Category },
    { path: '/instructions', name: 'instructions', component: Instructions },
]

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