#ifndef STEAM_GENERATOR_CONTROLLER_HPP_
#define STEAM_GENERATOR_CONTROLLER_HPP_

#include <memory>
#include <string>

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

/**
 * @brief The steam generator controller.
 */
class SteamGeneratorController : public InventoryController
{
private:
    std::string m_waterName;

    std::shared_ptr<MSteamGenerator> m_steamGenerator;
    uint32_t m_temperature = 0;
    int m_waterLevel = 0;
    uint32_t m_fuelCurrent = 0;
    uint32_t m_fuelBatch = 0;
    int m_storedEnergy = 0;

    Command<uint32_t, uint32_t, int, uint32_t, uint32_t, int> updateSteamGeneratorState;

public:
    SteamGeneratorController(ControllerChannel &channel);

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

    virtual Widget* getRightPanel() override;
    virtual void update() 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;
};

#endif
