#pragma once

#include "CoreMinimal.h"
#include "Perk.h"
#include "Templates/SubclassOf.h"
#include "Starstruck.generated.h"

class UStatusEffect;
class ASurvivor;

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

private:
	UPROPERTY(EditAnywhere)
	float _exposedEffectDuration;

	UPROPERTY(EditAnywhere)
	float _perkCooldownDuration;

	UPROPERTY(EditInstanceOnly, Transient, Export)
	TMap<TWeakObjectPtr<ASurvivor>, TWeakObjectPtr<UStatusEffect>> _survivorExposedEffects;

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

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

	UFUNCTION(BlueprintPure)
	float GetExposedEffectDurationAtLevel() const;

public:
	UStarstruck();
};

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