/**
 * Daily Zone check-in (Workstream 16). Campus staff log a self-regulation
 * "zone" once per day. Stored in `user_progress` with `progress_type =
 * zone_checkin` and `item_id` = the campus-local date (YYYY-MM-DD), so each day
 * is a distinct row and the history is the set of rows for the user.
 */
export const ZONE_CHECKIN_COLORS = ['blue', 'green', 'yellow', 'red'] as const;

export type ZoneCheckinColor = (typeof ZONE_CHECKIN_COLORS)[number];

export function isZoneCheckinColor(value: unknown): value is ZoneCheckinColor {
  return (
    typeof value === 'string' &&
    (ZONE_CHECKIN_COLORS as readonly string[]).includes(value)
  );
}

/** Upper bound on history rows returned in one request (~a year of days). */
export const ZONE_CHECKIN_HISTORY_LIMIT = 366;
