#pragma once

#include <frostbite2D/2d/actor.h>
#include <vector>

namespace frostbite2D {

class GameMapLayer : public Actor {
public:
  static constexpr size_t kInvalidMoveAreaIndex = static_cast<size_t>(-1);

  void Render() override;

  void SetDebugFeasibleAreaPolygon(const std::vector<Vec2>& polygon);
  void AddDebugMoveAreaInfo(const Rect& rect, size_t index);
  void SetDebugHighlightedMoveAreaIndex(size_t index);
  void ClearDebugAreaInfo();
  void AddObject(RefPtr<Actor> obj);

private:
  struct DebugMoveAreaInfo {
    Rect rect;
    size_t index = kInvalidMoveAreaIndex;
  };

  std::vector<Vec2> feasibleAreaPolygon_;
  std::vector<Rect> feasibleAreaFillRects_;
  std::vector<DebugMoveAreaInfo> moveAreaInfoList_;
  size_t highlightedMoveAreaIndex_ = kInvalidMoveAreaIndex;
};

} // namespace frostbite2D
