#pragma once
#include <string>
#include <vector>
#include <functional>
#include "esp_event.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"

class Eth {

public:
    static Eth& instance();

    void init();

private:
    Eth() = default;
    Eth(const Eth&) = delete;
    Eth& operator=(const Eth&) = delete;

    static void eventHandler(void* arg, esp_event_base_t event_base,
                            int32_t event_id, void* event_data);
    static void got_ip_event_handler(void* arg, esp_event_base_t event_base,
                            int32_t event_id, void* event_data);

    bool initialized_ = false;
    EventGroupHandle_t ethEventGroup_ = nullptr;
};