#ifndef SERVICE_MAIN_MENU_H
#define SERVICE_MAIN_MENU_H

#include "../ui/ui_config.h"
#include <stdint.h>
#include <stdbool.h>

#define MAIN_MENU_NUM 8

typedef MenuType MainMenuType;

typedef struct {
    const char *name;
    const char *icon_path;
    bool need_password;
    MainMenuType type;
} MainMenuItemConfig;

typedef struct {
    MainMenuItemConfig items[MAIN_MENU_NUM];
    uint8_t selected_idx;
} MainMenuPageConfig;

void main_menu_service_init(void);

const MainMenuItemConfig* main_menu_service_get_item(uint8_t idx);

uint8_t main_menu_service_get_item_count(void);

bool main_menu_service_need_password(uint8_t idx);

void main_menu_service_get_page_config(MainMenuPageConfig *config, uint8_t selected_idx);

const char* main_menu_service_get_type_name(MainMenuType type);

#endif /* SERVICE_MAIN_MENU_H */
