#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "ActorPoolData.h"
#include "Templates/SubclassOf.h"
#include "SurvivorTormentTrailComponent.generated.h"

class UTormentTrailSpawnerComponent;
class UTormentTrailPointCollectionComponent;
class UAuthoritativeActorPoolComponent;

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

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FActorPoolData _tormentTrailControllerPoolData;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FActorPoolData _tormentRestrictedTrailControllerPoolData;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FActorPoolData _tormentTrailPointPoolData;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FActorPoolData _restrictedTormentTrailPointPoolData;

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

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<UTormentTrailSpawnerComponent> _tormentTrailSpawnerComponentClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TormentTrailPointCollection, Instanced, meta=(AllowPrivateAccess=true))
	UTormentTrailPointCollectionComponent* _tormentTrailPointCollection;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_RestrictedTormentTrailPointCollection, Instanced, meta=(AllowPrivateAccess=true))
	UTormentTrailPointCollectionComponent* _restrictedTormentTrailPointCollection;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TormentTrailControllerPool, Instanced, meta=(AllowPrivateAccess=true))
	UAuthoritativeActorPoolComponent* _tormentTrailControllerPool;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TormentRestrictedTrailControllerPool, Instanced, meta=(AllowPrivateAccess=true))
	UAuthoritativeActorPoolComponent* _tormentRestrictedTrailControllerPool;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TormentTrailPointPool, Instanced, meta=(AllowPrivateAccess=true))
	UAuthoritativeActorPoolComponent* _tormentTrailPointPool;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_RestrictedTormentTrailPointPool, Instanced, meta=(AllowPrivateAccess=true))
	UAuthoritativeActorPoolComponent* _restrictedTormentTrailPointPool;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_TormentTrailSpawnerComponent, Instanced, meta=(AllowPrivateAccess=true))
	UTormentTrailSpawnerComponent* _tormentTrailSpawnerComponent;

private:
	UFUNCTION(BlueprintCallable)
	void OnRep_TormentTrailSpawnerComponent();

	UFUNCTION(BlueprintCallable)
	void OnRep_TormentTrailPointPool();

	UFUNCTION(BlueprintCallable)
	void OnRep_TormentTrailPointCollection();

	UFUNCTION(BlueprintCallable)
	void OnRep_TormentTrailControllerPool();

	UFUNCTION(BlueprintCallable)
	void OnRep_TormentRestrictedTrailControllerPool();

	UFUNCTION(BlueprintCallable)
	void OnRep_RestrictedTormentTrailPointPool();

	UFUNCTION(BlueprintCallable)
	void OnRep_RestrictedTormentTrailPointCollection();

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

public:
	USurvivorTormentTrailComponent();
};

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