#pragma once
#include <SDL3/SDL.h>
#include <string>

class FontAtlas;

class UIRenderer {
public:
    // Draw a sci-fi style panel with glow, shadow, and border
    static void drawSciFiPanel(SDL_Renderer* renderer, const SDL_FRect& rect, float alpha = 1.0f);

    // Draw a generic button with hover/select states
    static void drawButton(SDL_Renderer* renderer, FontAtlas* font, float cx, float cy, float w, float h, 
                          const std::string& label, bool isHovered, bool isSelected, 
                          SDL_Color bgColor = {80, 110, 200, 255}, 
                          SDL_Color borderColor = {60, 80, 140, 255},
                          bool textOnly = false,
                          SDL_Texture* icon = nullptr);

    // Helper to calculate content offsets for centering
    static void computeContentOffsets(float winW, float winH, float logicalW, float logicalH, float logicalScale, float& outOffsetX, float& outOffsetY);

    // Draw the game logo centered at the top
    static void drawLogo(SDL_Renderer* renderer, SDL_Texture* logoTex, float logicalW, float logicalH, float contentOffsetX, float contentOffsetY, int texW = 0, int texH = 0);

    // Draw the settings popup
    static void drawSettingsPopup(SDL_Renderer* renderer, FontAtlas* font, float logicalW, float logicalH, bool musicEnabled, bool soundEnabled);
};
