using System;
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Enums.Services.Scenes;
using UnityEngine.SceneManagement;

namespace Darkmatter.Core.Contracts.Services.Scenes
{
    public interface ISceneService
    {
        UniTask LoadSceneAsync(GameScene scene, IProgress<float> progress, CancellationToken cancellationToken);
        UniTask UnloadSceneAsync(GameScene scene, IProgress<float> progress, CancellationToken cancellationToken);

        UniTask LoadSceneAsync(
            string sceneKey,
            IProgress<float> progress,
            CancellationToken cancellationToken,
            bool setActiveScene = true);

        UniTask UnloadSceneAsync(
            string sceneKey,
            IProgress<float> progress,
            CancellationToken cancellationToken);

        bool TryGetLoadedScene(string sceneKey, out Scene scene);
    }
}
