import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import AboutView from '@/views/AboutView.vue'
import ContactView from '@/views/ContactView.vue'
import SoftwareView from '@/views/SoftwareView.vue'
import GardeningView from '@/views/GardeningView.vue'
import LogBookView from '@/views/LogBookView.vue'
import MainSite from '@/views/MainSite.vue'
import GardenDetails from '@/views/GardenDetails.vue'
import HikingView from '@/views/HikingView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // Most paths are nested under the MainSite component, which provides the
    // common header links and formatting.
    {
      path: '/',
      component: MainSite,
      children: [
        {
          path: '',
          component: HomeView
        },
        {
          path: 'about',
          component: AboutView
        },
        {
          path: 'contact',
          component: ContactView
        },
        {
          path: 'software',
          component: SoftwareView
        },
        {
          path: 'gardening',
          component: GardeningView
        },
        {
          path: 'hiking',
          component: HikingView
        },
        {
          path: 'logbook',
          component: LogBookView
        }
      ]
    },
    {
      path: '/garden-details',
      component: GardenDetails
    }
  ]
})

export default router
