#ifndef ACCUMULATOR_CONTROLLER_HPP_
#define ACCUMULATOR_CONTROLLER_HPP_

#include <memory>

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

class AccumulatorController : public InventoryController
{
private:
    std::shared_ptr<MAccumulator> accumulator;
    int energy = 0;

    Command<uint32_t, int> updateAccumulatorState;

public:
    AccumulatorController(ControllerChannel &channel);

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

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

#endif