#pragma once

#include "../../resources.hpp"
#include "character_manager.hpp"
#include "item_manager.hpp"
#include "menu/inventory.hpp"

namespace game::state::play
{
  class Autofeed
  {
    bool isItemMouseHeld{};
    bool isDigestMouseHeld{};
    int digestClickCooldown{};
    float digestAngle{};
    bool isEnabled{};
    bool isActive{};

  public:
    void update(Resources&, Entity& character, Entity& cursor, menu::Inventory&, ItemManager&,
                CharacterManager&, Canvas&);
    void toggle();
    void disable();
    bool available_get(Entity& character, menu::Inventory&, ItemManager&) const;
    bool enabled_get() const;
    bool active_get() const;
  };
}
