#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "Templates/SubclassOf.h"
#include "UI/FrontEndTypes.h"
#include "UIFrontEndScreenSet.generated.h"

class UCommonActivatableWidget;
class UUIPrimaryGameLayout_Base;

/**
 * Mapa data-driven estado → tela. Desacopla o UUIFrontEndFlowSubsystem das
 * classes concretas: as telas (WBP) ainda não existem — serão geradas pelo
 * Zeus UMG Forge, refinadas e registradas aqui depois (ARQUITETURA.md §4.8).
 * Enquanto o registro estiver vazio, o flow faz no-op + log.
 *
 * Asset concreto: DA_FrontEndScreenSet em Content/ZMMO/UI/FrontEnd/.
 */
UCLASS(BlueprintType)
class ZMMO_API UUIFrontEndScreenSet : public UDataAsset
{
	GENERATED_BODY()

public:
	/** WBP de layout raiz (herda UUIPrimaryGameLayout_Base). */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "FrontEnd")
	TSoftClassPtr<UUIPrimaryGameLayout_Base> RootLayoutClass;

	/** Tela por estado de topo do fluxo. */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "FrontEnd")
	TMap<EZMMOFrontEndState, TSoftClassPtr<UCommonActivatableWidget>> StateScreens;

	/** Páginas internas do Lobby (host = a tela de Lobby; "switch principal"). */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "FrontEnd")
	TMap<EZMMOLobbyPage, TSoftClassPtr<UCommonActivatableWidget>> LobbyPages;

	/** Soft class da tela do estado (vazio se não configurado). */
	UFUNCTION(BlueprintCallable, Category = "FrontEnd")
	TSoftClassPtr<UCommonActivatableWidget> GetScreenForState(EZMMOFrontEndState State) const;

	/** Soft class da página de Lobby (vazio se não configurado). */
	UFUNCTION(BlueprintCallable, Category = "FrontEnd")
	TSoftClassPtr<UCommonActivatableWidget> GetLobbyPage(EZMMOLobbyPage Page) const;
};
