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

#include "SCW_UUserDefinedStructEditorData.h"
#include "SourcifyCoreUEWrapperModule.h"
#include "UserDefinedStructure/UserDefinedStructEditorData.h"

using namespace Sourcify;

SCW_UUserDefinedStructEditorData::SCW_UUserDefinedStructEditorData(UUserDefinedStructEditorData* InUserDefinedStructEditorData) : SCW_UObject(InUserDefinedStructEditorData), UserDefinedStructEditorData(InUserDefinedStructEditorData)
{

}

UUserDefinedStructEditorData* SCW_UUserDefinedStructEditorData::ToUUserDefinedStructEditorData() const
{
	return UserDefinedStructEditorData;
}

wstring SCW_UUserDefinedStructEditorData::GetToolTip() const
{
	return *UserDefinedStructEditorData->ToolTip;
}

vector<ISCW_FStructVariableDescriptionPtr> SCW_UUserDefinedStructEditorData::GetVariablesDescriptions() const
{
	vector<ISCW_FStructVariableDescriptionPtr> Result;
	for (FStructVariableDescription& VariableDescription : UserDefinedStructEditorData->VariablesDescriptions)
	{
		Result.push_back(FSourcifyCoreUEWrapper::Get().Wrap(VariableDescription));
	}
	return Result;
}