import Vue from 'vue';
import Router from 'vue-router';

import HomePage from '../components/home/homePage.vue';

import TimeshareBuy from '../components/timeshare/buy/buyPage.vue';
import TimeshareSell from '../components/timeshare/sell/sellPage.vue';
import TimeshareFAQ from '../components/timeshare/faqPage.vue';

import Login from '../components/user/loginPage.vue';
import PrivateIndividual from '../components/user/registerPage.vue';
import Agency from '../components/user/registerAgencySection.vue';

import PropertySearch from '../components/property/propertySearchPage.vue';
import PropertyPage from '../components/property/propertyPage.vue';
import PropertyEdit from '../components/property/propertyeditPage.vue';

import AboutUs from '../components/about/aboutUsPage.vue';
import AboutTimeshare from '../components/about/aboutTimeshare.vue';

import Status from '../components/admin/status/statusPage.vue';
import UnitConfiguration from '../components/admin/unitConfiguration/unitConfigurationPage.vue';

import ResortPage from '../components/timeshare/resort/resortPage.vue';

import ContactUs from '../components/misc/contactUs.vue';

Vue.use(Router);

export default new Router({
  routes: [{
    path: '/',
    name: 'Home',
    component: HomePage,
  },
  {
    path: '/about/us',
    name: 'aboutus',
    component: AboutUs,
  },
  {
    path: '/about/timeshare',
    name: 'abouttimeshare',
    component: AboutTimeshare,
  },
  {
    path: '/timeshare/sell',
    name: 'TimeshareSell',
    component: TimeshareSell,
  },
  {
    path: '/timeshare/buy',
    name: 'TimeshareBuy',
    component: TimeshareBuy,
  },
  {
    path: '/timeshare/faq',
    name: 'TimeshareFAQ',
    component: TimeshareFAQ,
  },
  {
    path: '/user/login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/user/register',
    name: 'PrivateIndividual',
    component: PrivateIndividual,
  },
  {
    path: '/user/registeragency',
    name: 'Agency',
    component: Agency,
  },
  {
    path: '/property/property/:id',
    name: 'PropertyPage',
    component: PropertyPage,
  },
  {
    path: '/property/:propertyType/search',
    name: 'PropertySearch',
    component: PropertySearch,
  },
  {
    path: '/property/search',
    name: 'PropertySearchTab',
    component: PropertySearch,
  },
  {
    path: '/property/:propType/:saleType',
    name: 'PropertyEdit',
    component: PropertyEdit,
  },
  {
    path: '/status/list',
    name: 'StatusList',
    component: Status,
  },
  {
    path: '/unitConfiguration/list',
    name: 'UnitConfiguration',
    component: UnitConfiguration,
  },
  {
    path: '/contactus',
    name: 'ContactUs',
    component: ContactUs,
  },
  {
    path: 'resort/:resortCode',
    name: 'ResortPage',
    component: ResortPage,
    props: true,
  },
  ],
});
