#include "BuoyancyInfo.hpp"
#include "Transform.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/BuoyancyInfoEditor.hpp"

// Register BuoyancyInfo component
REGISTER_COMPONENT("Buoyancy Info", BuoyancyInfo, BuoyancyInfoEditor)
{
	registry.registerComponent<BuoyancyInfo>(
		"Buoyancy Info", std::make_unique<BuoyancyInfoEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<BuoyancyInfo>()) {
				e.set<BuoyancyInfo>({});
			}
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<BuoyancyInfo>()) {
				e.remove<BuoyancyInfo>();
			}
		});
}