#include "CharacterClassComponent.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/CharacterClassOverrideEditor.hpp"

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