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'

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'

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

export const client: ClientConfig = clients[currentClient]
