#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "DBDTunableRowHandle.h"
#include "HauntProjectilePlayerInventoryComponent.generated.h"

class UAuthoritativeActorPoolComponent;

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

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_CurrentHauntCount)
	int32 _currentHauntCount;

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

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export, meta=(AllowPrivateAccess=true))
	UAuthoritativeActorPoolComponent* _hauntPool;

private:
	UFUNCTION(BlueprintCallable)
	void OnRep_CurrentHauntCount(int32 previousHauntCount);

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnHauntCountChange(int32 hauntCount);

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

public:
	UHauntProjectilePlayerInventoryComponent();
};

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