import { Routes } from '@angular/router';
import { Roots } from '@enums/root.enum';
import { GuestGuard } from '@guards/guest.guard';
import { IntroGuard } from '@guards/intro.guard';

export const authRoutes: Routes = [
  {
    path: '',
    redirectTo: Roots.intro,
    pathMatch: 'full',
  },
  {
    path: Roots.intro,
    loadComponent: () => import('./intro/intro.page').then(m => m.IntroPage),
    canActivate: [IntroGuard]
  },
  {
    path: Roots.login,
    loadComponent: () => import('./login/login.page').then(m => m.LoginPage),
    canActivate: [GuestGuard]
  },
  {
    path: Roots.register,
    loadComponent: () => import('./signup/signup.page').then(m => m.SignupPage),
    canActivate: [GuestGuard]
  },
  {
    path: Roots.otp,
    loadComponent: () => import('./otp/otp.page').then(m => m.OtpPage),
    canActivate: [GuestGuard]
  },
];
