#pragma once

#include "CoreMinimal.h"
#include "ObjectStateProvider.h"
#include "SpectatingActorLinker.h"
#include "DBDCharacter.h"
#include "DBDTunableRowHandle.h"
#include "TunableStat.h"
#include "EPowerState.h"
#include "K30DrawPatrolActor.generated.h"

class UGameplayTagContainerComponent;
class UFloatValueStrategy;
class AKiller;
class APawn;
class AController;
class AK30Power;

UCLASS(Blueprintable)
class THEK30_API AK30DrawPatrolActor : public ADBDCharacter, public IObjectStateProvider, public ISpectatingActorLinker
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UGameplayTagContainerComponent* _objectState;

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FTunableStat _drawPatrolMaxSpeed;

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

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFloatValueStrategy* _mouseYawMultiplier;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UFloatValueStrategy* _mouseYawTransitionTime;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _perchRadiusThreshold;

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

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TWeakObjectPtr<AKiller> _cachedK30Pawn;

private:
	UFUNCTION(BlueprintCallable, Server, Reliable)
	void Server_SendStartPatrolInputPressed();

	UFUNCTION(BlueprintCallable, Server, Reliable)
	void Server_SendGiveOrderInputPressed();

	UFUNCTION(BlueprintCallable, Server, Reliable)
	void Server_SendCancelInteractionInputPressed();

	UFUNCTION(BlueprintCallable)
	void OnPostProcessInput();

	UFUNCTION(BlueprintCallable)
	void OnLevelReadyToPlay();

	UFUNCTION(BlueprintCallable)
	void OnControllerChanged(APawn* pawn, AController* oldController, AController* newController);

protected:
	UFUNCTION(BlueprintPure)
	AK30Power* GetK30Power();

	UFUNCTION(BlueprintPure)
	AKiller* GetK30Actor();

public:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_SpectatorUpdateVFX(EPowerState currentState);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_SendPathNearlyEndingWarning();

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void BP_OnDrawPatrolActorInitialized();

public:
	AK30DrawPatrolActor();
};

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