import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from "./views/Home"
import Profil from "./views/User/UserProfil";
import DashBoard from "./views/DashBoard";
import CssTesteur from "./views/CssTesteur";
import MemoIndex from "./views/Memo/MemoIndex";
import MemoCreate from "./views/Memo/MemoCreate";
import MemoShow from "./views/Memo/MemoShow";
import MemoEdit from "./views/Memo/MemoEdit";
import GameIndex from "./views/Games/GameIndex";
import Hangman from "./views/Games/Hangman";

Vue.use(VueRouter)

export default new VueRouter({
    mode: 'history',

    routes: [
        {
            path: '/', name: 'home', component: Home,
            meta: { title: 'Home'}
        },
        {
            path: '/profil', name: 'profil', component: Profil,
            meta: { title: 'Profil'}
        },
        {
            path: '/dashboard', name: 'dashboard', component: DashBoard,
            meta: { title: 'Dashboard'}
        },

        {
            path: '/css-testeur', name: 'css-testeur', component: CssTesteur,
            meta: { title: 'css-testeur'}
        },

        {
            path: '/memos', component: MemoIndex,
            meta: {title: 'Memos'}
        }, {
            path: '/memos/create', component: MemoCreate,
            meta: {title: 'Add New Memo'}
        }, {
            path: '/memos/:id', component: MemoShow,
            meta: {title: 'Details for Memo'}
        }, {
            path: '/memos/:id/edit', component: MemoEdit,
            meta: {title: 'Edit Memo'}
        },

        {
            path: '/jeux', component: GameIndex,
            meta: {title: 'Liste des jeux'}
        },
        {
            path: '/jeux/pendu', component: Hangman,
            meta: {title: 'Jeu : Le pendu'}
        },
    ]
})
