import { ClientIds } from 'config/clients/types'

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

export const clients = {
  [ClientIds.Facr]: facr,
  [ClientIds.Fqtv]: fqtv,
  [ClientIds.Instat]: instat,
  [ClientIds.Lff]: lff,
  [ClientIds.Insports]: insports,
  [ClientIds.India]: india,
  [ClientIds.Tunisia]: tunisia,
}

const params = new URLSearchParams(window.location.search)
const clientId = params.get('client_id') as ClientIds

export const client = clients[clientId] || insports
