import type { ClientConfig } from './types'

import { facr } from './facr'
import { instat } from './instat'
import { lff } from './lff'
import { insports } from './insports'
import { india } from './india'
import { tunisia } from './tunisia'
import { fqtv } from './fqtv'
import { rustat } from './rustat'

export const currentClient = process.env.REACT_APP_CLIENT || 'insports'

export const isLffClient = currentClient === 'lff'
export const isInSportsClient = currentClient === 'insports'
export const isInstatClient = currentClient === 'instat'
export const isFacrClient = currentClient === 'facr'
export const isIndiaClient = currentClient === 'india'
export const isTunisClient = currentClient === 'tunisia'
export const isFqtvClient = currentClient === 'fqtv'
export const isRustatClient = currentClient === 'rustat'

const clients = {
  facr,
  fqtv,
  india,
  insports,
  instat,
  lff,
  rustat,
  tunisia,
}

export const client: ClientConfig = clients[currentClient]
