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

#pragma once
#include "ISCW_EngineVersionComparison.h"
#if ISCW_UE_VERSION_NEWER_THAN_OR_EQUAL(5,6,0)
#include "ISCW_FInstancedPropertyBag.h"
#include "ISCW_UDataAsset.h"
#include "ISCW_UScriptStruct.h"

#include <functional>
#include <memory>
#include <string>

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

namespace Sourcify
{
	class ISCW_UStateTree : public virtual ISCW_UDataAsset
	{
	public:
		virtual ~ISCW_UStateTree() = default;

		virtual void Compile() = 0;
		virtual void VisitPropertyBags(function<void(ISCW_FInstancedPropertyBag&)> Visitor) = 0;
		virtual void VisitEditorNodeStructTypes(function<void(ISCW_UScriptStructConstPtr currentType, function<void(ISCW_UScriptStructPtr newType)> replacer)> Visitor) = 0;
		virtual void VisitEventPayloadStructs(function<void(ISCW_UScriptStructConstPtr currentType, function<void(ISCW_UScriptStructPtr newType)> replacer)> Visitor) = 0;
		virtual void VisitSchemaTypeReferences(function<void(ISCW_UObjectConstPtr currentType, function<void(ISCW_UObjectPtr newType)> replacer)> Visitor) = 0;
		virtual void VisitPropertyBindingPathSegments(function<wstring(const wstring& segmentName)> Visitor) = 0;

		virtual shared_ptr<ISCW_UStateTree> ToUStateTreePtr() = 0;
		virtual shared_ptr<const ISCW_UStateTree> ToUStateTreePtr() const = 0;
	};

	using ISCW_UStateTreeConstPtr = shared_ptr<const ISCW_UStateTree>;
	using ISCW_UStateTreePtr = shared_ptr<ISCW_UStateTree>;
} // namespace Sourcify
#endif // ISCW_UE_VERSION_NEWER_THAN_OR_EQUAL(5,6,0)