import { NgModule, Component } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './components/login/login.component';
import { loginGuard } from './guards/login.guard';
import { TemplateComponent } from './components/template/template.component';
import { authGuard } from './guards/auth.guard';
import { HomeComponent } from './components/home/home.component';
import { permissionGuard } from './guards/permission.guard';
import { SystemAdminComponent } from './components/system-admin/system-admin.component';
import { ConnectionsComponent } from './components/system-admin/connections/connections.component';
import { UserConnectionsComponent } from './components/system-admin/connections/user-connections/user-connections.component';
import { ActionsComponent } from './components/system-admin/actions/actions.component';
import { DetailsComponent } from './components/system-admin/actions/details/details.component';
import { AdvicesComponent } from './components/system-admin/advices/advices.component';
import { NewAdviceComponent } from './components/system-admin/advices/new-advice/new-advice.component';
import { SecurityPoliticsComponent } from './components/system-admin/security-politics/security-politics.component';
import { MaintenanceModeComponent } from './components/system-admin/maintenance-mode/maintenance-mode.component';
import { WebServicesAdminComponent } from './components/system-admin/web-services-admin/web-services-admin.component';
import { ScadaAdminComponent } from './components/system-admin/web-services-admin/scada-admin/scada-admin.component';
import { TokensAdminComponent } from './components/system-admin/web-services-admin/tokens-admin/tokens-admin.component';
import { ScadaWebServiceLinkComponent } from './components/system-admin/web-services-admin/scada-web-service-link/scada-web-service-link.component';
import { WebServiceAdminComponent } from './components/system-admin/web-services-admin/web-service-admin/web-service-admin.component';
import { EmailConfigComponent } from './components/system-admin/email-config/email-config.component';
import { NewEmailServerComponent } from './components/system-admin/email-config/new-email-server/new-email-server.component';
import { EmailTemplatesConfigComponent } from './components/system-admin/email-templates-config/email-templates-config.component';
import { NewTemplateComponent } from './components/system-admin/email-templates-config/new-template/new-template.component';
import { ArchitectureMonitoringComponent } from './components/system-admin/architecture-monitoring/architecture-monitoring.component';
import { CataloguesComponent } from './components/system-admin/catalogues/catalogues.component';
import { CatalogueViewerComponent } from './components/system-admin/catalogues/catalogue-viewer/catalogue-viewer.component';
import { CatalogueManagementComponent } from './components/system-admin/catalogues/catalogue-management/catalogue-management.component';
import { SystemParamsComponent } from './components/system-admin/system-params/system-params.component';
import { BackupsComponent } from './components/system-admin/backups/backups.component';
import { UsersProfilesComponent } from './components/users-profiles/users-profiles.component';
import { UsersAdminComponent } from './components/users-profiles/users-admin/users-admin.component';
import { NewUserComponent } from './components/users-profiles/users-admin/new-user/new-user.component';
import { ProfilesAdminComponent } from './components/users-profiles/profiles-admin/profiles-admin.component';
import { NewProfileComponent } from './components/users-profiles/profiles-admin/new-profile/new-profile.component';
import { EquipmentManagementComponent } from './components/equipment-management/equipment-management.component';
import { NewEquipmentComponent } from './components/equipment-management/new-equipment/new-equipment.component';
import { FamiliesManagementComponent } from './components/equipment-management/families-management/families-management.component';
import { SubfamiliesManagementComponent } from './components/equipment-management/subfamilies-management/subfamilies-management.component';
import { EquipmentTypesManagementComponent } from './components/equipment-management/equipment-types-management/equipment-types-management.component';
import { EquipmentLocationComponent } from './components/equipment-management/equipment-location/equipment-location.component';
import { ArborescenceCalendarComponent } from './components/equipment-management/arborescence-calendar/arborescence-calendar.component';
import { PreventiveMaintenanceComponent } from './components/preventive-maintenance/preventive-maintenance.component';
import { WorkOrdersComponent } from './components/preventive-maintenance/work-orders/work-orders.component';
import { NewWorkOrderComponent } from './components/preventive-maintenance/work-orders/new-work-order/new-work-order.component';
import { BudgetAnalysisComponent } from './components/preventive-maintenance/work-orders/budget-analysis/budget-analysis.component';
import { ActiveOrdersComponent } from './components/preventive-maintenance/active-orders/active-orders.component';
import { ActivationsByActivatorsComponent } from './components/preventive-maintenance/activations-by-activators/activations-by-activators.component';
import { EditActivatorComponent } from './components/preventive-maintenance/activations-by-activators/edit-activator/edit-activator.component';
import { MaintenanceSimulationComponent } from './components/preventive-maintenance/maintenance-simulation/maintenance-simulation.component';
import { ExtractMaintenancePlanComponent } from './components/preventive-maintenance/extract-maintenance-plan/extract-maintenance-plan.component';
import { UnprogrammedVisitsComponent } from './components/preventive-maintenance/unprogrammed-visits/unprogrammed-visits.component';
import { NewVisitComponent } from './components/preventive-maintenance/active-orders/new-visit/new-visit.component';
import { ProcessManagementComponent } from './components/process-management/process-management.component';
import { WorkflowManagementComponent } from './components/process-management/workflow-management/workflow-management.component';
import { MulticriteriaSearchesComponent } from './components/process-management/multicriteria-searches/multicriteria-searches.component';
import { TaskManagementComponent } from './components/process-management/task-management/task-management.component';
import { WorkflowRequestManagementComponent } from './components/process-management/workflow-request-management/workflow-request-management.component';
import { TaskRequestFromWorkflowComponent } from './components/process-management/workflow-request-management/task-request-from-workflow/task-request-from-workflow.component';
import { GdelComponent } from './components/gdel/gdel.component';
import { AcquisitionManagementComponent } from './components/acquisition-management/acquisition-management.component';
import { PurchaseLineComponent } from './components/acquisition-management/acquisition/purchase-line/purchase-line.component';
import { ShoppingComponent } from './components/acquisition-management/acquisition/shopping/shopping.component';
import { ShoppingCartComponent } from './components/acquisition-management/acquisition/shopping/shopping-cart/shopping-cart.component';
import { ArtitleInformationComponent } from './components/acquisition-management/acquisition/shopping/artitle-information/artitle-information.component';
import { OrdersComponent } from './components/acquisition-management/acquisition/orders/orders.component';
import { DetailsOrderComponent } from './components/acquisition-management/acquisition/orders/details-order/details-order.component';
import { DocumentOrderComponent } from './components/acquisition-management/acquisition/document-order/document-order.component';
import { ProvidersComponent } from './components/acquisition-management/provider/providers/providers.component';
import { ProviderFormComponent } from './components/acquisition-management/provider/providers/provider-form/provider-form.component';
import { ArtitleComponent } from './components/acquisition-management/provider/artitle/artitle.component';
import { ArtitleFormComponent } from './components/acquisition-management/provider/artitle/artitle-form/artitle-form.component';
import { OrderReceptionComponent } from './components/acquisition-management/dispatch/order-reception/order-reception.component';
import { RegisterArtitleComponent } from './components/acquisition-management/dispatch/order-reception/register-artitle/register-artitle.component';
import { ArtitleListReceptionComponent } from './components/acquisition-management/dispatch/order-reception/artitle-list-reception/artitle-list-reception.component';
import { MoveStockComponent } from './components/acquisition-management/dispatch/order-reception/move-stock/move-stock.component';
import { PartialDeliveriesComponent } from './components/acquisition-management/dispatch/partial-deliveries/partial-deliveries.component';
import { IssueTrackingComponent } from './components/acquisition-management/dispatch/issue-tracking/issue-tracking.component';
import { DelayAnalysisComponent } from './components/acquisition-management/dispatch/delay-analysis/delay-analysis.component';
import { DispatchManagementComponent } from './components/acquisition-management/dispatch/dispatch-management/dispatch-management.component';
import { DispatchFormComponent } from './components/acquisition-management/dispatch/dispatch-management/dispatch-form/dispatch-form.component';
import { ControlInvoiceComponent } from './components/acquisition-management/invoice/control-invoice/control-invoice.component';
import { PaymentOrderComponent } from './components/acquisition-management/invoice/payment-order/payment-order.component';
import { BudgetComponent } from './components/acquisition-management/invoice/budget/budget.component';
import { CountersActivatorsComponent } from './components/counters-activators/counters-activators.component';
import { CountersManagementComponent } from './components/counters-activators/counters-management/counters-management.component';
import { CounterFormComponent } from './components/counters-activators/counters-management/counter-form/counter-form.component';
import { ActivatorsManagementComponent } from './components/counters-activators/activators-management/activators-management.component';
import { ActivatorFormComponent } from './components/counters-activators/activators-management/activator-form/activator-form.component';
import { InventoryManagementComponent } from './components/inventory-management/inventory-management.component';
import { DescriptionSheetStockComponent } from './components/inventory-management/description-sheet-stock/description-sheet-stock.component';
import { MultiCriteriaSearchComponent } from './components/inventory-management/multi-criteria-search/multi-criteria-search.component';
import { LocationStockComponent } from './components/inventory-management/location-stock/location-stock.component';
import { HistoryLocationStockComponent } from './components/inventory-management/location-stock/history-location-stock/history-location-stock.component';
import { WarehouseManagementComponent } from './components/inventory-management/warehouse-management/warehouse-management.component';
import { WarehouseFormComponent } from './components/inventory-management/warehouse-management/warehouse-form/warehouse-form.component';
import { AreaManagemenetComponent } from './components/inventory-management/warehouse-management/area-managemenet/area-managemenet.component';
import { LevelManagementComponent } from './components/inventory-management/warehouse-management/level-management/level-management.component';
import { ZoneManagementComponent } from './components/inventory-management/warehouse-management/zone-management/zone-management.component';
import { ExchangeArticlesComponent } from './components/inventory-management/exchange-articles/exchange-articles.component';
import { MaxMinStockComponent } from './components/inventory-management/max-min-stock/max-min-stock.component';
import { ReplenishmentQuantitiesComponent } from './components/inventory-management/replenishment-quantities/replenishment-quantities.component';
import { BarcodeManagementComponent } from './components/inventory-management/barcode-management/barcode-management.component';
import { DueDateStockComponent } from './components/inventory-management/due-date-stock/due-date-stock.component';
import { DocumentAssociationComponent } from './components/inventory-management/document-association/document-association.component';
import { DocumentByStockComponent } from './components/inventory-management/document-association/document-by-stock/document-by-stock.component';
import { NomenclatureManagementComponent } from './components/inventory-management/nomenclature-management/nomenclature-management.component';
import { ObjectPropertiesArtitleComponent } from './components/inventory-management/object-properties-artitle/object-properties-artitle.component';
import { DetailsObjectPropertiesComponent } from './components/inventory-management/object-properties-artitle/details-object-properties/details-object-properties.component';
import { ArticleClasificationComponent } from './components/inventory-management/article-clasification/article-clasification.component';
import { ValueStockComponent } from './components/inventory-management/value-stock/value-stock.component';
import { WithoutMovementsArticleComponent } from './components/inventory-management/without-movements-article/without-movements-article.component';
import { ResetArticlesComponent } from './components/inventory-management/reset-articles/reset-articles.component';
import { CorrectiveMaintenanceComponent } from './components/corrective-maintenance/corrective-maintenance.component';
import { OperationsManagementComponent } from './components/corrective-maintenance/operations-management/operations-management.component';
import { CorrectiveOrderFormComponent } from './components/corrective-maintenance/operations-management/corrective-order-form/corrective-order-form.component';
import { MaintenancePlanningComponent } from './components/corrective-maintenance/maintenance-planning/maintenance-planning.component';
import { PlanRegisterComponent } from './components/corrective-maintenance/maintenance-planning/plan-register/plan-register.component';
import { SecurityManagementComponent } from './components/corrective-maintenance/security-management/security-management.component';
import { ReportsProductionComponent } from './components/corrective-maintenance/reports-production/reports-production.component';
import { CorrectiveWorkOrderFormFieldsComponent } from './components/corrective-maintenance/corrective-work-order-form-fields/corrective-work-order-form-fields.component';
import { WorkGroupsComponent } from './components/corrective-maintenance/work-groups/work-groups.component';
import { PersonalManagementComponent } from './components/personal-management/personal-management.component';
import { PageNotFoundComponent } from './components/resources/page-not-found/page-not-found.component';
import { SubcontratistComponent } from './components/personal-management/subcontratist/subcontratist.component';
import { SubcontratistFormComponent } from './components/personal-management/subcontratist/subcontratist-form/subcontratist-form.component';
import { ContractManagementComponent } from './components/personal-management/subcontratist/contract-management/contract-management.component';
import { EmployeeComponent } from './components/personal-management/employee/employee.component';
import { EmployeeFormComponent } from './components/personal-management/employee/employee-form/employee-form.component';
import { HourlyRateComponent } from './components/personal-management/employee/hourly-rate/hourly-rate.component';
import { ScheduleActivitiesComponent } from './components/personal-management/employee/schedule-activities/schedule-activities.component';
import { OrdersEmployeeComponent } from './components/personal-management/employee/orders-employee/orders-employee.component';
import { ContractsManagementEmployeeComponent } from './components/personal-management/employee/contracts-management-employee/contracts-management-employee.component';
import { InterventionComponent } from './components/personal-management/intervention/intervention.component';
import { ContractFormComponent } from './components/personal-management/intervention/contract-form/contract-form.component';
import { WorkTeamComponent } from './components/personal-management/work-team/work-team.component';
import { BudgetManagementComponent } from './components/budget-management/budget-management.component';
import { BudgetTrackingComponent } from './components/budget-management/budget-tracking/budget-tracking.component';
import { EquipmentTrackingComponent } from './components/budget-management/equipment-tracking/equipment-tracking.component';
import { BudgetProjectionsComponent } from './components/budget-management/budget-projections/budget-projections.component';
import { TransferredBalanceComponent } from './components/budget-management/transferred-balance/transferred-balance.component';
import { PaymentMethodManagementComponent } from './components/budget-management/payment-method-management/payment-method-management.component';
import { FailureAnalysisComponent } from './components/failure-analysis/failure-analysis.component';
import { FailureListComponent } from './components/failure-analysis/failure-list/failure-list.component';
import { SymptomListComponent } from './components/failure-analysis/symptom-list/symptom-list.component';
import { SymptomListFormComponent } from './components/failure-analysis/symptom-list/symptom-list-form/symptom-list-form.component';
import { FailureLogComponent } from './components/failure-analysis/failure-log/failure-log.component';
import { HistoryFailureEquipmentComponent } from './components/failure-analysis/failure-log/history-failure-equipment/history-failure-equipment.component';
import { DetailsHistoryFailureEquipmentComponent } from './components/failure-analysis/failure-log/details-history-failure-equipment/details-history-failure-equipment.component';
import { StatisticalAnalysisComponent } from './components/failure-analysis/statistical-analysis/statistical-analysis.component';
import { AlarmEmissionComponent } from './components/failure-analysis/alarm-emission/alarm-emission.component';
import { AnalysisFilterEquationFailuresComponent } from './components/failure-analysis/analysis-filter-equation-failures/analysis-filter-equation-failures.component';
import { ControlPanelComponent } from './components/control-panel/control-panel.component';
import { BroadcastListsComponent } from './components/control-panel/broadcast-lists/broadcast-lists.component';
import { DataExportSelectionComponent } from './components/control-panel/data-export-selection/data-export-selection.component';
import { DataElectionConfigComponent } from './components/control-panel/data-export-selection/data-election-config/data-election-config.component';
import { SpreadsheetExportComponent } from './components/control-panel/spreadsheet-export/spreadsheet-export.component';
import { GraphicInterfaceIndicatorsComponent } from './components/control-panel/graphic-interface-indicators/graphic-interface-indicators.component';
import { AddElementsComponent } from './components/control-panel/graphic-interface-indicators/add-elements/add-elements.component';
import { ControlPanelPreviewComponent } from './components/control-panel/graphic-interface-indicators/control-panel-preview/control-panel-preview.component';
import { CorrectiveOrderFormWithoutMeasuresComponent } from './components/corrective-maintenance/operations-management/corrective-order-form-without-measures/corrective-order-form-without-measures.component';
import { OrganizationComponent } from './components/personal-management/organization/organization.component';
import { EditOrganizationComponent } from './components/personal-management/organization/edit-organization/edit-organization.component';
import { InitialDataUploadComponent } from './components/initial-data-upload/initial-data-upload.component';
import { CorrectiveDocumentsUploadComponent } from './components/initial-data-upload/corrective-documents-upload/corrective-documents-upload.component';
import { EquipmentLruUploadComponent } from './components/initial-data-upload/equipment-lru-upload/equipment-lru-upload.component';
import { PreventiveDocumentsUploadComponent } from './components/initial-data-upload/preventive-documents-upload/preventive-documents-upload.component';
import { RelatedDocumentsUploadComponent } from './components/initial-data-upload/related-documents-upload/related-documents-upload.component';
import { FormsManagementFormComponent } from './components/forms-management-form/forms-management-form.component';

const routes: Routes = [
  { path: '', redirectTo: '/login', pathMatch: 'full' },
  //{ path: '**', pathMatch: 'full', component: PageNotFoundComponent },
  { path: 'login', component: LoginComponent, canActivate: [loginGuard] },
  {
    path: 'sam',
    component: TemplateComponent,
    canActivate: [authGuard],
    canActivateChild: [permissionGuard],
    children: [
      //Página de inicio
      { path: 'home', component: HomeComponent },
      //Administración del sistema
      { path: 'ADSI', component: SystemAdminComponent },
      { path: 'ADSI/MAUS', component: ConnectionsComponent }, //Monitoreo de acceso de los usuarios
      { path: 'ADSI/MAUS/detalles', component: UserConnectionsComponent }, //Detalles de accesos por usuario
      { path: 'ADSI/SAUS', component: ActionsComponent }, //Seguimiento de acciones de los usuarios
      { path: 'ADSI/SAUS/detalles', component: DetailsComponent }, //Detalles de las acciones de los usuarios
      { path: 'ADSI/CRAV', component: AdvicesComponent }, //Historial de avisos registrados
      { path: 'ADSI/CRAV/nuevo', component: NewAdviceComponent }, //Creación de avisos nuevos
      { path: 'ADSI/CRAV/editar', component: NewAdviceComponent }, //Edición de avisos
      { path: 'ADSI/POSE', component: SecurityPoliticsComponent }, //Políticas de seguridad
      { path: 'ADSI/MOMA', component: MaintenanceModeComponent }, //Modo mantenimiento
      { path: 'ADSI/ASWA', component: WebServicesAdminComponent }, //Administrador del servicio web de alarmas y contadores
      { path: 'ADSI/ASWA/ADSC', component: ScadaAdminComponent }, //Administrar SCADA
      { path: 'ADSI/ASWA/ADTO', component: TokensAdminComponent }, //Administrar tokens
      { path: 'ADSI/ASWA/ESSW', component: ScadaWebServiceLinkComponent }, //Enrutamiento de SCADAs al servicio web
      { path: 'ADSI/ASWA/LSWE', component: WebServiceAdminComponent }, //Lista de servicios web
      { path: 'ADSI/CCEL', component: EmailConfigComponent }, //Configuración de correos electrónicos
      { path: 'ADSI/CCEL/nuevo', component: NewEmailServerComponent }, //Registro de servidor de correos electrónicos
      { path: 'ADSI/CCEL/editar', component: NewEmailServerComponent }, //Edición de servidor de correos electrónicos
      { path: 'ADSI/CPCE', component: EmailTemplatesConfigComponent }, //Configuración de plantillas de correos electrónicos
      { path: 'ADSI/CPCE/nuevo', component: NewTemplateComponent }, //Registro de una nueva plantilla de correos electrónicos
      { path: 'ADSI/CPCE/editar', component: NewTemplateComponent }, //Edición de una plantilla de correos electrónicos
      { path: 'ADSI/MACS', component: ArchitectureMonitoringComponent }, //Monitoreo de la arquitectura central del SAM
      { path: 'ADSI/AGCA', component: CataloguesComponent }, //Administración global de catálogos
      { path: 'ADSI/AGCA/lector', component: CatalogueViewerComponent },
      { path: 'ADSI/AGCA/adminstrar', component: CatalogueManagementComponent },
      { path: 'ADSI/PASI', component: SystemParamsComponent }, //Parámetros del sistema
      {
        path: 'ADSI/PASI/editar-formulario/:form',
        component: FormsManagementFormComponent,
      }, //Parámetros del sistema
      {
        path: 'ADSI/PASI/registrar-formulario/:form',
        component: FormsManagementFormComponent,
      }, //Parámetros del sistema
      { path: 'ADSI/GERE', component: BackupsComponent }, //Gestión de respaldos
      //Usuarios y perfiles
      { path: 'USPE', component: UsersProfilesComponent },
      { path: 'USPE/GEUS/ADUS', component: UsersAdminComponent },
      { path: 'USPE/GEUS/ADUS/crear', component: NewUserComponent },
      { path: 'USPE/GEPE/ADPE', component: ProfilesAdminComponent },
      { path: 'USPE/GEPE/ADPE/crear', component: NewProfileComponent },
      { path: 'USPE/GEPE/ADPE/editar', component: NewProfileComponent },
      { path: 'USPE/GEPE/ADPE/detalles', component: NewProfileComponent },
      // Gestión de los procesos
      { path: 'GEPR', component: ProcessManagementComponent },
      { path: 'GEPR/GFTR/GFTR', component: WorkflowManagementComponent },
      { path: 'GEPR/GFTR/BUMU', component: MulticriteriaSearchesComponent },
      { path: 'GEPR/GETA/GETA', component: TaskManagementComponent },
      {
        path: 'GEPR/GETA/GETA/:idworkflow',
        component: TaskManagementComponent,
      },
      { path: 'GEPR/SFTR/GSFT', component: WorkflowRequestManagementComponent },
      {
        path: 'GEPR/SFTR/GSFT/:form',
        component: TaskRequestFromWorkflowComponent,
      },
      // Gestion Documental Electronica
      { path: 'GDEL', component: GdelComponent },
      // Gestión de adquisiciones
      { path: 'GEAD', component: AcquisitionManagementComponent },
      { path: 'GEAD/ADQU/NSCO', component: PurchaseLineComponent }, // Nueva solicitudes de compra
      { path: 'GEAD/ADQU/SEPE', component: OrdersComponent }, // Creación de grupos de pedidos
      {
        path: 'GEAD/ADQU/SEPE/details-order/:numberOrder/:numberProvider',
        component: DetailsOrderComponent,
      }, // Creación de grupos de pedidos
      { path: 'GEAD/ADQU/CGPE/:info', component: ShoppingComponent }, // Seguimiento de los pedidos
      {
        path: 'GEAD/ADQU/CGPE/information/:idArtitle/:idProvider/:info',
        component: ArtitleInformationComponent,
      }, // Información del artículo
      {
        path: 'GEAD/ADQU/CGPE/shopping-cart/:info',
        component: ShoppingCartComponent,
      }, // Carrito de compra
      { path: 'GEAD/ADQU/GEDO/:line', component: DocumentOrderComponent }, // Gestión de documentos
      { path: 'GEAD/PROV/SOPR/:info', component: ShoppingComponent }, // Solicitud de precios
      { path: 'GEAD/PROV/CRPR', component: ProvidersComponent }, // Consulta de referencias del proveedor
      { path: 'GEAD/PROV/CRPR/:form', component: ProviderFormComponent }, // Consulta de referencias del proveedor
      { path: 'GEAD/PROV/ESWP', component: ProvidersComponent }, // Nuevas solicitudes de compra
      { path: 'GEAD/PROV/ESWP/:form', component: ProviderFormComponent }, // Nuevas solicitudes de compra
      { path: 'GEAD/PROV/COPR', component: ProvidersComponent }, // Contactos del proveedor
      { path: 'GEAD/PROV/COPR/:form', component: ProviderFormComponent }, // Contactos del proveedor
      { path: 'GEAD/PROV/DCMP', component: ProvidersComponent }, // Definición de condiciones y medios de pago
      { path: 'GEAD/PROV/DCMP/:form', component: ProviderFormComponent }, // Definición de condiciones y medios de pago
      { path: 'GEAD/PROV/DCCE', component: ProvidersComponent }, // Definición de condiciones de compra y entrega
      { path: 'GEAD/PROV/DCCE/:form', component: ProviderFormComponent }, // Definición de condiciones de compra y entrega
      { path: 'GEAD/PROV/CCPR', component: ProvidersComponent }, // Conexión a los catálogos de los proveedores
      { path: 'GEAD/PROV/CCPR/:form', component: ProviderFormComponent }, // Conexión a los catálogos de los proveedores
      { path: 'GEAD/PROV/GVPA', component: ArtitleComponent }, // Gestinar varios proveedores por artículos
      { path: 'GEAD/PROV/GVPA/:form', component: ArtitleFormComponent },
      { path: 'GEAD/DESP/REPE', component: OrderReceptionComponent }, // Recepción de pedidos
      {
        path: 'GEAD/DESP/REPE/register/:form',
        component: RegisterArtitleComponent,
      }, // Recepción de pedidos
      {
        path: 'GEAD/DESP/REPE/list-artitle-reception/:form',
        component: ArtitleListReceptionComponent,
      }, // Recepción de pedidos
      {
        path: 'GEAD/DESP/REPE/register-equipment/:form',
        component: MoveStockComponent,
      }, // Recepción de pedidos
      { path: 'GEAD/DESP/GEPA', component: PartialDeliveriesComponent }, // Gestión de entregas parciales
      { path: 'GEAD/DESP/SEPR', component: IssueTrackingComponent }, // Seguimiento de problemas
      { path: 'GEAD/DESP/ANRE', component: DelayAnalysisComponent }, // Análisis de retrasos
      { path: 'GEAD/DESP/MDDE', component: DispatchManagementComponent }, // Multiples direcciones de despacho
      { path: 'GEAD/DESP/MDDE/form/:form', component: DispatchFormComponent }, // Multiples direcciones de despacho
      { path: 'GEAD/FACT/COFA', component: ControlInvoiceComponent }, // Control de facturas
      { path: 'GEAD/FACT/ABPE', component: PaymentOrderComponent }, // Abono de pedidos
      { path: 'GEAD/FACT/GCPR', component: BudgetComponent }, // Gestión de costos y presupuestos
      //Contadores y activadores
      { path: 'COAC', component: CountersActivatorsComponent },
      { path: 'COAC/CONT/GECO', component: CountersManagementComponent },
      { path: 'COAC/CONT/GECO/nuevo', component: CounterFormComponent },
      { path: 'COAC/CONT/GECO/editar', component: CounterFormComponent },
      { path: 'COAC/ACTI/GEAC', component: ActivatorsManagementComponent },
      { path: 'COAC/ACTI/GEAC/nuevo', component: ActivatorFormComponent },
      { path: 'COAC/ACTI/GEAC/editar', component: ActivatorFormComponent },
      //Gestión de los equipamientos
      { path: 'GEEQ', component: EquipmentManagementComponent },
      { path: 'GEEQ/REEQ', component: NewEquipmentComponent },
      { path: 'GEEQ/DFSU', component: FamiliesManagementComponent },
      {
        path: 'GEEQ/DFSU/subfamilias',
        component: SubfamiliesManagementComponent,
      },
      { path: 'GEEQ/ADEQ/GCTE', component: EquipmentTypesManagementComponent },
      { path: 'GEEQ/ADEQ/LOEQ', component: EquipmentLocationComponent },
      { path: 'GEEQ/ADEQ/VAFD', component: ArborescenceCalendarComponent },
      // Gestión de inventario y/o stock
      { path: 'GIST', component: InventoryManagementComponent },
      { path: 'GIST/FDAR', component: DescriptionSheetStockComponent },
      { path: 'GIST/BUMU', component: MultiCriteriaSearchComponent },
      { path: 'GIST/GEST', component: LocationStockComponent },
      {
        path: 'GIST/GEST/history/:idStock',
        component: HistoryLocationStockComponent,
      },
      { path: 'GIST/GEAL', component: WarehouseManagementComponent },
      { path: 'GIST/GEAL/form/:form', component: WarehouseFormComponent },
      { path: 'GIST/GEAL/areas/:info', component: AreaManagemenetComponent },
      { path: 'GIST/GEAL/niveles/:info', component: LevelManagementComponent },
      { path: 'GIST/GEAL/zonas/:info', component: ZoneManagementComponent },
      { path: 'GIST/IAEA', component: ExchangeArticlesComponent },
      { path: 'GIST/DSMM', component: MaxMinStockComponent },
      { path: 'GIST/DCRE', component: ReplenishmentQuantitiesComponent },
      { path: 'GIST/GAIC', component: BarcodeManagementComponent },
      { path: 'GIST/GFVA', component: DueDateStockComponent },
      { path: 'GIST/ASDO', component: DocumentAssociationComponent },
      {
        path: 'GIST/ASDO/detalles/:idStock',
        component: DocumentByStockComponent,
      },
      { path: 'GIST/GENO', component: NomenclatureManagementComponent },
      { path: 'GIST/CFAR', component: FamiliesManagementComponent },
      { path: 'GIST/RAOP', component: ObjectPropertiesArtitleComponent },
      {
        path: 'GIST/RAOP/details/:idStock',
        component: DetailsObjectPropertiesComponent,
      },
      {
        path: 'GIST/analysis-tool/article-clasificate',
        component: ArticleClasificationComponent,
      },
      {
        path: 'GIST/analysis-tool/value-stock',
        component: ValueStockComponent,
      },
      {
        path: 'GIST/analysis-tool/without-movements-article',
        component: WithoutMovementsArticleComponent,
      },
      {
        path: 'GIST/analysis-tool/reset-articles',
        component: ResetArticlesComponent,
      },
      { path: 'GIST/register/:form', component: RegisterArtitleComponent }, // Recepción de pedidos
      //Gestión de mantenimiento correctivo
      { path: 'GMCO', component: CorrectiveMaintenanceComponent },
      { path: 'GMCO/ORTR/GEOP', component: OperationsManagementComponent },
      { path: 'GMCO/ORTR/GEOP/nuevo', component: CorrectiveOrderFormComponent },
      {
        path: 'GMCO/ORTR/GEOP/editar',
        component: CorrectiveOrderFormComponent,
      },
      {
        path: 'GMCO/ORTR/GEOP/nuevo-sin-mediciones',
        component: CorrectiveOrderFormWithoutMeasuresComponent,
      },
      {
        path: 'GMCO/ORTR/GEOP/editar-sin-mediciones',
        component: CorrectiveOrderFormWithoutMeasuresComponent,
      },
      { path: 'GMCO/GEME/PLAN', component: MaintenancePlanningComponent },
      { path: 'GMCO/GEME/PLAN/nuevo', component: PlanRegisterComponent },
      { path: 'GMCO/GEME/PLAN/editar', component: PlanRegisterComponent },
      { path: 'GMCO/GEME/GESE', component: SecurityManagementComponent },
      { path: 'GMCO/GEME/GEDC', component: GdelComponent },
      { path: 'GMCO/PRIN/PRIN', component: ReportsProductionComponent },
      {
        path: 'GMCO/FUFL/COCA',
        component: CorrectiveWorkOrderFormFieldsComponent,
      },
      { path: 'GMCO/FUFL/AEMA', component: WorkGroupsComponent },
      //Gestión de mantenimiento preventivo
      { path: 'GMPR', component: PreventiveMaintenanceComponent },
      { path: 'GMPR/ORTR/COTP', component: WorkOrdersComponent },
      { path: 'GMPR/ORTR/COTP/nuevo', component: NewWorkOrderComponent },
      { path: 'GMPR/ORTR/COTP/editar', component: NewWorkOrderComponent },
      { path: 'GMPR/ORTR/COTP/analisis', component: BudgetAnalysisComponent },
      { path: 'GMPR/AOTR/ACMA', component: ActiveOrdersComponent },
      { path: 'GMPR/AOTR/AFDT', component: ActivationsByActivatorsComponent },
      { path: 'GMPR/AOTR/AFDT/editar', component: EditActivatorComponent },
      { path: 'GMPR/AOTR/SPMA', component: MaintenanceSimulationComponent },
      { path: 'GMPR/AOTR/EPMA', component: ExtractMaintenancePlanComponent },
      { path: 'GMPR/AOTR/RVTP', component: UnprogrammedVisitsComponent },
      { path: 'GMPR/AOTR/RVTP/register', component: NewVisitComponent },
      // Gestion de Personal de Mantenimiento
      { path: 'GPRS', component: PersonalManagementComponent },
      { path: 'GPRS/GESU/GESU', component: SubcontratistComponent },
      {
        path: 'GPRS/GESU/GESU/subcontratist/form/:form',
        component: SubcontratistFormComponent,
      },
      { path: 'GPRS/GESU/ADCO', component: ContractManagementComponent },
      { path: 'GPRS/GEPE/GEPE', component: EmployeeComponent },
      {
        path: 'GPRS/GEPE/GEPE/employee/form/:id/:enable',
        component: EmployeeFormComponent,
      },
      {
        path: 'GPRS/GEPE/GEPE/tasa-horaria/:idEmployee',
        component: HourlyRateComponent,
      },
      {
        path: 'GPRS/GEPE/GEPE/cronograma-actividades/:idEmployee',
        component: ScheduleActivitiesComponent,
      },
      {
        path: 'GPRS/GEPE/GEPE/employee/orders/:id/:name',
        component: OrdersEmployeeComponent,
      },
      {
        path: 'GPRS/GEPE/ACEM',
        component: ContractsManagementEmployeeComponent,
      },
      { path: 'GPRS/GEIN/ADIN', component: InterventionComponent },
      { path: 'GPRS/GEIN/ADCN', component: InterventionComponent },
      {
        path: 'GPRS/GEIN/ADCN/intervention/contract-form/:id/:enable',
        component: ContractFormComponent,
      },
      { path: 'GPRS/GETR/AETR', component: WorkTeamComponent },
      { path: 'organization', component: OrganizationComponent },
      { path: 'organization/editar', component: EditOrganizationComponent },
      // Gestión presupuestaria
      { path: 'GEPE', component: BudgetManagementComponent },
      { path: 'GEPE/SPRC', component: BudgetTrackingComponent },
      { path: 'GEPE/SPEQ', component: EquipmentTrackingComponent },
      { path: 'GEPE/PRPR', component: BudgetProjectionsComponent },
      { path: 'GEPE/CSTR', component: TransferredBalanceComponent },
      { path: 'GEPE/GMPA', component: PaymentMethodManagementComponent },
      // Análisis de Fallas
      { path: 'ANFA', component: FailureAnalysisComponent },
      { path: 'ANFA/CLCF', component: FailureListComponent },
      { path: 'ANFA/CLSI', component: SymptomListComponent },
      { path: 'ANFA/CLSI/:form', component: SymptomListFormComponent },
      { path: 'ANFA/BIFA', component: FailureLogComponent },
      {
        path: 'ANFA/BIFA/history/:equipment',
        component: HistoryFailureEquipmentComponent,
      },
      {
        path: 'ANFA/BIFA/history-details/:failure/:equipment',
        component: DetailsHistoryFailureEquipmentComponent,
      },
      { path: 'ANFA/AEFA', component: StatisticalAnalysisComponent },
      { path: 'ANFA/EMAL', component: AlarmEmissionComponent },
      { path: 'ANFA/AFEF', component: AnalysisFilterEquationFailuresComponent },
      // Panel de control
      { path: 'PCSA', component: ControlPanelComponent },
      { path: 'PCSA/CLDI', component: BroadcastListsComponent },
      { path: 'PCSA/EDES', component: DataExportSelectionComponent },
      {
        path: 'PCSA/EDES/data-election-config',
        component: DataElectionConfigComponent,
      },
      { path: 'PCSA/EDJC', component: SpreadsheetExportComponent },
      { path: 'PCSA/MIIG', component: GraphicInterfaceIndicatorsComponent },
      { path: 'PCSA/MIIG/add-elements', component: AddElementsComponent },
      {
        path: 'PCSA/MIIG/panel-preview',
        component: ControlPanelPreviewComponent,
      },
      //Carga inicial de datos
      { path: 'initial-data-upload', component: InitialDataUploadComponent },
      {
        path: 'initial-data-upload/CDUP',
        component: CorrectiveDocumentsUploadComponent,
      },
      {
        path: 'initial-data-upload/ELUP',
        component: EquipmentLruUploadComponent,
      },
      {
        path: 'initial-data-upload/PDUP',
        component: PreventiveDocumentsUploadComponent,
      },
      {
        path: 'initial-data-upload/RDUP',
        component: RelatedDocumentsUploadComponent,
      },
    ],
  },
];

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