import { mediaMode, simpleStreamingEnabled } from '../config';
import { NoopSfuService } from './noop';
import type { SfuService } from './types';

const createSfuService = (): SfuService | null => {
  if (simpleStreamingEnabled) {
    return null;
  }

  if (mediaMode !== 'single_server_sfu') {
    return null;
  }

  return new NoopSfuService();
};

export const sfuService = createSfuService();
