#pragma once

#include "CoreMinimal.h"
#include "CoreBaseUserWidget.h"
#include "OnWidgetVisibilityChangedDelegate.h"
#include "EPlayerRole.h"
#include "Components/SlateWrapperTypes.h"
#include "Input/Events.h"
#include "CoreStoreCharacterPerksToastWidget.generated.h"

class UDBDTextBlock;
class UCoreCharacterPerksWidget;
class UWidget;
class UMenuPerkViewData;
class UMenuPowerViewData;

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

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDTextBlock* Title;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreCharacterPerksWidget* CharacterPerks;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	TArray<UWidget*> _ignoreClickWidgets;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool _isShowing;

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FOnWidgetVisibilityChangedDelegate _onWidgetVisibilityChanged;

public:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void ToggleWidgetVisibility();

	UFUNCTION(BlueprintCallable)
	void SetData(TArray<UMenuPerkViewData*> characterUniquePerksViewData, const EPlayerRole role, UMenuPowerViewData* killerPowerViewData);

protected:
	UFUNCTION(BlueprintCallable)
	void OnWidgetVisibilityChanged(ESlateVisibility newVisibility);

private:
	UFUNCTION()
	void OnPlayerClick(const FPointerEvent& pointerEvent);

public:
	UCoreStoreCharacterPerksToastWidget();
};

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