#include "presentation/overlays/esp/EspOverlayRenderer.h"

#include <imgui.h>

#include "presentation/fonts/MenuFontAtlas.h"
#include "presentation/widgets/BasicWidgets.h"

namespace ta::presentation::overlays::esp
{
void EspOverlayRenderer::draw(ImDrawList* draw_list, const EspOverlayDrawData& data)
{
    if (!draw_list || data.labels.empty())
        return;

    for (const EspOverlayLabel& label : data.labels)
    {
        ta::presentation::widgets::centered_text(
            draw_list,
            label.position,
            label.color,
            label.text,
            label.use_hud_font ? ta::presentation::fonts::hud_font() : nullptr,
            label.use_hud_font ? label.font_size : 0.0f);
    }
}
}
