#pragma once

#include "CoreMinimal.h"
#include "AIDisplayDebugInterface.h"
#include "BehaviorTree/BTService.h"
#include "BehaviorTree/BehaviorTreeTypes.h"
#include "Templates/SubclassOf.h"
#include "AITunableParameter.h"
#include "BTService_Flee.generated.h"

class UPathStrategySelector;
class UNavMovePath;
class UObject;

UCLASS(Blueprintable)
class DBDBOTS_API UBTService_Flee : public UBTService, public IAIDisplayDebugInterface
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBlackboardKeySelector BBFleePath;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBlackboardKeySelector BBShouldFallPallet;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBlackboardKeySelector BBEvadePointCrossingDest;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBlackboardKeySelector BBEvadePointInteractable;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBlackboardKeySelector BBIgnoreHostileStimulusInCooldown;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UPathStrategySelector> PathStrategySelectorClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TArray<UClass*> IgnoreOnEndObjectInFocusCooldownTypes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float OnEndObjectInFocusCooldown;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FAITunableParameter ShouldFallPalletUnderHostileHorizontalRange;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float ShouldFallPalletUnderHostileVerticalRange;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FAITunableParameter ShouldFallFragilePalletHorizontalRange;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float ClearFleePathBBKeyDelay;

private:
	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	UNavMovePath* _activePath;

	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TArray<UObject*> _lostFocusedObjects;

	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	UPathStrategySelector* _strategySelector;

public:
	UBTService_Flee();
};

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