import { atomFamily } from 'recoil';

/**
 * Atom family for storing the summary-level results of an individual contest.
 * The family key is the contest ID.
 *
 * ```
 * {
 *   id: ContestId;
 *   results: CandidateResults[];
 *   progress: Progress;
 *   calls: Call[];
 *   callsByParty: {
 *     [string]: Call[];
 *   };
 *   callsByCandidate: {
 *     [CandidateId]: Call[];
 *   };
 * }
 * ```
 *
 * NOTE: This atom is a multi-source atom, meaning that you should not use the
 * atom directly. It is a stub for the `contestSummaryResults` selector.
 */
const contestSummaryResults = atomFamily({
  key: 'int-style.election.atoms.contestSummaryResults',
  default: undefined
});
export default contestSummaryResults;