using Newtonsoft.Json;
using System;
namespace ElectronNET.API.Entities
{
public class NotificationOptions
{
///
/// A title for the notification, which will be shown at the top of the notification
/// window when it is shown
///
public string Title { get; set; }
///
/// The body text of the notification, which will be displayed below the title or
/// subtitle
///
public string Body { get; set; }
///
/// A subtitle for the notification, which will be displayed below the title.
///
public string Subtitle { get; set; }
///
/// Whether or not to emit an OS notification noise when showing the notification
///
public bool Silent { get; set; }
///
/// An icon to use in the notification
///
public string Icon { get; set; }
///
/// Whether or not to add an inline reply option to the notification.
///
public bool HasReply { get; set; }
///
/// The placeholder to write in the inline reply input field.
///
public string ReplyPlaceholder { get; set; }
///
/// The name of the sound file to play when the notification is shown.
///
public string Sound { get; set; }
///
/// Actions to add to the notification. Please read the available actions and
/// limitations in the NotificationAction documentation
///
public NotificationAction Actions { get; set; }
///
/// Emitted when the notification is shown to the user,
/// note this could be fired multiple times as a notification
/// can be shown multiple times through the Show() method.
///
[JsonIgnore]
public Action OnShow { get; set; }
[JsonProperty]
internal string ShowID { get; set; }
///
/// Emitted when the notification is clicked by the user.
///
[JsonIgnore]
public Action OnClick { get; set; }
[JsonProperty]
internal string ClickID { get; set; }
///
/// Emitted when the notification is closed by manual intervention from the user.
///
/// This event is not guarunteed to be emitted in all cases where the notification is closed.
///
[JsonIgnore]
public Action OnClose { get; set; }
[JsonProperty]
internal string CloseID { get; set; }
///
/// macOS only: Emitted when the user clicks the “Reply” button on a notification with hasReply: true.
///
/// The string the user entered into the inline reply field
///
[JsonIgnore]
public Action OnReply { get; set; }
[JsonProperty]
internal string ReplyID { get; set; }
///
/// macOS only - The index of the action that was activated
///
[JsonIgnore]
public Action OnAction { get; set; }
[JsonProperty]
internal string ActionID { get; set; }
public NotificationOptions(string title, string body)
{
Title = title;
Body = body;
}
}
}