#ifndef MACERATOR_RULE_REGISTRY_HPP_
#define MACERATOR_RULE_REGISTRY_HPP_

#include <list>

#include <MaceratorRule/MaceratorRule.hpp>

/**
 * @brief Registry for macerator rules.
 */
class MaceratorRuleRegistry
{
private:
    std::list<MaceratorRule*> rules;

    void registerRule(MaceratorRule *rule);
    void registerBasicRule(ItemStack input, ItemStack output);

public:
    /**
     * @brief Clean up the registry.
     */
    void shutdown();

    /**
     * @brief Register all the rules.
     */
    void registerAllRules();

    /**
     * @brief Get the output stack given an input stack.
     * 
     * Returns an empty stack if the input cannot be macerated.
     */
    ItemStack getMaceratorOutput(ItemStack &input);

    int getRuleCount();
};

/**
 * @brief The singleton registry instance.
 */
extern MaceratorRuleRegistry maceratorRuleRegistry;

#endif