import { isTransactionalFreeRounds } from './freeRounds';
import CasinoRoundsMode from '../models/GameModes/CasinoRoundsMode';
import TransCasinoRoundsMode from '../models/GameModes/TransCasinoRoundsMode';

/**
 * Factory to create proper casino round mode.
 *
 * @param {object} betConfig
 * @param {object} gameData
 * @param {object} lines
 * @returns {TransCasinoRoundsMode|CasinoRoundsMode}
 */
export function createCasinoRoundsMode(betConfig, gameData, lines)
{
  return isTransactionalFreeRounds()
    ? new TransCasinoRoundsMode(betConfig, gameData, lines)
    : new CasinoRoundsMode(betConfig, gameData, lines);
}
