#pragma once

#include "CoreMinimal.h"
#include "CoreButtonWidget.h"
#include "CorePrestigeWidgetConfiguration.h"
#include "PrestigeViewData.h"
#include "CorePrestigeWidget.generated.h"

class UDBDImage;
class UOverlay;
class UDBDTextBlock;

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

protected:
	UPROPERTY(BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDImage* PrestigeImage;

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

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

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

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

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

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

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FCorePrestigeWidgetConfiguration _widgetConfiguration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool _showProgress;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool _showClaws;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _levelZeroPrestigeImageRenderOpacity;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FPrestigeViewData _prestigeData;

public:
	UFUNCTION(BlueprintPure=false, BlueprintCallable)
	void UpdatePrestigeImageOpacity() const;

	UFUNCTION(BlueprintCallable)
	void UpdateImagesAndText(const FPrestigeViewData& data);

	UFUNCTION(BlueprintPure=false, BlueprintCallable)
	void UpdateComponentVisibility() const;

	UFUNCTION(BlueprintCallable)
	void SetProgressVisibility(bool show);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void SetData(const FPrestigeViewData& data, bool hideClaws);

	UFUNCTION(BlueprintCallable)
	void SetClawVisibility(bool show);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
	void PlayTransitionAnimation();

public:
	UCorePrestigeWidget();
};

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