import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import missing from "../views/missing.vue";
import TimeRecords from "../views/TimeRecords.vue";
import About from "../views/About.vue";
import StatisticOverview from "../views/StatisticOverview.vue";
import Users from "../views/Users.vue";
import EditUser from "../views/EditUser.vue";
import TimeTrackAccounts from "../views/TimeTrackAccounts.vue";
import EditTimeTrackAccount from "../views/EditTimeTrackAccount.vue"
import CreateTimeTrackAccount from "../views/CreateTimeTrackAccount.vue"
import EditTimerecord from "../views/EditTimerecord.vue"
import CreateTimerecord from "../views/CreateTimerecord.vue"
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/timerecords",
    name: "TimeRecords",
    component: TimeRecords
  },

  {
    path: "/about",
    name: "About",
    component: About
  },
  {
    path: "/statistics",
    name: "Statistics",
    component: StatisticOverview
  },
  {
    path: "/users",
    name: "Users",
    component: Users
  },
  {
    path: "/edituser",
    name: "EditUser",
    component: EditUser
  },
  {
    path: "/timetrackaccounts",
    name: "TimeTrack Accounts",
    component: TimeTrackAccounts
  },
  {
    path: "/edittimetrackaccount",
    name: "Edit TimeTrack Account",
    component: EditTimeTrackAccount
  },
  {
    path: "/createtimetrackaccount",
    name: "Create TimeTrack Account",
    component: CreateTimeTrackAccount
  },
  {
    path: "/edittimerecord",
    name: "EditTimerecord",
    component: EditTimerecord
  },
  {
    path: "/createtimerecord",
    name: "CreateTimerecord",
    component: CreateTimerecord
  },
  {
    path: '*',
    component: missing
  }
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
