import { ClientApTestData } from "../../../../storybook/utils/withElectionData/index.js";
import getContestStatus from '../index';
const getStatusFromSnapshot = function getStatusFromSnapshot(snap, opts = {}) {
  const contestId = 'contest:ap:0';
  const snapshot = new ClientApTestData({
    snapshot: snap,
    ...opts
  });
  const contestMetadata = snapshot.contestMetadata(contestId);
  const candidates = snapshot.contestCandidatesMetadata(contestId);
  const contestSummary = snapshot.contestSummaryResults(contestId);
  return getContestStatus(contestMetadata, candidates, contestSummary);
};
export default getStatusFromSnapshot;