#nullable enable
using System.Threading;
using System.Threading.Tasks;

namespace IGP.UnitySDK.Abstractions
{
    /// <summary>
    /// Capability-neutral desktop command channel used by optional packages.
    /// </summary>
    public interface IIGPDesktopCommandGateway
    {
        bool IsAttached { get; }
        int AttachedAppId { get; }

        bool SupportsCapability(int capabilityFieldNumber);

        Task<IGPDesktopSessionCommandResult> SendAsync(
            int commandType,
            int capabilityFieldNumber = 0,
            string? contentJson = null,
            byte[]? contentBytes = null,
            CancellationToken cancellationToken = default);
    }

    internal interface IIGPDesktopNotificationSource
    {
        event System.Action<IGPDesktopSessionCommandResult>? NotificationReceived;
    }
}
