#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "DBDTunableRowHandle.h"
#include "EIdlePostStopOperation.h"
#include "GuardIdleComponent.generated.h"

class UGuardVisionUpdater;

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

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UGuardVisionUpdater* _visionUpdater;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, meta=(AllowPrivateAccess=true))
	bool _canIdle;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _idleDuration;

private:
	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_OnIdleStopped(EIdlePostStopOperation operation);

	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_OnIdleStarted();

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

public:
	UGuardIdleComponent();
};

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