#pragma once

#include "CoreMinimal.h"
#include "SurvivorStatusInterface.h"
#include "Components/ActorComponent.h"
#include "TunableStat.h"
#include "DBDTunableRowHandle.h"
#include "Templates/SubclassOf.h"
#include "K38SurvivorStatusComponent.generated.h"

class UStatusEffect;
class AKiller;
class ASurvivor;

UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
class UK38SurvivorStatusComponent : public UActorComponent, public ISurvivorStatusInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FTunableStat _detectionKillerEffectDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _timeAddedOnEnduranceHit;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UStatusEffect> _k38SurvivorKOWithKillerEffectClass;

private:
	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_ApplyKillerEffectToSurvivor(AKiller* killer, bool applyEffect, float duration, bool keepCosmeticEffectActive);

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnK38DetectionKillerEffectStart(ASurvivor* survivor);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnK38DetectionKillerEffectEnd(ASurvivor* survivor);

public:
	UK38SurvivorStatusComponent();
};

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