#pragma once

#include "CoreMinimal.h"
#include "TallyScoreboardViewInterface.h"
#include "CoreBaseUserWidget.h"
#include "PlayerReportClicked.h"
#include "PlayerStatusClicked.h"
#include "PlayerSocialOptionClicked.h"
#include "TallyPlayerStatusViewData.h"
#include "PlayerSocialOptionViewData.h"
#include "CoreTallyScoreboardWidget.generated.h"

class UCoreTallyPlayerStatusWidget;
class UDBDTextBlock;
class UCorePlayerSocialOptionsMenuWidget;

UCLASS(Blueprintable, EditInlineNew)
class DBDUIVIEWSCORE_API UCoreTallyScoreboardWidget : public UCoreBaseUserWidget, public ITallyScoreboardViewInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	TArray<UCoreTallyPlayerStatusWidget*> SurvivorStatusWidgets;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	TArray<UCoreTallyPlayerStatusWidget*> KillerStatusWidgets;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDTextBlock* StatusTB;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDTextBlock* ScoreTB;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCorePlayerSocialOptionsMenuWidget* PlayerSocialOptionsMenu;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float SocialOptionsMenuRightOffset;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float SocialOptionsMenuTopOffset;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, BlueprintCallable, meta=(AllowPrivateAccess=true))
	FPlayerReportClicked _onPlayerReportClicked;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, BlueprintCallable, meta=(AllowPrivateAccess=true))
	FPlayerStatusClicked _onPlayerStatusClicked;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, BlueprintCallable, meta=(AllowPrivateAccess=true))
	FPlayerSocialOptionClicked _onPlayerSocialOptionClicked;

	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TArray<FTallyPlayerStatusViewData> _tallyPlayerStatusViewData;

private:
	UFUNCTION(BlueprintCallable)
	void OnReportButtonClicked(const FString& playerId);

	UFUNCTION(BlueprintCallable)
	void OnPlayerStatusClicked(const FString& playerId);

	UFUNCTION(BlueprintCallable)
	void OnPlayerSocialOptionClicked(const FPlayerSocialOptionViewData& playerSocialOptionData);

public:
	UCoreTallyScoreboardWidget();
};

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