#pragma once

#include "CoreMinimal.h"
#include "ChallengesMenuViewInterface.h"
#include "CoreBaseUserWidget.h"
#include "ChallengeSkinUIData.h"
#include "Templates/SubclassOf.h"
#include "BackButtonClickedDelegate.h"
#include "SettingsButtonClickedDelegate.h"
#include "ChallengesMenuTabSelectedDelegate.h"
#include "CoreChallengesMenuWidget.generated.h"

class UCoreTabContainerWidget;
class UWidgetSwitcher;
class UCoreInputSwitcherWidget;
class UCoreFooterInputSwitcherWidget;
class UDBDTextBlock;
class UDataTable;
class UChallengesMenuChallengeSetWidget;
class UCoreTimerFlagWidget;
class UCoreSelectableButtonWidget;

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

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	UCoreTabContainerWidget* TabsContainer;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	UWidgetSwitcher* TabContentSwitcher;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	UCoreInputSwitcherWidget* BackInputSwitcher;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	UCoreFooterInputSwitcherWidget* SettingsInputSwitcher;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	UDBDTextBlock* TimerTitleTB;

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear)
	UDataTable* _eventSkinDataTable;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FChallengeSkinUIData _skinData;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UChallengesMenuChallengeSetWidget> ChallengeSetWidgetClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreTimerFlagWidget* TimerFlag;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FBackButtonClickedDelegate _backButtonClickedDelegate;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FSettingsButtonClickedDelegate _settingsButtonClickedDelegate;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FChallengesMenuTabSelectedDelegate _tabSelectedDelegate;

protected:
	UFUNCTION(BlueprintCallable)
	void OnSettingsButtonClicked();

public:
	UFUNCTION(BlueprintCallable)
	void OnMenuTabSelected(UCoreSelectableButtonWidget* selectedButton);

protected:
	UFUNCTION(BlueprintCallable)
	void OnBackButtonClicked();

	UFUNCTION(BlueprintPure)
	FChallengeSkinUIData GetSkinData() const;

public:
	UCoreChallengesMenuWidget();
};

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