#pragma once

#include "CoreMinimal.h"
#include "Interactable.h"
#include "DBDTunableRowHandle.h"
#include "CrownPillarInteractable.generated.h"

class UCrownPickupInteraction;
class UChargeableComponent;
class UInteractor;
class UPrimitiveComponent;
class UStaticMeshComponent;
class UDBDOutlineComponent;
class UNearTrackedActorComponent;
class UCrownPillarOutlineUpdateStrategy;
class USpecialEventInteractableCooldownComponent;
class ADBDPlayer;

UCLASS(Blueprintable)
class ANNIVERSARY_API ACrownPillarInteractable : public AInteractable
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _crownPillarInteractionSecondsToCharge;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _crownPillarInteractionSecondsToChargeKiller;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _offeringEnabledAuraVisibilityDistance;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _defaultAuraVisibilityDistance;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FName _anniversaryOfferingTag;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UCrownPickupInteraction* _crownPillarInteraction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UCrownPickupInteraction* _crownPillarInteractionKiller;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UChargeableComponent* _crownPillarInteractionChargeable;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UChargeableComponent* _crownPillarInteractionChargeableKiller;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UInteractor* _crownPillarInteractor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UPrimitiveComponent* _crownPillarInteractionZone;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UStaticMeshComponent* _crownPillarStaticMesh;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UDBDOutlineComponent* _outlineComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	UNearTrackedActorComponent* _nearTrackedActorComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear, Instanced, meta=(AllowPrivateAccess=true))
	UCrownPillarOutlineUpdateStrategy* _crownPillarOutlineUpdateStrategy;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, meta=(AllowPrivateAccess=true))
	USpecialEventInteractableCooldownComponent* _cooldownComponent;

private:
	UFUNCTION(BlueprintCallable)
	void OnLocallyObservedChanged();

protected:
	UFUNCTION(BlueprintPure)
	bool IsLocallyObservedPlayerEquippedWithAnniversaryOffering() const;

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

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnStartedInteracting(ADBDPlayer* interactingPlayer, float interactionDuration);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnInteractionCompleted(ADBDPlayer* interactingPlayer);

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

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

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

public:
	ACrownPillarInteractable();
};

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