// Project Lab - NHTV Igad

#pragma once

#include "GUI/Menu/MenuScreen.h"
#include "PlayerSetupState.h"
#include "CharacterSubMenu.generated.h"

/**
 * 
 */
UCLASS()
class UNREALPROJECT_API UCharacterSubMenu : public UMenuPanel
{
	GENERATED_BODY()
	
public:
	UCharacterSubMenu(const FObjectInitializer& init);
	virtual void NativeConstruct() override;
	virtual void NativeDestruct() override;

	UFUNCTION(BlueprintCallable, Category = "Character Sub Menu")
	void UpdateCharacter(int32 charIndex) { m_UpdateCharacter(index); }
	UFUNCTION(BlueprintCallable, Category = "Character Sub Menu")
	void UpdateCurrentCharacter();

	UFUNCTION(BlueprintImplementableEvent, Category = "Character Sub Menu")
	void OnEditCharacter();

	UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Character Sub Menu")
	class UCharacterClassPropertySet* characterClassProperties;

	UFUNCTION(BlueprintCallable, Category = "Character Class")
	FCharacterClassProperty GetCharacterClass(int32 classID) const;

	UFUNCTION(BlueprintCallable, Category = "Character Class")
	TArray<class UAbilityInfo*> GetClassAbilities() const;

	class ACharacterCarousel* GetCarousel() const { return m_carousel; }

private:
	UFUNCTION()
	void m_Next();
	UFUNCTION()
	void m_Prev();
	UFUNCTION()
	void m_New();
	UFUNCTION()
	void m_Delete();
	UFUNCTION()
	void m_Back();
	UFUNCTION()
	void m_Edit();

	void m_UpdateCharacter(int32 index);

	class UMenuButton* m_nextButton;
	class UMenuButton* m_prevButton;
	class UMenuButton* m_newButton;
	class UMenuButton* m_deleteButton;
	class UMenuButton* m_backButton;
	class UMenuButton* m_editButton;

	class ACharacterCarousel* m_carousel;
};
