import includes from 'lodash/includes'

import { client } from 'config/clients'
import { SportTypes } from 'config/sportTypes'
import { lffTournamentsList } from 'config/lffTournaments'

export const isPermittedTournament = (
  tournamentId: number,
  sportType: SportTypes,
) => {
  if (client.name !== 'lff') {
    return true
  }

  return includes(lffTournamentsList, tournamentId) && sportType === 1
}
