import { Routes } from '@angular/router';
import { Callback } from './auth/callback/callback';
import { authGuard } from './auth/auth.guard';

export const routes: Routes = [
  { path: 'auth/callback', component: Callback },
  {
    path: 'trips',
    canActivate: [authGuard],
    loadComponent: () => import('./trips/trips-list/trips-list').then((m) => m.TripsList),
  },
  {
    path: 'trips/:tripId',
    canActivate: [authGuard],
    loadComponent: () => import('./trips/trip-detail/trip-detail').then((m) => m.TripDetail),
  },
];
