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

#include "SCW_UK2Node_StructMemberSet.h"
#include "K2Node_StructMemberSet.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_UK2Node_StructMemberSet::SCW_UK2Node_StructMemberSet(UK2Node_StructMemberSet* InK2Node_StructMemberSet) : SCW_UK2Node_StructOperation(InK2Node_StructMemberSet), K2Node_StructMemberSet(InK2Node_StructMemberSet)
{

}

vector<shared_ptr<ISCW_FOptionalPinFromProperty>> SCW_UK2Node_StructMemberSet::GetShowPinForProperties()
{
	vector<shared_ptr<ISCW_FOptionalPinFromProperty>> ShowPinForProperties;
	for (auto& OptionalPinFromProperty : K2Node_StructMemberSet->ShowPinForProperties)
	{
		ShowPinForProperties.push_back(FSourcifyCoreUEWrapper::Get().Wrap(OptionalPinFromProperty));
	}

	return ShowPinForProperties;
}

void SCW_UK2Node_StructMemberSet::SetShowPinForProperties(const vector<shared_ptr<ISCW_FOptionalPinFromProperty>>& InShowPinForProperties)
{
	for (int32 i = 0; i < InShowPinForProperties.size(); ++i)
	{
		K2Node_StructMemberSet->ShowPinForProperties[i].bShowPin = InShowPinForProperties[i]->GetShowPin();
	}
}

UK2Node_StructMemberSet* SCW_UK2Node_StructMemberSet::ToUK2Node_StructMemberSet() const
{
	return K2Node_StructMemberSet;
}

ISCW_UK2Node_StructMemberSetPtr SCW_UK2Node_StructMemberSet::ToUK2Node_StructMemberSetPtr()
{
	return GetSharedThisAs<SCW_UK2Node_StructMemberSet>();
}

ISCW_UK2Node_StructMemberSetConstPtr SCW_UK2Node_StructMemberSet::ToUK2Node_StructMemberSetPtr() const
{
	return GetSharedThisAs<SCW_UK2Node_StructMemberSet>();
}