import Home from '../views/Home.vue';
import Notifications from '../views/Notifications.vue';
import Reunions from '../views/Reunions.vue';
import Inspirations from '../views/Inspirations.vue';
import Kanban from '../views/Kanban.vue';
import Brief from '../views/Brief.vue';
import DesignToLight from '../views/DesignToLight.vue';
import Login from '../views/Login.vue';
import Account from '../views/Account.vue';

const routes = [
  {
    path: '/',
    component: Home,
  },
  {
    name: 'Login',
    path: '/login',
    component: Login,
  },
  {
    name: 'Account',
    path: '/account',
    component: Account,
  },
  {
    path: '/notifications',
    component: Notifications,
  },
  {
    path: '/reunions',
    component: Reunions,
  },
  {
    path: '/inspirations',
    component: Inspirations,
  },
  {
    path: '/design-to-light',
    component: DesignToLight,
  },
  {
    path: '/projects/:id',
    component: Kanban,
  },
  {
    path: '/projects/:id/client-brief',
    component: Brief,
  },
  {
    path: '/projects/:id/extended-brief',
    component: Brief,
  },

  // Redirections
  {
    path: '/projects/:id/industrial-ideation',
    redirect: (to) => {
      return (
        '/projects/' +
        to.params.id +
        '?dialog=industrial-ideation&comments=true'
      );
    },
  },
  {
    path: '/projects/:id/proposal',
    redirect: (to) => {
      return '/projects/' + to.params.id + '?dialog=proposal&comments=true';
    },
  },
];

export default routes;
