import { ApplicationConfig, LOCALE_ID, provideBrowserGlobalErrorListeners, } from '@angular/core'; import { registerLocaleData } from '@angular/common'; import { provideHttpClient, withInterceptors } from '@angular/common/http'; import localeEs from '@angular/common/locales/es'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; import { provideRouter, withComponentInputBinding } from '@angular/router'; <% if (hasPwa) { %>import { provideServiceWorker } from '@angular/service-worker'; <% } %>import { provideTanStackQuery, QueryClient } from '@tanstack/angular-query-experimental'; import { CookieService } from 'ngx-cookie-service'; import { routes } from './app.routes'; import { ApiPrefixInterceptor } from './core/interceptors/api-prefix.interceptor'; import { HttpHeadersInterceptor } from './core/interceptors/http-headers.interceptor'; registerLocaleData(localeEs); export const appConfig: ApplicationConfig = { providers: [ CookieService, { provide: LOCALE_ID, useValue: 'es' }, provideAnimationsAsync(), provideBrowserGlobalErrorListeners(), provideRouter(routes, withComponentInputBinding()), provideHttpClient(withInterceptors([ApiPrefixInterceptor, HttpHeadersInterceptor])), provideTanStackQuery(new QueryClient())<% if (hasPwa) { %>, provideServiceWorker('ngsw-worker.js', { enabled: typeof window !== 'undefined' && !['localhost', '127.0.0.1'].includes(window.location.hostname), registrationStrategy: 'registerWhenStable:30000', })<% } %>, ], };