using UnityEngine;
using UnityEngine.SceneManagement;

namespace EventsAppQuest.Core
{
    /// <summary>
    /// Carregamento e transicao entre cenas.
    /// </summary>
    public class SceneRouter
    {
        /// <summary>Carrega uma cena pelo nome.</summary>
        public void LoadScene(string sceneName)
        {
            if (string.IsNullOrEmpty(sceneName))
            {
                Debug.LogWarning("[SceneRouter] Scene name is null or empty.");
                return;
            }
            SceneManager.LoadScene(sceneName);
        }

        /// <summary>Carrega a cena principal definida em AppConfig.</summary>
        public void LoadMainScene(AppConfig config)
        {
            if (config == null)
            {
                Debug.LogWarning("[SceneRouter] AppConfig is null.");
                return;
            }
            LoadScene(config.MainSceneName);
        }

        /// <summary>Nome da cena de apresentação no Quest (modo headset).</summary>
        public const string QuestPresentationSceneName = "QuestPresentation";

        /// <summary>Carrega a cena de apresentação Quest (modo headset).</summary>
        public void LoadQuestPresentationScene()
        {
            LoadScene(QuestPresentationSceneName);
        }
    }
}
