import cx from "../../../../../utils/css/cx.js";
import getCalendarNote from "../../../../../utils/election/getCalendarNote/index.js";
import StateLink from '../../StateLink';
import Note from './Note';
import classes from './styles.module.scss';
const cls = cx.merge(classes);
export default function Election(props) {
  const {
    isEven,
    isRaised,
    office
  } = props;
  const note = getCalendarNote(props);
  return <div className={cls('shadow-100', 'p-3', 'contest', {
    'is-even': isEven,
    'is-raised': isRaised
  })}>
      <StateLink office={office} {...props} />
      <Note content={note} />
    </div>;
}