#pragma once

#include "CoreMinimal.h"
#include "AIInteractableTargetInterface.h"
#include "PlayerInteractable.h"
#include "SurvivorInteractable.generated.h"

class UInteractor;
class UChargeableInteractionDefinition;
class UChargeableComponent;
class UActivatorComponent;
class UBoxComponent;
class USphereComponent;
class UInteractionDefinition;
class ASurvivor;

UCLASS(Blueprintable)
class DEADBYDAYLIGHT_API ASurvivorInteractable : public APlayerInteractable, public IAIInteractableTargetInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, Export)
	TArray<UInteractor*> HealingInteractors;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, Export)
	TArray<UChargeableInteractionDefinition*> _healInteractions;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, Export, meta=(AllowPrivateAccess=true))
	UChargeableComponent* _killCharge;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UActivatorComponent* _activator;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UInteractor* _killInteractor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UBoxComponent* _killInteractionZone;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	USphereComponent* _killHealthyInteractionZone;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UInteractor* _healingInteractor1;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UInteractor* _killerInteractor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	USphereComponent* _killerInteractionZone;

private:
	UFUNCTION(BlueprintCallable)
	void UpdateTargetHPSlot();

public:
	UFUNCTION(BlueprintCallable)
	void SetKillInteraction(UInteractionDefinition* killInteraction);

private:
	UFUNCTION(BlueprintCallable, Server, Unreliable)
	void ServerMoveOut();

protected:
	UFUNCTION(BlueprintPure, BlueprintImplementableEvent)
	UInteractor* GetSlasherInteractor() const;

public:
	UFUNCTION(BlueprintPure)
	ASurvivor* GetOwningSurvivor() const;

public:
	ASurvivorInteractable();
};

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