#ifndef ICHEMICAL_REACTOR_COMPONENT_HPP_
#define ICHEMICAL_REACTOR_COMPONENT_HPP_

#include <iostream>
#include <memory>

#include <Machine/MChemicalReactor/MChemicalReactor.hpp>

/**
 * @brief Interface implemented by items which are chemical reactor components.
 */
class IChemicalReactorComponent
{
public:
    virtual ~IChemicalReactorComponent() = default;

    /**
     * @brief Write a description of chemical reactor component into `os`.
     * 
     * @param stack The item stack. Do not modify.
     * @param os The stream into which to write the description.
     */
    virtual void describeInChemicalReactor(ItemStack &stack, std::ostream &os) = 0;

    /**
     * @brief Called during a reactor update for every instance of this component.
     * 
     * @param stack The stack containing this component (can be updated).
     * @param reactor The reactor being updated.
     */
    virtual void updateChemicalReactor(ItemStack &stack, MChemicalReactor &reactor) = 0;
};

#endif