#include "GoapPlanner.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/GoapPlannerEditor.hpp"

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