#pragma once

#include "CoreMinimal.h"
#include "BloodPointBulkSpendingPopupViewInterface.h"
#include "CoreGenericPopupWidget.h"
#include "UObject/NoExportTypes.h"
#include "Types/SlateEnums.h"
#include "ECurrencyType.h"
#include "CoreBloodPointBulkSpendingPopupWidget.generated.h"

class UCurveFloat;
class UCoreInputSwitcherWidget;
class UDBDTextBlock;
class UDBDEditableTextBox;
class UCorePrestigeWidget;
class UCoreCurrencyInputSwitcherWidget;
class UDBDButton;
class UBloodPointBulkSpendingPopupViewData;
class UCoreButtonWidget;

UCLASS(Blueprintable, EditInlineNew)
class DBDUIVIEWSCORE_API UCoreBloodPointBulkSpendingPopupWidget : public UCoreGenericPopupWidget, public IBloodPointBulkSpendingPopupViewInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FLinearColor DefaultInputTextColor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FLinearColor DisabledInputTextColor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UCurveFloat* _levelChangeTimeCurve;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UCurveFloat* _levelChangeUnitCurve;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreInputSwitcherWidget* MinInputSwitcher;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreInputSwitcherWidget* LessInputSwitcher;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreInputSwitcherWidget* MoreInputSwitcher;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreInputSwitcherWidget* MaxInputSwitcher;

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

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDEditableTextBox* InputTextBox;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCorePrestigeWidget* CurrentPrestige;

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

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

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCorePrestigeWidget* ExpectedPrestige;

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

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

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

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreCurrencyInputSwitcherWidget* ConfirmButton;

	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDButton* HitzoneButton;

	UPROPERTY(BlueprintReadWrite, Transient)
	UBloodPointBulkSpendingPopupViewData* _viewData;

protected:
	UFUNCTION(BlueprintCallable)
	void OnValueCommitted(const FText& inText, ETextCommit::Type inCommitType);

	UFUNCTION(BlueprintCallable)
	void OnValueChanged(const FText& inText);

private:
	UFUNCTION(BlueprintCallable)
	void OnMoreInputTriggered();

	UFUNCTION(BlueprintCallable)
	void OnMinInputTriggered();

	UFUNCTION(BlueprintCallable)
	void OnMaxInputTriggered();

	UFUNCTION(BlueprintCallable)
	void OnLessInputTriggered();

	UFUNCTION(BlueprintCallable)
	void OnInputPromptReleased();

	UFUNCTION(BlueprintCallable)
	void OnInputPromptPressed();

protected:
	UFUNCTION(BlueprintCallable)
	void OnInputChanged();

private:
	UFUNCTION(BlueprintCallable)
	void OnInputButtonReleased(UCoreButtonWidget* buttonTarget);

	UFUNCTION(BlueprintCallable)
	void OnInputButtonPressed(UCoreButtonWidget* buttonTarget);

	UFUNCTION(BlueprintCallable)
	void OnHitzoneUnhovered();

	UFUNCTION(BlueprintCallable)
	void OnHitzoneHovered();

	UFUNCTION(BlueprintCallable)
	void OnConfirmClicked(ECurrencyType currencyType);

	UFUNCTION(BlueprintCallable)
	void OnConfirmButtonUnhovered(UCoreButtonWidget* buttonTarget);

	UFUNCTION(BlueprintCallable)
	void OnConfirmButtonHovered(UCoreButtonWidget* buttonTarget);

public:
	UCoreBloodPointBulkSpendingPopupWidget();
};

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