#pragma once

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

/**
 * @brief Abstract interface for asset loading operations
 * 
 * Provides a common interface for loading different types of assets,
 * enabling dependency injection and easier testing.
 */
class IAssetLoader {
public:
    virtual ~IAssetLoader() = default;
    
    /**
     * @brief Load a texture from file (interface method)
     * @param path Path to the texture file
     * @return Pointer to loaded SDL_Texture, nullptr on failure
     */
    virtual SDL_Texture* loadTextureFromPath(const std::string& path) = 0;
    
    /**
     * @brief Load a font from file (interface method)
     * @param name Font identifier/name
     * @param path Path to the font file
     * @param size Font size in pixels
     * @return true if font was loaded successfully, false otherwise
     */
    virtual bool loadFontAsset(const std::string& name, const std::string& path, int size) = 0;
    
    /**
     * @brief Load an audio file (interface method)
     * @param name Audio identifier/name
     * @param path Path to the audio file
     * @return true if audio was loaded successfully, false otherwise
     */
    virtual bool loadAudioAsset(const std::string& name, const std::string& path) = 0;
    
    /**
     * @brief Get a previously loaded texture (interface method)
     * @param name Texture identifier/name
     * @return Pointer to SDL_Texture, nullptr if not found
     */
    virtual SDL_Texture* getTextureAsset(const std::string& name) = 0;
    
    /**
     * @brief Check if an asset exists
     * @param name Asset identifier/name
     * @return true if asset exists, false otherwise
     */
    virtual bool hasAsset(const std::string& name) const = 0;
    
    /**
     * @brief Unload a specific asset
     * @param name Asset identifier/name
     */
    virtual void unloadAsset(const std::string& name) = 0;
    
    /**
     * @brief Unload all assets
     */
    virtual void unloadAll() = 0;
};
