/**
 * Copyright 2022-2025 Theai, Inc. dba Inworld AI
 */
#include "GraphEditor/InworldGraphAssetEditor/InworldGraphPanelNodeFactory.h"
#include "GraphEditor/InworldGraphAssetEditor/EdNode_InworldGraphEdge.h"
#include "GraphEditor/InworldGraphAssetEditor/EdNode_InworldGraphNode.h"
#include "GraphEditor/InworldGraphAssetEditor/SEdNode_InworldGraphEdge.h"
#include "GraphEditor/InworldGraphAssetEditor/SEdNode_InworldGraphNode.h"

#include <EdGraph/EdGraphNode.h>

TSharedPtr<class SGraphNode> FGraphPanelNodeFactory_InworldGraph::CreateNode(UEdGraphNode* Node) const
{
	if (UEdNode_InworldGraphNode* EdNode_GraphNode = Cast<UEdNode_InworldGraphNode>(Node))
	{
		return SNew(SEdNode_InworldGraphNode, EdNode_GraphNode);
	}
	else if (UEdNode_InworldGraphEdge* EdNode_Edge = Cast<UEdNode_InworldGraphEdge>(Node))
	{
		return SNew(SEdNode_InworldGraphEdge, EdNode_Edge);
	}
	return nullptr;
}