#pragma once

#include "CoreMinimal.h"
#include "ZeusRealmEntry.generated.h"

/**
 * Entrada de Realm (cluster Gateway+Provinces) recebida do CharServer via
 * S_REALM_LIST. Espelha `RealmRecord` em
 * `Server/ZeusCharServer/src/types/realm.types.ts`.
 *
 * `GatewayEndpoint` e' o endereco "host:port" do Gateway do Realm (UMA
 * single string vinda do server — substitui o par host+port da versao
 * anterior). Cliente faz split por `:` quando precisa abrir UDP.
 *
 * State usa o wire raw (0=Offline, 1=Online, 2=Maintenance — ver
 * ZeusWireRealmState em CharServerOpcodes.h).
 */
USTRUCT(BlueprintType)
struct FZeusRealmEntry
{
	GENERATED_BODY()

	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	FString RealmId;

	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	FString Name;

	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	FString Region;

	/** Endpoint do Gateway no formato "host:port" (ex: "127.0.0.1:7777"). */
	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	FString GatewayEndpoint;

	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	int32 Capacity = 0;

	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	int32 Pop = 0;

	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	int32 QueueLen = 0;

	/** 0=Offline, 1=Online, 2=Maintenance (vide ZeusWireRealmState). */
	UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm")
	uint8 State = 0;
};
