#ifndef __STATE_H
#define __STATE_H

typedef enum {
  VIEW_MISSION_SELECT = 0,
  VIEW_AMI = 1,
  VIEW_DRIVER = 2,
  VIEW_TESTING = 3
} STWView;

typedef enum {
  MISSION_NONE,
  MISSION_ACCELERATION,
  MISSION_SKIDPAD,
  MISSION_AUTOCROSS,
  MISSION_TRACKDRIVE,
  MISSION_EBS_TEST,
  MISSION_INSPECTION,
  MISSION_MANUAL
} Mission;

typedef struct {
  Mission selection;
} MissionSelectState;

typedef struct {
  Mission current_mission;
} AMIState;

typedef union {
  MissionSelectState mission_select;
  AMIState ami;
} ViewState;

typedef struct {
  STWView view;
  ViewState view_state;
} STWState;

extern STWState stw_state;

void state_init();

#endif // __STATE_H
