#pragma once
#include "components.hpp"
#include "levelmanager.hpp"
#include <ftxui/dom/canvas.hpp>


namespace System {
  using namespace components;

  void lighting(GameLevel &level);
  void motion(GameLevel &level);
  void collision(GameLevel &level);
  void death(GameLevel &level);
  void enemy_pathing(GameLevel &level);

  void init_positions(DinkyECS::World &world, SpatialMap &collider);
  void pickup(DinkyECS::World &world, DinkyECS::Entity actor, DinkyECS::Entity item);
  void device(DinkyECS::World &world, DinkyECS::Entity actor, DinkyECS::Entity item);
  void plan_motion(DinkyECS::World& world, Point move_to);
  void draw_entities(DinkyECS::World &world, Map &map, const Matrix &lights, ftxui::Canvas &canvas, const Point &cam_orig, size_t view_x, size_t view_y);
}
