import { ApplicationConfig } from '@angular/core'; import { PreloadAllModules, provideRouter, withComponentInputBinding, withInMemoryScrolling, withPreloading, withViewTransitions, } from '@angular/router'; import { routes } from './app.routes'; import { provideHttpClient, withFetch } from '@angular/common/http'; import { provideAnimations } from '@angular/platform-browser/animations'; import { provideToastr } from 'ngx-toastr'; import { PROFILE_REPOSITORY_TOKEN } from '@app/infrastructure/profiles/profile-repository.token'; import { PbProfileRepository } from '@app/infrastructure/profiles/pb-profile.repository'; import { PROJECT_REPOSITORY_TOKEN } from '@app/infrastructure/projects/project-repository.token'; import { PbProjectRepository } from '@app/infrastructure/projects/pb-project.repository'; import { SECTOR_REPOSITORY_TOKEN } from '@app/infrastructure/sectors/sector-repository.token'; import { PbSectorRepository } from '@app/infrastructure/sectors/pb-sector.repository'; import { USER_REPOSITORY_TOKEN } from '@app/infrastructure/users/user-repository.token'; import { PbUserRepository } from '@app/infrastructure/users/pb-user.repository'; import { AUTH_REPOSITORY_TOKEN } from '@app/infrastructure/authentification/auth-repository.token'; import { PbAuthRepository } from '@app/infrastructure/authentification/pb-auth.repository'; import { WEB_SHARE_SERVICE_TOKEN } from '@app/infrastructure/shareData/web-share.service.token'; import { WebShareService } from '@app/infrastructure/shareData/web-share.service'; export const appConfig: ApplicationConfig = { providers: [ provideRouter( routes, withViewTransitions(), withPreloading(PreloadAllModules), withInMemoryScrolling({ scrollPositionRestoration: 'enabled', anchorScrolling: 'enabled', }), withComponentInputBinding() ), provideAnimations(), provideHttpClient(withFetch()), { provide: PROFILE_REPOSITORY_TOKEN, useExisting: PbProfileRepository }, { provide: PROJECT_REPOSITORY_TOKEN, useExisting: PbProjectRepository }, { provide: SECTOR_REPOSITORY_TOKEN, useExisting: PbSectorRepository }, { provide: USER_REPOSITORY_TOKEN, useExisting: PbUserRepository }, { provide: AUTH_REPOSITORY_TOKEN, useExisting: PbAuthRepository }, { provide: WEB_SHARE_SERVICE_TOKEN, useExisting: WebShareService }, provideToastr({ timeOut: 10000, positionClass: 'toast-top-right', preventDuplicates: true, }), // Toastr providers ], };