#include "CharacterClassComponent.hpp"
#include "CharacterClassDatabase.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/CharacterClassEditor.hpp"

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