import Vue from 'vue'
import Router from 'vue-router'
import VueResource from 'vue-resource'

import App from './App'

import Home from './components/Home'
import Lights from './components/Lights'
import Shutters from './components/Shutters'
import Sprinklers from './components/Sprinklers'
import Timers from './components/Timers'
import Settings from './components/Settings'

const FastClick = require('fastclick')
FastClick.attach(document.body)

Vue.use(VueResource)
Vue.use(Router)
Vue.config.devtools = true

const router = new Router()

router.map({
  '/': {
    component: Home
  },
  '/lights': {
    component: Lights
  },
  '/shutters': {
    component: Shutters
  },
  '/sprinklers': {
    component: Sprinklers
  },
  '/timers': {
    component: Timers
  },
  '/settings': {
    component: Settings
  }
})

router.start(App, 'app')
