using System.Runtime.Versioning;
namespace ElectronNET.API.Entities
{
///
/// Return object for app.getLoginItemSettings() on macOS and Windows.
///
/// Up-to-date with Electron API 39.2
public class LoginItemSettings
{
///
/// if the app is set to open at login.
///
public bool OpenAtLogin { get; set; }
///
/// if the app is set to open as hidden at login. Deprecated on macOS 13 and up; not available
/// on MAS builds.
///
[SupportedOSPlatform("macos")]
public bool OpenAsHidden { get; set; }
///
/// if the app was opened at login automatically. This setting is not available
/// on MAS builds.
///
[SupportedOSPlatform("macos")]
public bool WasOpenedAtLogin { get; set; }
///
/// if the app was opened as a hidden login item. This indicates that the app should not
/// open any windows at startup. Deprecated on macOS 13 and up; not available on
/// MAS builds.
///
[SupportedOSPlatform("macos")]
public bool WasOpenedAsHidden { get; set; }
///
/// if the app was opened as a login item that should restore the state from the previous
/// session. This indicates that the app should restore the windows that were open the last time the app was closed.
/// Deprecated on macOS 13 and up; not available on MAS builds.
///
[SupportedOSPlatform("macos")]
public bool RestoreState { get; set; }
///
/// macOS status: one of not-registered, enabled, requires-approval, or not-found.
///
[SupportedOSPlatform("macos")]
public string Status { get; set; }
///
/// Windows: true if app is set to open at login and its run key is not deactivated.
/// Differs from OpenAtLogin as it ignores the args option; this is true if the given executable would be launched at login with any arguments.
///
[SupportedOSPlatform("windows")]
public bool ExecutableWillLaunchAtLogin { get; set; }
///
/// Windows launch entries found in registry.
///
[SupportedOSPlatform("windows")]
public LoginItemLaunchItem[] LaunchItems { get; set; }
}
}