import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideNgIconsConfig } from '@ng-icons/core';
import { environment } from '../environments/openpanel';
import { provideOpenPanel } from '@core/provider/openpanel.provider';

import { routes } from './app.routes';
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';

export const appConfig: ApplicationConfig = {
  providers: [
    provideBrowserGlobalErrorListeners(),
    provideRouter(routes), 
    provideClientHydration(withEventReplay()),
    provideNgIconsConfig({}),
    provideOpenPanel({
      clientId: environment.openPanel.clientId,
      apiUrl: environment.openPanel.apiUrl,
      trackScreenViews: true,
      debug: !environment.production,
    })
  ]
};
