#pragma once

#include "CoreMinimal.h"
#include "Perk.h"
#include "Templates/SubclassOf.h"
#include "StatusEffectSpawnData.h"
#include "PlayerStatusEffectSpawnerHelper.h"
#include "DeadHard.generated.h"

class UDeadHardInteraction;
class UStatusEffect;
class UInteractionAttacherComponent;

UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
class UDeadHard : public UPerk
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UDeadHardInteraction> _deadHardInteraction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _deadHardCooldownDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TArray<FStatusEffectSpawnData> _effectsToSpawn;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	FPlayerStatusEffectSpawnerHelper _spawnerHelper;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UStatusEffect> _enduranceEffectClass;

	UPROPERTY(EditAnywhere)
	float _exhaustedCooldownPerLevel;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UInteractionAttacherComponent* _interactionAttacherComponent;

private:
	UFUNCTION(BlueprintPure)
	float GetExhaustedDuration() const;

public:
	UFUNCTION(BlueprintPure)
	float GetDeadHardCooldownDuration() const;

public:
	UDeadHard();
};

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