// Copyright (c) 2024 Codemongous LLC. All Rights Reserved.

#include "SCW_UK2Node_AddComponent.h"
#include "K2Node_AddComponent.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_UK2Node_AddComponent::SCW_UK2Node_AddComponent(UK2Node_AddComponent* InK2Node_AddComponent) : SCW_UK2Node_CallFunction(InK2Node_AddComponent), K2Node_AddComponent(InK2Node_AddComponent)
{

}

UK2Node_AddComponent* SCW_UK2Node_AddComponent::ToUK2Node_AddComponent() const
{
	return K2Node_AddComponent;
}

ISCW_UK2Node_AddComponentPtr SCW_UK2Node_AddComponent::ToUK2Node_AddComponentPtr()
{
	return GetSharedThisAs<SCW_UK2Node_AddComponent>();
}

ISCW_UK2Node_AddComponentConstPtr SCW_UK2Node_AddComponent::ToUK2Node_AddComponentPtr() const
{
	return GetSharedThisAs<SCW_UK2Node_AddComponent>();
}

ISCW_UActorComponentPtr SCW_UK2Node_AddComponent::GetTemplateFromNode() const
{
	UActorComponent* ActorComponent = K2Node_AddComponent->GetTemplateFromNode();
	return ActorComponent ? FSourcifyCoreUEWrapper::Get().Wrap(*ActorComponent) : nullptr;
}