import { IfActive } from "../../../../application/index.js";
import classes from './styles.module.scss';
import ContestTitle from '../ContestTitle';
import ContestResultsTable from '../ContestResultsTable';
import ContestNote from '../ContestNote';
const ContestSection = function ContestSection(props) {
  const {
    contest
  } = props;
  const showContestTitle = contest.party;
  const ResultsSection = contest.id ? ContestResultsTable : ContestNote;
  return <div className={classes.container} key={contest.id}>
      <IfActive active={showContestTitle}>
        <ContestTitle contestId={contest.id} party={contest.party} />
      </IfActive>
      <ResultsSection id={contest.id} note={contest.note} />
    </div>;
};
export default ContestSection;