import { createRouter, createWebHashHistory } from 'vue-router';
import SignUpPage from './components/SignUpPage.vue';
import SignInPage from './components/SignInPage.vue';
import ForgotPasswordPage from './components/ForgotPasswordPage.vue';
import TrackingTypePage from './components/TrackingTypePage.vue';
import ConnectingPage from './components/ConnectingPage.vue';
import ConnectedPage from './components/ConnectedPage.vue';

const router = createRouter( {
	history: createWebHashHistory(),
	routes: [
		{ path: '/',                redirect: '/sign-up' },
		{ path: '/sign-up',         name: 'sign-up',         component: SignUpPage },
		{ path: '/sign-in',         name: 'sign-in',         component: SignInPage },
		{ path: '/forgot-password', name: 'forgot-password', component: ForgotPasswordPage },
		{ path: '/tracking-type',   name: 'tracking-type',   component: TrackingTypePage },
		{ path: '/connecting',      name: 'connecting',      component: ConnectingPage },
		{ path: '/sign-up-success', name: 'sign-up-success', component: ConnectedPage, props: { flow: 'sign-up' } },
		{ path: '/sign-in-success', name: 'sign-in-success', component: ConnectedPage, props: { flow: 'sign-in' } },
	],
} );

export default router;
