#pragma once
#include "Arduino.h"

// Shared sequence counter — incremented by each instrumented mock call
extern int g_call_seq;
extern int g_epd_draw_seq;  // sequence position of last epd_draw_image_from_file call

// Call counters for assertions
extern int g_epd_init_count;
extern int g_epd_sleep_count;
extern int g_epd_draw_image_count;
extern int g_epd_fill_count;
extern int g_epd_fill_last_color;
extern int g_epd_draw_setup_count;
extern int g_epd_draw_border_count;
extern int g_epd_draw_border_last_color;
extern int g_epd_draw_border_last_thickness;

inline void epd_setup_pins() {}
inline void epd_init()  { g_epd_init_count++; }
inline void epd_sleep() { g_epd_sleep_count++; }
inline void epd_draw_image_from_file(File& f) {
    g_epd_draw_image_count++;
    if (g_epd_draw_seq < 0) g_epd_draw_seq = g_call_seq;
    g_call_seq++;
}
inline void epd_fill(int color) { g_epd_fill_count++; g_epd_fill_last_color = color; }
inline void epd_draw_image_with_border(File& f, int color, int thickness) {
    g_epd_draw_border_count++;
    g_epd_draw_border_last_color     = color;
    g_epd_draw_border_last_thickness = thickness;
}
inline void epd_draw_ap_screen(void*) {}
inline void epd_draw_setup_screen(void*) { g_epd_draw_setup_count++; }
