#include "WaterPhysics.hpp"
#include "../ui/ComponentRegistration.hpp"
#include "../ui/WaterPhysicsEditor.hpp"

// Register WaterPhysics component
REGISTER_COMPONENT("Water Physics", WaterPhysics, WaterPhysicsEditor)
{
	registry.registerComponent<WaterPhysics>(
		"Water Physics", std::make_unique<WaterPhysicsEditor>(),
		// Adder
		[](flecs::entity e) {
			if (!e.has<WaterPhysics>()) {
				e.set<WaterPhysics>({});
			}
		},
		// Remover
		[](flecs::entity e) {
			if (e.has<WaterPhysics>()) {
				e.remove<WaterPhysics>();
			}
		});
}
