import get from 'lodash/get';
const getIsTied = function getIsTied(bop) {
  if (!bop) return false;
  const calledDem = get(bop, 'bop.calledDem', 0);
  const calledGop = get(bop, 'bop.calledGop', 0);
  const calledTotal = calledDem + calledGop;
  const totalDem = calledDem + get(bop, 'bop.seatedDem', 0);
  const totalGop = calledGop + get(bop, 'bop.seatedGop', 0);
  return calledTotal > 0 && totalDem === totalGop;
};
export default getIsTied;