#ifndef ITEM_USAGE_REGISTRY_HPP_
#define ITEM_USAGE_REGISTRY_HPP_

#include <ItemUsageProvider/ItemUsageProvider.hpp>
#include <memory>
#include <vector>

/**
 * @brief Regsitry of item usage sources for the item usage popup.
 */
class ItemUsageRegistry final
{
private:
    std::vector<std::unique_ptr<ItemUsageProvider>> providers;

    template<typename TProvider>
    void registerProvider()
    {
        providers.push_back(std::make_unique<TProvider>());
    }

public:
    /**
     * @brief Initialize the registry.
     */
    void init();
};

extern ItemUsageRegistry itemUsageRegistry;

#endif