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

#include "SCW_FUserPinInfo.h"
#include "K2Node_EditablePinBase.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_FUserPinInfo::SCW_FUserPinInfo(FUserPinInfo* InUserPinInfo) : UserPinInfo(InUserPinInfo)
{

}

ISCW_FEdGraphPinTypePtr SCW_FUserPinInfo::GetPinType() const
{
	return FSourcifyCoreUEWrapper::Get().Wrap(UserPinInfo->PinType);
}

wstring SCW_FUserPinInfo::GetPinDefaultValue() const
{
	return *UserPinInfo->PinDefaultValue;
}

void SCW_FUserPinInfo::SetPinDefaultValue(const wstring& InDefaultValue)
{
	UserPinInfo->PinDefaultValue = InDefaultValue.c_str();
}

FUserPinInfo* SCW_FUserPinInfo::ToFUserPinInfo() const
{
	return UserPinInfo;
}

ISCW_FUserPinInfoPtr SCW_FUserPinInfo::ToFUserPinInfoPtr()
{
	return GetSharedThisAs<SCW_FUserPinInfo>();
}

ISCW_FUserPinInfoConstPtr SCW_FUserPinInfo::ToFUserPinInfoPtr() const
{
	return GetSharedThisAs<SCW_FUserPinInfo>();
}