#pragma once

#include "CoreMinimal.h"
#include "ChallengesMenuRitualsViewInterface.h"
#include "CoreTabContentWidget.h"
#include "Templates/SubclassOf.h"
#include "ChallengeSetMenuViewData.h"
#include "UObject/ScriptInterface.h"
#include "ChallengesMenuRitualsWidget.generated.h"

class UCoreChallengeCardWidget;
class UCoreChallengeDetailsWidget;
class UVerticalBox;
class UCoreSelectableButtonWidget;
class UDBDRichTextBlock;
class ISearchBarViewInterface;
class UCoreSearchBarWidget;
class UCoreIconToggleWidget;
class UCoreChallengeFilterWidget;
class UCoreButtonWidget;

UCLASS(Blueprintable, EditInlineNew)
class DBDUIVIEWSCORE_API UChallengesMenuRitualsWidget : public UCoreTabContentWidget, public IChallengesMenuRitualsViewInterface
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, NoClear)
	TSubclassOf<UCoreChallengeCardWidget> ChallengeCardWidgetClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreChallengeDetailsWidget* ChallengeDetailsWidget;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UVerticalBox* ChallengeCardsVerticalBox;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Export)
	TArray<UCoreChallengeCardWidget*> _challengeCards;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreSelectableButtonWidget* _currentSelectedButton;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UDBDRichTextBlock* AdditionalDescriptionText;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FChallengeSetMenuViewData _challengeSetData;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TScriptInterface<ISearchBarViewInterface> _searchBar;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreSearchBarWidget* SearchBar;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreIconToggleWidget* FiltersButton;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidgetOptional))
	UCoreChallengeFilterWidget* FiltersWidget;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 _sortingOptions;

protected:
	UFUNCTION(BlueprintCallable)
	void UpdateView();

	UFUNCTION(BlueprintCallable)
	void OnSortingChanged();

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

	UFUNCTION(BlueprintCallable)
	void OnButtonSelectedChanged(UCoreSelectableButtonWidget* targetButton, bool isSelected);

public:
	UChallengesMenuRitualsWidget();
};

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