#include "GoapBlackboard.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/GoapBlackboardComponentEditor.hpp"

REGISTER_COMPONENT_GROUP("Blackboard", "AI", GoapBlackboard,
			 GoapBlackboardComponentEditor)
{
	registry.registerComponent<GoapBlackboard>(
		"Blackboard", "AI",
		std::make_unique<GoapBlackboardComponentEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<GoapBlackboard>())
				e.set<GoapBlackboard>({});
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<GoapBlackboard>())
				e.remove<GoapBlackboard>();
		});
}
