import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { WorkflowComponent } from './samwf/workflow.component';
import { WorkflowDetailComponent } from './samwf/workflow-detail/workflow-detail.component';
import { WorkflowDiagramaComponent } from './samwf/workflow-detail/workflow-diagrama/workflow-diagrama.component';
import { WorkflowPasosFormComponent } from './samwf/workflow-detail/workflow-tasks-form/workflow-pasos-form.component';
import { WorkflowVersionsHistoryComponent } from './samwf/workflow-versions-history/workflow-versions-history.component';
import { WorkflowRequestWorkflowComponent } from './samwf-user/workflow-request-workflow/workflow-request-workflow.component';
import { WorkflowAdvanceComponent } from './samwf-user/workflow-advance/workflow-advance.component';
import { WorkflowHistoryNotificationComponent } from './samwf-user/workflow-history-notification/workflow-history-notification.component';
import { TasksModuleComponent } from './samwf/tasks-module/tasks-module.component';
import { WorkflowAdminAdvanceComponent } from './samwf/workflow-admin-advance/workflow-admin-advance.component';

const routes: Routes = [
  { path: 'tasks-module', component: TasksModuleComponent },

  { path: 'workflow', component: WorkflowComponent },
  { path: 'workflow-admin-advance', component: WorkflowAdminAdvanceComponent },
  {
    path: 'workflow/versions-history/:id',
    component: WorkflowVersionsHistoryComponent,
  },
  { path: 'workflow/:id', component: WorkflowDetailComponent },
  { path: 'workflow/:id/tasksFlow', component: WorkflowPasosFormComponent },
  { path: 'requests-workflow', component: WorkflowRequestWorkflowComponent },
  { path: 'workflow/diagrama/:id', component: WorkflowDiagramaComponent },
  { path: 'requests-advance', component: WorkflowAdvanceComponent },
  {
    path: 'notification-history',
    component: WorkflowHistoryNotificationComponent,
  },
  { path: '**', pathMatch: 'full', redirectTo: 'workflow' },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
})
export class AppRoutingModule {}
