#ifndef DECORATION_REGISTRY_HPP_
#define DECORATION_REGISTRY_HPP_

#include <Decoration/Decoration.hpp>
#include <functional>

class LocalWorld;

class DecorationRegistry
{
private:
    std::vector<std::shared_ptr<Decoration>> decorations;
    std::map<uint64_t, std::shared_ptr<Decoration>> mapper; 

    void registerDecoration(uint64_t key, std::shared_ptr<Decoration> decoration);

    template<typename TDecoration, typename... TArgs>
    void registerDecoration(uint64_t key, TArgs&&... args)
    {
        registerDecoration(key, std::make_shared<TDecoration>(args...));
    }

public:
    void registerAllDecorations(LocalWorld &world);

    friend class DecorationGenerator;
};

#endif