#ifndef CHEMICAL_REACTOR_CONTROLLER_HPP_
#define CHEMICAL_REACTOR_CONTROLLER_HPP_

#include <Controller/InventoryController/InventoryController.hpp>
#include <Machine/MChemicalReactor/MChemicalReactor.hpp>

/**
 * @brief The chemical reactor controller.
 */
class ChemicalReactorController : public InventoryController
{
private:
    std::shared_ptr<MChemicalReactor> reactor;
    bool isSwitchedOn = false;
    int temperature = 300;

    Command<uint32_t, int, bool> updateReactorState;
    Command<uint32_t, bool> setSwitch;

    Widget* makeReactorChamber();
    Widget* makeRecipeBook();

public:
    ChemicalReactorController(ControllerChannel &channel);

    void onConnect(std::shared_ptr<Machine> reactorMachine);

    virtual Widget* getRightPanel() override;
    virtual glm::vec4 getSlotHighlight(const std::string &id, int slot, ItemStack &stack) override;
    virtual void getExtraToolTipLines(const std::string &id, int slot, ItemStack &stack, ToolTip &tip) override;
    virtual void update() override;
};

#endif