import {NgModule} from "@angular/core";
import {CommonModule} from "@angular/common";
import {RouterModule} from "@angular/router";
import {EnvironmentSpecificResolver} from "../openaireLibrary/utils/properties/environmentSpecificResolver";

@NgModule({
  imports: [CommonModule, RouterModule.forChild([
    // Search Pages
    { path: '', redirectTo: 'find/research-outcomes'},
    { path: 'find/research-outcomes', loadChildren:  './searchPages/simple/searchResearchResults.module#MonitorSearchResearchResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'find/projects', loadChildren: './searchPages/simple/searchProjects.module#MonitorSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#MonitorSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#MonitorSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
  
    // Advanced Search Pages
    { path: 'advanced/research-outcomes', loadChildren:  './searchPages/advanced/searchResearchResults.module#MonitorAdvancedSearchResearchResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'advanced/projects', loadChildren: './searchPages/advanced/searchProjects.module#MonitorAdvancedSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'advanced/dataproviders', loadChildren: './searchPages/advanced/searchDataProviders.module#MonitorAdvancedSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'advanced/organizations', loadChildren: './searchPages/advanced/searchOrganizations.module#MonitorAdvancedSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    
    // Landing Pages
    { path: 'result', loadChildren: './landingPages/result/libResult.module#LibResultModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'project', loadChildren: './landingPages/project/libProject.module#LibProjectModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'dataprovider', loadChildren: './landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
    { path: 'organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
  ])],
  providers:[EnvironmentSpecificResolver]
})
export class SearchModule {}
