using Microsoft.Extensions.Hosting;
namespace LanMountainDesktop.AirAppSdk;
///
/// Provides runtime context and services for an AirApp.
///
public interface IAirAppRuntimeContext
{
///
/// Gets the unique identifier of this AirApp.
///
string AirAppId { get; }
///
/// Gets the display name of this AirApp.
///
string AirAppName { get; }
///
/// Gets the AirApp version.
///
string AirAppVersion { get; }
///
/// Gets the data directory for this AirApp.
/// Use this directory to store persistent user data.
///
string DataDirectory { get; }
///
/// Gets the cache directory for this AirApp.
/// Use this directory to store temporary cached data.
///
string CacheDirectory { get; }
///
/// Gets the service provider for dependency injection.
///
IServiceProvider Services { get; }
///
/// Gets the host application lifetime manager.
///
IHostApplicationLifetime Lifetime { get; }
///
/// Gets the message bus for inter-AirApp communication.
///
IAirAppMessageBus MessageBus { get; }
///
/// Gets the appearance context for theme and styling.
///
IAirAppAppearanceContext Appearance { get; }
///
/// Gets the logger for this AirApp.
///
IAirAppLogger Logger { get; }
///
/// Opens a window defined by this AirApp.
///
/// Window identifier
/// The opened window instance
Task OpenWindowAsync(string windowId);
///
/// Closes a window by its identifier.
///
/// Window identifier
void CloseWindow(string windowId);
///
/// Register a desktop component (internal use by AirAppBase).
///
void RegisterComponent(AirAppComponentOptions options);
///
/// Register a window (internal use by AirAppBase).
///
void RegisterWindow(string id, string name, Type windowType);
///
/// Register a service (internal use by AirAppBase).
///
void RegisterService()
where TService : class
where TImplementation : class, TService;
}