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'
import Search from '@/views/Search.vue'
import Preferences from '@/views/Preferences.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 },
    { path: '/search', name: 'search', component: Search },
    { path: '/preferences', name: 'preferences', component: Preferences },
]

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