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

#pragma once

#include "ISCW_UEdGraphNode.h"
#include "ISCW_UEdGraph.h"
#include "SCW_UObject.h"

class UEdGraphNode;

namespace Sourcify
{
	class SCW_UEdGraphNode : public SCW_UObject, public virtual ISCW_UEdGraphNode
	{
	public:
		SCW_UEdGraphNode(UEdGraphNode* InEdGraphNode);

		void ClearCompilerMessage() override;

		void DestroyNode() override;

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

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

		ISCW_UEdGraphPinPtr FindPinByPredicate(const function<bool(ISCW_UEdGraphPinPtr)>& Predicate) const override;

		ISCW_UEdGraphPtr GetGraph() const override;
			
		bool GetCommentBubblePinned() const override;

		bool GetCommentBubbleVisible() const override;

		wstring GetNodeComment() const override;
		
		int32_t GetNodeHeight() const override;
		
		int32_t GetNodePosX() const override;

		int32_t GetNodePosY() const override;

		vector<ISCW_UEdGraphPinPtr> GetPins() const override;

		void PinConnectionListChanged(ISCW_UEdGraphPinPtr Pin) override;

		void PinTypeChanged(ISCW_UEdGraphPinPtr Pin) override;
		
		void ReconstructNode() const override;

		bool RemovePin(ISCW_UEdGraphPinPtr Pin) const override;

		void SetCommentBubblePinned(bool InPinned) override;

		void SetCommentBubbleVisible(bool InVisible) override;

		void SetDisableOrphanPinSaving(bool InOrphanPinSaving) override;
		
		void SetNodeComment(const wstring InNodeComment) override;

		void SetNodeHeight(int32_t InHeight) override;

		void SetNodePosX(int32_t InNodePosX) override;

		void SetNodePosY(int32_t InNodePosY) override;

		UEdGraphNode* ToUEdGraphNode() const;

		ISCW_UEdGraphNodePtr ToUEdGraphNodePtr() override;

		ISCW_UEdGraphNodeConstPtr ToUEdGraphNodePtr() const override;

	protected:
		UEdGraphNode* EdGraphNode;
	};
} // namespace Sourcify