/******************************************************************************
*	File		-	component_api.h
*	Author		-	Joey Pollack
*	Date		-	2023/01/05 (y/m/d)
*	Mod Date	-	2023/01/05 (y/m/d)
*	Description	-	static methods for all component related foreign classes
******************************************************************************/

#ifndef LUNARIUM_COMPONENT_API_H_
#define LUNARIUM_COMPONENT_API_H_

#include <core/common_defs.h>
#include <scripting/wren_state.h>
#include <scripting/wren_script.h>
#include <utils/op_res.h>

namespace lunarium
{
    class World;
    class ComponentAPI
    {
    public:
        static void Initialize(World* pWorld, WrenState& script_state);

        // VelocityComponent
        static void SetupForeignClassVelocityComp(WrenState& script_state);
        static void VelocityCompAllocate(WrenVM* vm);
        static void VelocityCompFinalise(void* data);
        static void GetVelocityXFM(WrenVM* vm);
        static void GetVelocityYFM(WrenVM* vm);
        static void SetVelocityFM(WrenVM* vm);

        // Blockout Component
        static void SetupForeignClassBlockOutComp(WrenState& script_state);
        static void BlockOutCompAllocate(WrenVM* vm);
        static void BlockOutCompFinalise(void* data);
        static void GetColorFM(WrenVM* vm);
        static void GetSizeFM(WrenVM* vm);
        static void SetColorFM(WrenVM* vm);
        static void SetSizeFM(WrenVM* vm);


    private:
        static World* mpWorld;
    };
}

#endif	// LUNARIUM_COMPONENT_API_H_