#ifndef POT_CONTROLLER_HPP_
#define POT_CONTROLLER_HPP_

#include <memory>

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

/**
 * @brief The 'pot' controller.
 */
class PotController : public InventoryController
{
private:
    std::shared_ptr<MPot> m_pot;
    uint32_t m_temperature = 0;
    uint32_t progress = 0;
    uint32_t m_fuelCurrent = 0;
    uint32_t m_fuelBatch = 0;
    uint32_t m_maxProgress = 0;
    bool m_isIron = false;

    Command<uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, bool> updatePotState;

    Widget* makePotTab();

public:
    PotController(ControllerChannel &channel);

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

    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