// Clean renderer interface for local use
#pragma once

#include <memory>
#include <SDL3/SDL.h>

namespace renderer {

class Renderer {
public:
    virtual ~Renderer() = default;
    virtual SDL_Texture* createTextureFromSurface(SDL_Surface* surf) = 0;
    virtual void destroyTexture(SDL_Texture* tex) = 0;
    virtual void copy(SDL_Texture* tex, const SDL_Rect* src, const SDL_Rect* dst) = 0;
    virtual void renderTexture(SDL_Texture* tex, const SDL_FRect* src, const SDL_FRect* dst) = 0;
    virtual void setTextureAlphaMod(SDL_Texture* tex, Uint8 a) = 0;
    virtual void renderLine(float x1, float y1, float x2, float y2) = 0;
    virtual void clear(const SDL_Color& color) = 0;
    virtual void setDrawColor(const SDL_Color& color) = 0;
    virtual void fillRectF(const SDL_FRect* rect) = 0;
    virtual void drawRectF(const SDL_FRect* rect) = 0;
    virtual void present() = 0;
};

std::unique_ptr<Renderer> MakeSDLRenderer(SDL_Renderer* rdr);

} // namespace renderer
