#include "../ui/ComponentRegistration.hpp"
#include "Character.hpp"
#include "../ui/CharacterEditor.hpp"

REGISTER_COMPONENT_GROUP("Character Physics", "Physics",
				 CharacterComponent, CharacterEditor)
{
	registry.registerComponent<CharacterComponent>(
		"Character Physics", "Physics", std::make_unique<CharacterEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<CharacterComponent>())
				e.set<CharacterComponent>({});
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<CharacterComponent>())
				e.remove<CharacterComponent>();
		});
}
