#ifndef PAGE_GLOBAL_STATE_H
#define PAGE_GLOBAL_STATE_H

#include "types.h"

typedef enum
{
    MENU_ACTION_NONE = 0,
    MENU_ACTION_SET_VALUE,
    MENU_ACTION_SET_SOFT,
    MENU_ACTION_CFG_TIME,
    MENU_ACTION_CFG_REV_EVENT,
    MENU_ACTION_CFG_MANUAL_WAVE,
    MENU_ACTION_SEE_INPUT,
    MENU_ACTION_SEE_SET,
    MENU_ACTION_SEE_SOFT,
    MENU_ACTION_YX_SET_COMM_TYPE,
    MENU_ACTION_YX_SET_WIDTH,
    MENU_ACTION_YX_SET_TWIN,
    MENU_ACTION_ALLINF_DEFAULT,
    MENU_ACTION_PARA_DEFAULT,
    MENU_ACTION_SET_DEFAULT,
    MENU_ACTION_RESUME_SOFT,
    MENU_ACTION_CFG_CELL_DEF,
    MENU_ACTION_CFG_SHOW_ANA_TYPE,
    MENU_ACTION_DBG_XU_YX,
    MENU_ACTION_DBG_XU_YC,
    MENU_ACTION_DBG_XU_EVENT,
    MENU_ACTION_DBG_RELAY,
    MENU_ACTION_SEE_VERSION_BOARD,
    MENU_ACTION_CFG_CLR_REC,
    MENU_ACTION_CFG_COM_PARA,
    MENU_ACTION_CFG_EDIT_IP,
    MENU_ACTION_CFG_EDIT_SNTP,
    MENU_ACTION_CFG_CELL_CONF,
    MENU_ACTION_SEE_REC_SOE,
    MENU_ACTION_SEE_REC_ACT,
    MENU_ACTION_SEE_REC_OPT,
    MENU_ACTION_SEE_REC_ALM,
    MENU_ACTION_SEE_REC_START,
    MENU_ACTION_SEE_REC_YK,
    MENU_ACTION_SEE_REC_CHK,
    MENU_ACTION_SEE_REC_RUN,
    MENU_ACTION_SEE_REC_FAULT,
    MENU_ACTION_YC_SET_SQ_VALUE,
    MENU_ACTION_YC_SET_ADJ_COE
} menu_action_id_t;



typedef struct
{
    uint16_t activeYcType;
    uint16_t activeMenuPara;
    uint16_t activeActionId;
    uint16_t activeAttrib;
    uint8_t activeMenuName[50];
    uint8_t activeMenuTip[50];
} GlobalModel;

void GlobalModel_Init(void);
GlobalModel *GlobalModel_Instance(void);
void GlobalModel_SetActiveYcType(uint16_t ycType);
uint16_t GlobalModel_GetActiveYcType(void);
void GlobalModel_SetMenuAction(uint16_t activeAttrib,
                               const uint8_t *menuName,
                               const uint8_t *menuTip,
                               uint16_t menuPara);
uint16_t GlobalModel_GetMenuActionId(void);
uint16_t GlobalModel_GetMenuActionPara(void);
const uint8_t *GlobalModel_GetMenuActionName(void);
const uint8_t *GlobalModel_GetMenuActionTip(void);
uint16_t GlobalModel_GetMenuActionAttrib(void);

#endif
