import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import ServiceSelection from '../views/ServiceSelection.vue'
import Usernews from '../views/Usernews.vue'
import Calendarview from '../views/Calendarview.vue'
import Aivideo from '../views/Aivdeo.vue'
import Trends from '../views/Trends.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/serviceselection',
    name: 'ServiceSelection',
    component: ServiceSelection,
    props: true,
  },
  {
    path: '/cal',
    name: 'Home',
    component: Home,
    props: true,
    meta: { requiresAuth: true }
  },
  {
    path: '/group_browse',
    name: 'Groupbrowse',
    // 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/Groupbrowse.vue'),
    props: true,
    meta: { requiresAuth: true }
  },
  {
    path: '/usernews',
    name: 'Usernews',
    component: Usernews,
  },
  {
    path: '/calendarview',
    name: 'Calendarview',
    component: Calendarview,
  },
  {
    path: '/aivideo',
    name: 'Aivideo',
    component: Aivideo,
  },
  {
    path: '/',
    name: 'Trends',
    component: Trends,
  },
]

const router = new VueRouter({
  linkActiveClass: 'active',
  routes
})

export default router
