#pragma once
#include "levelmanager.hpp"
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Font.hpp>
#include <guecs/ui.hpp>
#include "events.hpp"

namespace gui {
  class LootUI {
    public:
      bool active = false;
      guecs::UI $gui;
      GameLevel $level;
      std::vector<DinkyECS::Entity> contents;

      LootUI(GameLevel level);

      void init();
      void update();
      void render(sf::RenderWindow& window);
      void update_level(GameLevel &level);
      bool mouse(float x, float y, bool hover);
      std::optional<DinkyECS::Entity> select_slot(int slot);
      void remove_slot(int slot_id);
  };
}