#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "DBDTunableRowHandle.h"
#include "ActorPairQueryHeightRange.h"
#include "GameplayTagContainer.h"
#include "PalletTrackerVisibilityComponent.generated.h"

class APalletTracker;

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

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _visibilityRange;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FActorPairQueryHeightRange _visibilityHeightRange;

	UPROPERTY(EditAnywhere)
	FGameplayTagQuery _visibilityTagQuery;

private:
	UFUNCTION(BlueprintCallable)
	void OnLocallyObservedChanged();

public:
	UFUNCTION(BlueprintPure)
	APalletTracker* GetPalletTrackerOwner() const;

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnVisibilityChanged(bool isVisible);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnPalletTrackerSelectedChanged(bool selected);

public:
	UPalletTrackerVisibilityComponent();
};

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