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

#pragma once

#include "ISCW_FEdGraphPinType.h"
#include "ISCW_UEdGraphPin.h"
#include "ISCW_UEdGraphNode.h"
#include "ISCW_UEdGraphSchema.h"
#include "SCW_Base.h"

class UEdGraphPin;

namespace Sourcify
{
	class SCW_UEdGraphPin : public SCW_Base, public virtual ISCW_UEdGraphPin
	{
	public:
		SCW_UEdGraphPin(UEdGraphPin* InEdGraphPin);

		void BreakAllPinLinks(bool bNotifyNodes = false) override;
			
		wstring GetDefaultValue() const override;

		ISCW_UObjectPtr GetDefaultObject() const override;
		
		wstring GetDefaultTextValue() const override;

		bool GetDefaultValueIsReadOnly() const override;

		wstring GetDisplayName() const override;

		bool GetIsOrphaned() const override;
		
		vector<ISCW_UEdGraphPinPtr> GetLinkedTo() const override;
		
		ISCW_UEdGraphNodePtr GetOwningNode() const override;

		ISCW_UEdGraphNodePtr GetOwningNodeUnchecked() const override;

		bool IsOwningNodeEqualToUnchecked(ISCW_UEdGraphNodePtr Node) const override;

		ISCW_UEdGraphPinPtr GetParentPin() const override;

		vector<ISCW_UEdGraphPinPtr> GetSubPins() const override;

		SCW_EEdGraphPinDirection GetPinDirection() const override;

		wstring GetPinFriendlyName() const override;

		wstring GetPinID() const override;

		wstring GetPinName() const override;

		ISCW_FEdGraphPinTypePtr GetPinType() const override;

		ISCW_UEdGraphSchemaConstPtr GetSchema() const override;
		
		bool ISCW_Equals(const ISCW_UEdGraphPin& Other) const override;

		bool ISCW_Equals(shared_ptr<const ISCW_UEdGraphPin> Other) const override;

		bool Less(const ISCW_UEdGraphPin& Other) const override;

		bool LinkedTo_IsEmpty() const override;

		void MakeLinkTo(ISCW_UEdGraphPinPtr ToPin) const override;

		void MovePersistentDataFromOldPin(ISCW_UEdGraphPinPtr SourcePinPtr) override;
		
		void SetDefaultValue(wstring InDefaultValue) const override;

		void SetDefaultObject(ISCW_UObjectPtr InObjectPtr) const override;

		void SetDefaultTextValue(wstring InDefaultValue) const override;

		void SetPinDirection(SCW_EEdGraphPinDirection Direction) const override;

		void SetPinName(const wstring& Name) const override;

		void SetSavePinIfOrphaned(bool bShouldSave) const override;

		UEdGraphPin* ToUEdGraphPin() const;

		ISCW_UEdGraphPinPtr ToUEdGraphPinPtr() override;
		ISCW_UEdGraphPinConstPtr ToUEdGraphPinPtr() const override;

		bool WasTrashed() const override;
		
	protected:
		UEdGraphPin* EdGraphPin;
	};
} // namespace Sourcify