const getWinningParty = function getWinningParty({
  candidateCallStatus,
  winningPartiesFromPartyCalls
}) {
  if (candidateCallStatus.hasRunoff) return undefined;
  if (candidateCallStatus.winningParties.length === 1) {
    return candidateCallStatus.winningParties[0];
  }
  if (winningPartiesFromPartyCalls.length === 1) {
    return winningPartiesFromPartyCalls[0];
  }
  return undefined;
};
export default getWinningParty;