#pragma once

#include "CoreMinimal.h"
#include "CoreButtonWidget.h"
#include "LobbyPlayerListViewData.h"
#include "EPlayerListItemState.h"
#include "LobbyPlayerListItemWidget.generated.h"

class UOverlay;
class UDBDTextBlock;
class UDBDImage;
class UCoreMenuClassWidget;

UCLASS(Blueprintable, EditInlineNew)
class ULobbyPlayerListItemWidget : public UCoreButtonWidget
{
	GENERATED_BODY()

protected:
	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* EmptyOverlay;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* LockedOverlay;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* InviteOverlay;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* PlayerOverlay;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* DetailsOverlay;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* SearchingOverlay;

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

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

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

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

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

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* LocalPlayerOverlay;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* OverlayPlayerBackgroundKiller;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UOverlay* OverlayPlayerBackgroundSurvivor;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDImage* PlayerReadyImg;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDImage* PlayerNotReadyImg;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreMenuClassWidget* ClassWidget;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDImage* WeakConnectionIcon;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDImage* CrossPlayIcon;

private:
	UPROPERTY(BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	FLobbyPlayerListViewData _viewData;

private:
	UFUNCTION(BlueprintCallable)
	void ShowLoadoutPartTooltip(UCoreButtonWidget* hoveredSlotWidget);

public:
	UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
	void SetState(EPlayerListItemState state);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void OnBindHoverBorder(EPlayerListItemState state, bool isHoverEnabled);

private:
	UFUNCTION(BlueprintCallable)
	void HideLoadoutPartTooltip(UCoreButtonWidget* unhoveredSlotWidget);

public:
	ULobbyPlayerListItemWidget();
};

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