#pragma once

#include "CoreMinimal.h"
#include "InteractionDisabledPromptInterface.h"
#include "BlockableComponent.h"
#include "DBDTunableRowHandle.h"
#include "SpecialEventScoreHandler.h"
#include "EPawnType.h"
#include "BlockableBySnowballComponent.generated.h"

class UTimerObject;

UCLASS(Blueprintable, Abstract, meta=(BlueprintSpawnableComponent))
class WINTEREVENT_API UBlockableBySnowballComponent : public UBlockableComponent, public IInteractionDisabledPromptInterface
{
	GENERATED_BODY()

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FSpecialEventScoreHandler _scoreHandlerProximityInteraction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FSpecialEventScoreHandler _scoreHandlerProjectile;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TArray<EPawnType> _canBeBlockedByPawnTypes;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, ReplicatedUsing=OnRep_CooldownTimer, Transient, Instanced, meta=(AllowPrivateAccess=true))
	UTimerObject* _cooldownTimer;

private:
	UFUNCTION(BlueprintCallable)
	void OnRep_CooldownTimer();

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnCooldownStarted(float cooldownTime);

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

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

public:
	UBlockableBySnowballComponent();
};

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