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

import { facr } from './facr'
import { instat } from './instat'

const clients = {
  [ClientIds.Facr]: facr,
  [ClientIds.Instat]: instat,
}
const params = new URLSearchParams(window.location.search)
const clientId = params.get('client_id') as ClientIds

export const client = clients[clientId] || instat
