import { InjectionToken, inject } from '@angular/core';
import { environment } from '../../../../../environments/environment';
import { AdminMonitoringGateway } from './admin-monitoring-gateway.interface';
import { AdminMonitoringLocalGateway } from './admin-monitoring-local.gateway';
import { AdminMonitoringApiGateway } from './admin-monitoring-api.gateway';

/** Swap point. */
export const ADMIN_MONITORING_GATEWAY = new InjectionToken<AdminMonitoringGateway>('ADMIN_MONITORING_GATEWAY', {
  providedIn: 'root',
  factory: () => (environment.useMockData ? inject(AdminMonitoringLocalGateway) : inject(AdminMonitoringApiGateway)),
});
