import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { LocaleResolver } from '@core/resolvers/locale.resolver'; import { GCCoreModule } from '@core/_core.module'; import { ApplicationManagerResolver } from '@features/application-manager/resolvers/application-manager.resolver'; import { SystemTagsResolver } from '@features/system-tags/resolvers/system-tags.resolver'; import { NonprofitApplicantsComponent } from './nonprofit-applicants/nonprofit-applicants.component'; import { NonprofitApplicationsComponent } from './nonprofit-applications/nonprofit-applications.component'; import { NonprofitAwardsComponent } from './nonprofit-awards/nonprofit-awards.component'; import { NonprofitCommunicationsPageComponent } from './nonprofit-communications-page/nonprofit-communications-page.component'; import { NonprofitProfilePageComponent } from './nonprofit-profile-page/nonprofit-profile-page.component'; import { NonprofitProfileWrapperComponent } from './nonprofit-profile-wrapper/nonprofit-profile-wrapper.component'; import { NonprofitProfileResolver } from './nonprofit-profile.resolver'; import { NonprofitModule } from './nonprofit.module'; @NgModule({ imports: [ GCCoreModule, NonprofitModule, RouterModule.forChild([{ path: ':guid', component: NonprofitProfileWrapperComponent, resolve: { nonprofit: NonprofitProfileResolver, locale: LocaleResolver, appManager: ApplicationManagerResolver, tags: SystemTagsResolver }, data: { namespace: ['sdgs', 'nonprofits'], pageName: 'Nonprofit Profile' }, children: [{ path: 'profile', component: NonprofitProfilePageComponent, data: { breadcrumbLabel: 'Nonprofit Profile', breadcrumb: true, pageName: 'Nonprofit Profile - Profile Tab' } }, { path: 'communications', children: [{ path: '', redirectTo: '0' }, { path: ':id', component: NonprofitCommunicationsPageComponent }], data: { breadcrumbLabel: 'Nonprofit Profile', breadcrumb: true, pageName: 'Nonprofit Profile - Communications Tab' } }, { path: 'applications', component: NonprofitApplicationsComponent, data: { breadcrumbLabel: 'Nonprofit Profile', breadcrumb: true, pageName: 'Nonprofit Profile - Applications Tab' } }, { path: 'nominations', component: NonprofitApplicationsComponent, data: { breadcrumbLabel: 'Nonprofit Profile', breadcrumb: true, pageName: 'Nonprofit Profile - Nominations Tab' } }, { path: 'applicants', component: NonprofitApplicantsComponent, data: { breadcrumbLabel: 'Nonprofit Profile', breadcrumb: true, pageName: 'Nonprofit Profile - Applicants Tab' } }, { path: 'awards', component: NonprofitAwardsComponent, data: { breadcrumbLabel: 'Nonprofit Profile', breadcrumb: true, pageName: 'Nonprofit Profile - Awards Tab' } }, { path: '', pathMatch: 'full', redirectTo: 'profile' }] }]) ] }) export class NonprofitRoutingModule { }