#ifndef GRINDING_BOWL_CONTROLLER_HPP_
#define GRINDING_BOWL_CONTROLLER_HPP_

#include <memory>

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

/**
 * @brief The 'grinding bowl' controller.
 */
class GrindingBowlController : public InventoryController
{
private:
    std::shared_ptr<MGrindingBowl> bowl;
    uint32_t progress = 0;

    Command<uint32_t, uint32_t> updateGrindingProgress;
    Command<uint32_t, uint32_t> grind;

public:
    GrindingBowlController(ControllerChannel &channel);

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

    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