import Vue from 'vue';
import Router from 'vue-router';
import Home from '@/pages/Home';
import Privacy from '@/pages/Privacy';
import Terms from '@/pages/Terms';
import DocumentationLayout from '@/pages/documentation/Layout';
import DocumentationIndex from '@/pages/documentation/Index';
import DocumentationQuickStart from '@/pages/documentation/QuickStart';
import DocumentationClient from '@/pages/documentation/Client';
import DocumentationRest from '@/pages/documentation/Rest';

Vue.use(Router);

export default new Router({
  scrollBehavior() {
    return { x: 0, y: 0 };
  },
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
    },
    {
      path: '/privacy',
      name: 'Privacy Policy',
      component: Privacy,
    },
    {
      path: '/terms',
      name: 'Terms of Use',
      component: Terms,
    },
    { path: '/documentation', component: DocumentationLayout, children: [
      {
        path: '/',
        name: 'Documentation',
        component: DocumentationIndex
      },
      {
        path: 'quick-start',
        name: 'DocumentationQuickStart',
        component: DocumentationQuickStart
      },
      {
        path: 'client',
        name: 'DocumentationClient',
        component: DocumentationClient
      },
      {
        path: 'rest',
        name: 'DocumentationRest',
        component: DocumentationRest
      },
    ]}
  ],
});
