// ================= App state =================
const state = {
  route: ROUTES.HOME,
  adminTab: "dashboard",
  filter: "All",
  winMapOffset: { x: 0, y: 0 },
  focusedWinId: "",
  wins: [],
  meals: [],
  tips: [],
  mealDeckOpen: "small-appetite",
  mealNeed: "Barely hungry",
  expandedMealWhy: "",
  savedMealIdeas: [],
  mealSaveToast: "",
  mealSnapshotStep: "upload",
  mealSnapshotPhoto: "",
  mealSnapshotResult: null,
  mealSnapshotIngredients: [],
  mealSnapshotSaved: false,
  mealSnapshotNotice: "",
  checkIns: [],
  pointsBalance: patient.pointsBalance,
  pointEvents: [],
  rewards: [],
  redemptions: [],
  supportContent: [],
  weeklySupportSelections: [],
  csvImport: null,
  suggestedWin: null,
  currentUser: null,
  currentRole: ROLES.PATIENT,
  authReady: false,
  authError: "",
  dataMode: APP_CONFIG.dataMode
};

function hydrateState(nextState) {
  Object.assign(state, nextState);
}
