#pragma once

#include "CoreMinimal.h"
#include "SubPresenter.h"
#include "ArchiveNodeGraphViewData.h"
#include "ArchiveMapPathViewData.h"
#include "UObject/ScriptInterface.h"
#include "EArchivesStoryLevelStatus.h"
#include "EPlayerRole.h"
#include "UObject/NoExportTypes.h"
#include "ArchiveQuestMapSubPresenter.generated.h"

class IArchiveLevelProgressionViewInterface;

UCLASS(Blueprintable)
class DBDUIPRESENTERS_API UArchiveQuestMapSubPresenter : public USubPresenter
{
	GENERATED_BODY()

protected:
	UPROPERTY(BlueprintReadWrite, Transient)
	TMap<FName, FArchiveNodeGraphViewData> _currentTomeNodeMap;

	UPROPERTY(BlueprintReadWrite, Transient)
	TArray<FArchiveMapPathViewData> _currentTomeMapPaths;

private:
	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TScriptInterface<IArchiveLevelProgressionViewInterface> _archiveLevelProgressionWidget;

	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TArray<EArchivesStoryLevelStatus> _storyLevelStatusCache;

private:
	UFUNCTION(BlueprintCallable)
	void UpdateTomeLevels();

	UFUNCTION(BlueprintCallable)
	void OnTomeMapCreated();

	UFUNCTION(BlueprintCallable)
	void OnTomeLevelRewardAnimationDone();

	UFUNCTION(BlueprintCallable)
	void OnQuestNodeUnhovered(EPlayerRole role);

	UFUNCTION(BlueprintCallable)
	void OnQuestNodeHovered(EPlayerRole role);

	UFUNCTION(BlueprintCallable)
	void OnPlayerCardUpdated(const FString& badgeId, const FString& bannerId);

	UFUNCTION(BlueprintCallable)
	void OnNodeSelected(const FName& nodeId, EPlayerRole role, const FVector2D& position);

	UFUNCTION(BlueprintCallable)
	void OnLevelSelected(const int32 levelIndex);

	UFUNCTION(BlueprintCallable)
	void NavigateToNextLevelAfterUnlock();

	UFUNCTION(BlueprintCallable)
	void GetCurrentLevel();

public:
	UArchiveQuestMapSubPresenter();
};

FORCEINLINE uint32 GetTypeHash(const UArchiveQuestMapSubPresenter) { return 0; }
