import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { DownloadFilePageComponent } from '@core/components/download-file-page/download-file-page.component'; import { GcWrapperApplicantComponent } from '@core/components/gc-wrapper-applicant/gc-wrapper-applicant.component'; import { SSOLogoutComponent } from '@core/components/sso-logout/sso-logout.component'; import { SSORedirectComponent } from '@core/components/sso-redirect/sso-redirect.component'; import { CanAccessPortalGuard } from '@core/guards/can-access-portal.guard'; import { FeatureFlagsResolver } from '@core/resolvers/feature-flags.resolver'; import { InitialRedirectResolver } from '@core/resolvers/initial-redirect.resolver'; import { LanguageResolver } from '@core/resolvers/language-resolver'; import { LocaleResolver } from '@core/resolvers/locale.resolver'; import { StaticResourceSASResolver } from '@core/resolvers/static-resource-sas.resolver'; import { ZendeskResolver } from '@core/resolvers/zendesk.resolver'; import { UnauthenticatedGuard } from '@features/auth/unauthenticated.guard'; import { HelpContentResolver } from '@features/platform-admin/help-content/help-content.resolver'; import { UserResolver } from '@features/users/resolvers/user.resolver'; @NgModule({ imports: [ RouterModule.forChild([{ path: '', resolve: { redirect: InitialRedirectResolver, locale: LocaleResolver, zendesk: ZendeskResolver, language: LanguageResolver }, data: { namespace: ['GLOBAL', 'AUTH', 'classification'] }, children: [{ path: '', children: [{ path: 'auth', canActivate: [ UnauthenticatedGuard ], loadChildren: () => import('@features/auth/applicant-auth.module').then(m => m.ApplicantAuthModule) }, { path: 'sso_redirect', component: SSORedirectComponent }, { path: 'ssologout', component: SSOLogoutComponent }] }, { // Logged in path: '', component: GcWrapperApplicantComponent, data: { namespace: ['APPLY', 'nonprofits'] }, resolve: { featureFlags: FeatureFlagsResolver, redirect: InitialRedirectResolver, sas: StaticResourceSASResolver, locales: LocaleResolver, help: HelpContentResolver, user: UserResolver }, canActivate: [ CanAccessPortalGuard ], children: [{ path: 'download-file', component: DownloadFilePageComponent }, { path: 'my-account', loadChildren: () => import('@features/my-account/applicant-account.module').then(m => m.ApplicantAccountModule), data: { pageName: 'Applicant Portal - My Account' } }, { path: 'terms-and-conditions', loadChildren: () => import('@features/terms-and-conditions/terms-and-conditions-routing.module').then(m => m.TermsAndConditionsRoutingModule), data: { pageName: 'Applicant Portal - Terms and Conditions' } }, { path: 'awards', loadChildren: () => import('@features/applicant-awards/applicant-awards-routing.module').then(m => m.ApplicantAwardsRoutingModule), data: { pageName: 'Applicant Portal - Awards' } }, { path: 'programs', loadChildren: () => import('@features/apply/program-routing.module').then(m => m.ProgramRoutingModule), data: { pageName: 'Program Landing Page' } }, { path: 'applications', loadChildren: () => import('@features/my-applications/my-applications-routing.module').then(m => m.MyApplicationsRoutingModule), data: { pageName: 'Applicant Portal - My Applications' } }, { path: 'application', loadChildren: () => import('@features/apply/application-routing.module').then(m => m.ApplicationRoutingModule), data: { pageName: 'Application Landing Page' } }] }] }]) ] }) export class ApplyPortalRoutingModule { }