#pragma once

#include "CoreMinimal.h"
#include "NumberedChargesSurvivorCollectable.h"
#include "Templates/SubclassOf.h"
#include "TimedEffectNumberedChargesSurvivorCollectable.generated.h"

class UStatusEffect;
class UFloatValueStrategy;

UCLASS(Blueprintable)
class DBDSURVIVORCOLLECTABLES_API ATimedEffectNumberedChargesSurvivorCollectable : public ANumberedChargesSurvivorCollectable
{
	GENERATED_BODY()

public:
	DECLARE_DYNAMIC_MULTICAST_DELEGATE(FEffectDurationEnd);

	DECLARE_DYNAMIC_MULTICAST_DELEGATE(FEffectDurationBegin);

public:
	UPROPERTY(BlueprintReadWrite, BlueprintAssignable)
	FEffectDurationBegin OnEffectDurationBegin;

	UPROPERTY(BlueprintReadWrite, BlueprintAssignable)
	FEffectDurationEnd OnEffectDurationEnd;

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	TArray<UStatusEffect*> _timedStatusEffects;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TArray<TSubclassOf<UStatusEffect>> _statusEffectClassesToApplyOnChargeConsumed;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFloatValueStrategy* _effectDurationStrategy;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFloatValueStrategy* _statusEffectCustomParam;

public:
	UFUNCTION(BlueprintCallable)
	void Authority_AddStatusEffectToUseOnChargeConsumed(TSubclassOf<UStatusEffect> statusEffectToAdd);

public:
	ATimedEffectNumberedChargesSurvivorCollectable();
};

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