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

#pragma once

#include "CoreMinimal.h"
#include "EdGraph\EdGraph.h"
#include "ISCW_FGraphNodeCreator.h"
#include "K2Node_CreateDelegate.h"
#include "K2Node_Event.h"
#include "SCW_Base.h"

namespace Sourcify
{
	class SCW_FGraphNodeCreator_UK2Node_Event : public SCW_Base, public ISCW_FGraphNodeCreator_UK2Node_Event
	{
	public:
		SCW_FGraphNodeCreator_UK2Node_Event(FGraphNodeCreator<UK2Node_Event>* InGraphNodeCreator);

		ISCW_UK2Node_EventPtr CreateNode(bool bSelectNewNode = true) override;

		void Finalize() override;
		
		FGraphNodeCreator<UK2Node_Event>* ToFGraphNodeCreator() const;

		ISCW_FGraphNodeCreator_UK2Node_EventPtr ToFGraphNodeCreator_UK2Node_EventPtr() override;
		ISCW_FGraphNodeCreator_UK2Node_EventConstPtr ToFGraphNodeCreator_UK2Node_EventPtr() const override;

	protected:
		TSharedPtr<FGraphNodeCreator<UK2Node_Event>> GraphNodeCreator;
	};

	class SCW_FGraphNodeCreator_UK2Node_CreateDelegate : public SCW_Base, public ISCW_FGraphNodeCreator_UK2Node_CreateDelegate
	{
	public:
		SCW_FGraphNodeCreator_UK2Node_CreateDelegate(FGraphNodeCreator<UK2Node_CreateDelegate>* InGraphNodeCreator);

		ISCW_UK2Node_CreateDelegatePtr CreateNode(bool bSelectNewNode = true) override;

		void Finalize() override;
				
		FGraphNodeCreator<UK2Node_CreateDelegate>* ToFGraphNodeCreator() const;

		ISCW_FGraphNodeCreator_UK2Node_CreateDelegatePtr ToFGraphNodeCreator_UK2Node_CreateDelegatePtr() override;
		ISCW_FGraphNodeCreator_UK2Node_CreateDelegateConstPtr ToFGraphNodeCreator_UK2Node_CreateDelegatePtr() const override;

	protected:
		TSharedPtr<FGraphNodeCreator<UK2Node_CreateDelegate>> GraphNodeCreator;
	};
} // namespace Sourcify