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

#include "SCW_FBlackboardEntry.h"
#include "BehaviorTree/BlackboardData.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_FBlackboardEntry::SCW_FBlackboardEntry(FBlackboardEntry* InBlackboardEntry) : BlackboardEntry(InBlackboardEntry)
{

}

FBlackboardEntry* SCW_FBlackboardEntry::ToFBlackboardEntry() const
{
	return BlackboardEntry;
}

ISCW_FBlackboardEntryPtr SCW_FBlackboardEntry::ToFBlackboardEntryPtr()
{
	return GetSharedThisAs<SCW_FBlackboardEntry>();
}

ISCW_FBlackboardEntryConstPtr SCW_FBlackboardEntry::ToFBlackboardEntryPtr() const
{
	return GetSharedThisAs<SCW_FBlackboardEntry>();
}

ISCW_UBlackboardKeyTypePtr SCW_FBlackboardEntry::GetKeyType() const
{
	return BlackboardEntry->KeyType ? FSourcifyCoreUEWrapper::Get().Wrap(*BlackboardEntry->KeyType) : nullptr;
}