#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "EPalletState.h"
#include "PalletTracker.generated.h"

class USceneComponent;
class UDBDNavEvadeLoopComponent;
class APallet;

UCLASS(Blueprintable)
class DEADBYDAYLIGHT_API APalletTracker : public AActor
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	USceneComponent* _indicatorLocation;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UDBDNavEvadeLoopComponent* _navEvadeLoopComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TrackedPallet, Transient, meta=(AllowPrivateAccess=true))
	APallet* _trackedPallet;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Transient, meta=(AllowPrivateAccess=true))
	APallet* _procedurallySpawnedPallet;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TrackedPalletState, meta=(AllowPrivateAccess=true))
	EPalletState _trackedPalletState;

private:
	UFUNCTION(BlueprintCallable)
	void OnRep_TrackedPalletState() const;

	UFUNCTION(BlueprintCallable)
	void OnRep_TrackedPallet() const;

public:
	UFUNCTION(BlueprintPure)
	bool CanSpawnPalletAtLocation(const AActor* spawningActor) const;

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

public:
	APalletTracker();
};

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