#ifndef ITEM_PROC_RULE_EXPLORER_HPP_
#define ITEM_PROC_RULE_EXPLORER_HPP_

#include <ItemStack/ItemStack.hpp>
#include <Widget/Layout/CompoundWidget/CompoundWidget.hpp>

/**
 * @brief A searchable list of item input -> output mappings.
 */
class ItemProcRuleExplorer : public CompoundWidget
{
public:
    typedef std::function<ItemStack(ItemStack &input)> MapCallback;

private:
    struct Rule
    {
        ItemStack input;
        ItemStack output;
    };

    std::vector<Rule> rules;

    void buildRuleCache(MapCallback getOutputStack);

public:
    ItemProcRuleExplorer(std::string stateUrl, MapCallback getOutputStack);
};

#endif