#pragma once

#include "CoreMinimal.h"
#include "CoreBaseUserWidget.h"
#include "Templates/SubclassOf.h"
#include "ToastNotificationViewData.h"
#include "CoreToastNotificationWidget.generated.h"

class UDBDImage;
class UDBDRichTextBlock;
class UHorizontalBox;
class UCoreKeyListenerButtonWidget;
class UCoreButtonWidget;

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

public:
	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDImage* ToastIcon;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDRichTextBlock* ToastTitle;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDRichTextBlock* ToastText;

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

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UHorizontalBox* ButtonContainer;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreKeyListenerButtonWidget* LeftButton;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreKeyListenerButtonWidget* RightButton;

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UCoreKeyListenerButtonWidget> ButtonWidgetClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString InputBlockerId;

private:
	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	FToastNotificationViewData _toastData;

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

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void SetVisuals(const FToastNotificationViewData& toastData, const bool isInteractable);

private:
	UFUNCTION(BlueprintCallable)
	void OnTimerFinished();

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void OnRightButtonClicked(UCoreButtonWidget* button);

private:
	UFUNCTION(BlueprintPure=false, BlueprintCallable)
	void OnOutAnimationFinished() const;

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void OnLeftButtonClicked(UCoreButtonWidget* button);

private:
	UFUNCTION(BlueprintCallable)
	void OnButtonClicked(const int32 buttonId);

public:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void ChangeVisibility(bool isVisible);

public:
	UCoreToastNotificationWidget();
};

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