#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Engine/HitResult.h"
#include "K30HugCosmeticHandler.generated.h"

class UVaultableComponent;
class ASurvivor;
class UBoxComponent;
class ADBDPlayer;
class UPrimitiveComponent;

UCLASS(Blueprintable, Abstract)
class AK30HugCosmeticHandler : public AActor
{
	GENERATED_BODY()

private:
	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UVaultableComponent* _linkedVaultable;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	ASurvivor* _instigator;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UBoxComponent* _box;

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

private:
	UFUNCTION(BlueprintCallable)
	void OnVault(ADBDPlayer* vaulter);

	UFUNCTION()
	void OnBeginOverlap(UPrimitiveComponent* overlappedComponent, AActor* other, UPrimitiveComponent* otherComp, int32 otherBodyIndex, bool bFromSweep, const FHitResult& sweepResult);

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_Hug(bool isHugging, AActor* vaultableOwner, ASurvivor* hugInstigator);

public:
	AK30HugCosmeticHandler();
};

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