namespace AVSCartonShipmentVerifier.Configuration;
public sealed class DesktopHostOptions
{
public const string SectionName = "DesktopHost";
///
/// When true (default on Windows), opens the default browser after the server starts.
///
public bool LaunchBrowser { get; init; } = true;
///
/// Optional URL to open. If empty, the first bound HTTP address from Kestrel is used.
///
public string? BrowserUrl { get; init; }
///
/// When true (default for published desktop exe), stops the host when the launched browser window closes.
///
public bool ExitWhenBrowserCloses { get; init; } = true;
///
/// Seconds to wait after the page unloads before shutdown (allows cancel on reload).
///
public int BrowserShutdownDelaySeconds { get; init; } = 2;
///
/// Prefer Edge/Chrome app-mode window (trackable process) on Windows before the default browser.
///
public bool PreferAppModeBrowser { get; init; } = true;
///
/// Dedicated Edge/Chrome profile directory so app-mode uses a trackable browser process.
///
public string BrowserUserDataDir { get; init; } =
@"C:\Users\Public\AVSCartonShipmentVerifier\browser-profile";
///
/// If the tracked browser process exits sooner than this, treat it as a launcher handoff (do not stop the app).
///
public int MinimumBrowserProcessLifetimeSeconds { get; init; } = 5;
}