import { InjectionToken, inject } from '@angular/core';
import { environment } from '../../../../../environments/environment';
import { AdminModerationGateway } from './admin-moderation-gateway.interface';
import { AdminModerationLocalGateway } from './admin-moderation-local.gateway';
import { AdminModerationApiGateway } from './admin-moderation-api.gateway';

/** Swap point. */
export const ADMIN_MODERATION_GATEWAY = new InjectionToken<AdminModerationGateway>('ADMIN_MODERATION_GATEWAY', {
  providedIn: 'root',
  factory: () => (environment.useMockData ? inject(AdminModerationLocalGateway) : inject(AdminModerationApiGateway)),
});
