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

#pragma once
#include <functional>
#include "ISCW_UObject.h"
#include "ISCW_UEdGraphPin.h"
#include <memory>
#include <string>
#include <vector>

using std::function;
using std::shared_ptr;
using std::vector;
using std::wstring;

namespace Sourcify
{	
	class ISCW_UEdGraph;

	class ISCW_UEdGraphNode : public virtual ISCW_UObject
	{
	public:
		virtual ~ISCW_UEdGraphNode() = default;

		virtual void ClearCompilerMessage() = 0;

		virtual void DestroyNode() = 0;

		virtual ISCW_UEdGraphPinPtr FindPin(const wstring PinName, const SCW_EEdGraphPinDirection Direction = SCW_EEdGraphPinDirection::EGPD_MAX) const = 0;

		virtual ISCW_UEdGraphPinPtr FindPinChecked(const wstring PinName, const SCW_EEdGraphPinDirection Direction = SCW_EEdGraphPinDirection::EGPD_MAX) const = 0;

		virtual ISCW_UEdGraphPinPtr FindPinByPredicate(const function<bool(ISCW_UEdGraphPinPtr)>& Predicate) const = 0;

		virtual shared_ptr<ISCW_UEdGraph> GetGraph() const = 0;
		
		virtual bool GetCommentBubblePinned() const = 0;

		virtual bool GetCommentBubbleVisible() const = 0;

		virtual wstring GetNodeComment() const = 0;

		virtual int32_t GetNodeHeight() const = 0;

		virtual int32_t GetNodePosX() const = 0;

		virtual int32_t GetNodePosY() const = 0;

		virtual vector<ISCW_UEdGraphPinPtr> GetPins() const = 0;

		virtual void PinConnectionListChanged(ISCW_UEdGraphPinPtr Pin) = 0;

		virtual void PinTypeChanged(ISCW_UEdGraphPinPtr Pin) = 0;
			
		virtual void ReconstructNode() const = 0;

		virtual bool RemovePin(ISCW_UEdGraphPinPtr Pin) const = 0;

		virtual void SetCommentBubblePinned(bool InPinned) = 0;

		virtual void SetCommentBubbleVisible(bool InVisible) = 0;

		virtual void SetDisableOrphanPinSaving(bool InOrphanPinSaving) = 0;

		virtual void SetNodeComment(const wstring InNodeComment) = 0;

		virtual void SetNodeHeight(int32_t InHeight) = 0;

		virtual void SetNodePosX(int32_t InNodePosX) = 0;

		virtual void SetNodePosY(int32_t InNodePosY) = 0;

		virtual shared_ptr<ISCW_UEdGraphNode> ToUEdGraphNodePtr() = 0;

		virtual shared_ptr<const ISCW_UEdGraphNode> ToUEdGraphNodePtr() const = 0;
	};

	using ISCW_UEdGraphNodeConstPtr = shared_ptr<const ISCW_UEdGraphNode>;
	using ISCW_UEdGraphNodePtr = shared_ptr<ISCW_UEdGraphNode>;
} // namespace Sourcify