#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Templates/SubclassOf.h"
#include "Engine/NetSerialization.h"
#include "K38DogPathPreviewComponent.generated.h"

class UNavigationQueryFilter;
class AK38PatrolPathNode;

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

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UNavigationQueryFilter> NavigationFilterClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<AK38PatrolPathNode> _patrolPathNodeClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _pathLineThickness;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _visualPathZOffset;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _maximumDistanceBetweenNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _minimumDistanceBetweenNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _maximumHeightDeltaBetweenNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _nodeMultiplierForSlopesAndStairs;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _clearPathNodeDelay;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _findFloorRaycastStartHeight;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _findFloorRaycastLength;

private:
	UPROPERTY(BlueprintReadWrite, ReplicatedUsing=OnRep_PathPoints, Transient, meta=(AllowPrivateAccess=true))
	TArray<FVector_NetQuantize> _pathPoints;

	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TArray<AK38PatrolPathNode*> _visualNodes;

private:
	UFUNCTION(BlueprintCallable)
	void OnRep_PathPoints();

public:
	virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;

public:
	UK38DogPathPreviewComponent();
};

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