#ifndef EDITSCENE_LUA_COMPONENT_API_HPP
#define EDITSCENE_LUA_COMPONENT_API_HPP
#pragma once

#include <lua.hpp>

/**
 * @file LuaComponentApi.hpp
 * @brief Lua API for adding, removing, and modifying ECS components.
 *
 * Provides a generic component API where Lua scripts can add, get, set,
 * and remove components on entities. Each component type is registered
 * with a name string and a set of field accessors.
 *
 * Exposed Lua globals (in the "ecs" table):
 *   ecs.add_component(id, "ComponentName")          -> nil
 *   ecs.remove_component(id, "ComponentName")       -> nil
 *   ecs.has_component(id, "ComponentName")          -> bool
 *   ecs.get_component(id, "ComponentName")          -> table (field -> value)
 *   ecs.set_component(id, "ComponentName", table)   -> nil
 *   ecs.get_field(id, "ComponentName", "fieldName") -> value
 *   ecs.set_field(id, "ComponentName", "fieldName", value) -> nil
 *
 * Supported component names (case-sensitive):
 *   "EntityName", "Transform", "Renderable", "Light", "Camera",
 *   "RigidBody", "PhysicsCollider", "Character", "CharacterSlots",
 *   "AnimationTree", "AnimationTreeTemplate", "BehaviorTree",
 *   "GoapBlackboard", "GoapAction", "GoapGoal", "ActionDatabase",
 *   "ActionDebug", "SmartObject", "Actuator", "EventHandler",
 *   "GoapPlanner", "GoapRunner", "PathFollowing", "NavMesh",
 *   "NavMeshGeometrySource", "NavMeshAgent", "Item", "Inventory",
 *   "Lod", "LodSettings", "StaticGeometry", "StaticGeometryMember",
 *   "ProceduralTexture", "ProceduralMaterial", "Primitive",
 *   "TriangleBuffer", "Sun", "Skybox", "WaterPlane", "WaterPhysics",
 *   "BuoyancyInfo", "InWater", "StartupMenu", "Dialogue",
 *   "PlayerController", "CellGrid", "Room", "ClearArea", "Roof",
 *   "Lot", "District", "Town", "FurnitureTemplate", "PrefabInstance",
 *   "EditorMarker", "GeneratedPhysicsTag", "ParentComponent",
 *   "ModifiedComponent"
 */

namespace editScene
{

/**
 * @brief Register all component Lua API functions into the "ecs" global table.
 *
 * Adds functions for component manipulation (add, remove, has, get, set,
 * get_field, set_field) to the existing "ecs" table.
 *
 * @param L The Lua state.
 */
void registerLuaComponentApi(lua_State *L);

} // namespace editScene

#endif // EDITSCENE_LUA_COMPONENT_API_HPP
