import { atom } from 'recoil';

/**
 * Atom family for storing an election calendar.
 *
 * ```
 * {
 *   content: {
 *     cycleMetadata: {
 *       cycle: "2024",
 *     },
 *     electionEvents: [
 *       {
 *         id: "xxx",
 *         notes: RenderedContent,
 *         date: "2024-01-15T05:00:00.000Z",
 *         state: "State Name",
 *         officesDecided: "allContests" | "presidentialRaceOnly" | "downBallotRacesOnly",
 *         parties: "demAndGop" | "demOnly" | "gopOnly" | "allPartyPrimary",
 *         priorityLevel: "high",
 *         isCaucus: true,
 *       },
 *     ],
 *   },
 * }
 * ```
 */
const calendar = atom({
  key: 'int-style.election.atoms.calendar',
  default: undefined
});
export default calendar;