#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "ProgressionPoints.h"
#include "Engine/DataTable.h"
#include "DBDEmblem.generated.h"

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

protected:
	UPROPERTY(BlueprintReadWrite, Replicated, Transient)
	float _points;

	UPROPERTY(BlueprintReadWrite, Replicated, Transient)
	TArray<FProgressionPoints> _progressionPoints;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDataTableRowHandle _definition;

private:
	UFUNCTION(BlueprintCallable, Server, Reliable)
	void Server_EnableEmblemDebugging(bool enabled);

	UFUNCTION(BlueprintCallable, Client, Reliable)
	void Client_FinalizeReplication(const float points, const TArray<FProgressionPoints>& progressionPoints);

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

public:
	UDBDEmblem();
};

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