#include "../ui/ComponentRegistration.hpp"
#include "../ui/PlayerControllerEditor.hpp"
#include "PlayerController.hpp"

REGISTER_COMPONENT_GROUP("Player Controller", "Game",
			 PlayerControllerComponent, PlayerControllerEditor)
{
	registry.registerComponent<PlayerControllerComponent>(
		PlayerControllerComponent_name,
		PlayerControllerComponent_group,
		std::make_unique<PlayerControllerEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<PlayerControllerComponent>()) {
				e.set<PlayerControllerComponent>({});
			}
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<PlayerControllerComponent>()) {
				e.remove<PlayerControllerComponent>();
			}
		});
}
