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';

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

  { path: 'workflow', component: WorkflowComponent },
  {
    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 {}
