#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "ESIOFunctionLibrary.generated.h"

class UESJsonValue;
class UESIOClientComponent;
UCLASS()
class EMOSHAPESUBSYSTEM_API UESIOFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
public:

	/** Static function to spawn a component that doesn't attach */
	UFUNCTION(BlueprintCallable, Category = "EmoShapeIO Client Static", meta = (WorldContext = "WorldContextObject"))
	static UESIOClientComponent* ConstructSocketIOComponent(UObject* WorldContextObject);

	/** Call a function by name with EmoShapeJsonValue signature. Utility for RPC in BPs*/
	UFUNCTION(BlueprintCallable, Category = "EmoShapeIO Utility", meta = (WorldContext = "WorldContextObject"))
	static bool CallFunctionByName(const FString& FunctionName, UObject* Target, UObject* WorldContextObject, UESJsonValue* Param);
	
	
};
