#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "UObject/NoExportTypes.h"
#include "DBDNavObstacleAnalysisComponent.generated.h"

class UDBDNavObstacle;
class UNavObstacleMatrix;

UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
class DBDBOTS_API UDBDNavObstacleAnalysisComponent : public UActorComponent
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool IsSupported;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float CloseLoopRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float InitialMergeObstacleRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float MaxMergeObstacleRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float MergeObstacleRadiusMultiplierPerStep;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float ObstacleMatrixCellSize;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TArray<FVector> _edgeVertices;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TArray<UDBDNavObstacle*> _incompleteNavObstacles;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TArray<UDBDNavObstacle*> _navObstacles;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	UNavObstacleMatrix* _navObstacleMatrix;

private:
	UFUNCTION(BlueprintCallable)
	void OnLevelReadyToPlay();

public:
	UDBDNavObstacleAnalysisComponent();
};

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