#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "GameplayTagContainer.h"
#include "PlayersInDyingStateSurrenderTrackerComponent.generated.h"

class ASurvivor;

UCLASS(Blueprintable, EditInlineNew, meta=(BlueprintSpawnableComponent))
class UPlayersInDyingStateSurrenderTrackerComponent : public UActorComponent
{
	GENERATED_BODY()

private:
	UPROPERTY(EditInstanceOnly, Transient)
	TMap<TWeakObjectPtr<ASurvivor>, int32> _survivorHealedFromDyingCountMap;

	UPROPERTY(EditInstanceOnly, Transient)
	TArray<TWeakObjectPtr<ASurvivor>> _survivorsWithExemptDyingState;

	UPROPERTY(EditAnywhere)
	TArray<FGameplayTag> _stateTagsForDyingStateExemption;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	int32 _numHealsFromDyingBeforeAllowSurrender;

public:
	UPlayersInDyingStateSurrenderTrackerComponent();
};

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