import { Routes } from '@angular/router';
import { authGuard } from '../../core/guards';

export const WEBHOOKS_ROUTES: Routes = [
  {
    path: '',
    loadComponent: () =>
      import('./webhook-list/webhook-list.component').then((m) => m.WebhookListComponent),
    canActivate: [authGuard],
  },
  {
    path: 'new',
    loadComponent: () =>
      import('./webhook-form/webhook-form.component').then((m) => m.WebhookFormComponent),
    canActivate: [authGuard],
  },
  {
    path: ':id/logs',
    loadComponent: () =>
      import('./webhook-logs/webhook-logs.component').then((m) => m.WebhookLogsComponent),
    canActivate: [authGuard],
  },
  {
    path: ':id/edit',
    loadComponent: () =>
      import('./webhook-form/webhook-form.component').then((m) => m.WebhookFormComponent),
    canActivate: [authGuard],
  },
];
