// Project Lab - NHTV Igad

#pragma once

#include "MenuScreen.h"
#include "MapSelectionScreen.generated.h"

UCLASS()
class UNREALPROJECT_API UMapSelectionScreen : public USideView
{
	GENERATED_BODY()

public:
	UMapSelectionScreen(const FObjectInitializer& init);
	virtual void NativeConstruct() override;

	UFUNCTION()
	void OnSelectionChanged(UMenuItemBase* item);

	UFUNCTION(BlueprintCallable, Category = "Level")
	void SelectMap(int32 mapIndex);
	UFUNCTION(BlueprintCallable, Category = "Level")
	void CreateGame();

	// Currently Selected map data
	UPROPERTY(BlueprintReadOnly, Category = "Level")
	class UMapData* mapData;
	UPROPERTY()
	class UMapSlot* selectedMapSlot;

private:
	UPROPERTY()
	class UOverlayInfo* m_sessionCreateOverlay;

	UFUNCTION()
	void m_OnCreateSessionCompleted(bool success);

	UPROPERTY()
	TArray<class UMapSlot*> m_mapSlots;
};
