//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.Web.Shared.Components.Toast;
using System;
///
/// Represents a single toast message shown in the .
///
public sealed class ToastInstance
{
///
/// Initializes a new instance of the class.
///
/// The level.
/// The message.
/// The optional heading.
internal ToastInstance(ToastLevel level, string message, string? heading)
{
this.Key = Guid.NewGuid();
this.Level = level;
this.Message = message;
this.Heading = heading;
}
///
/// Gets a stable key identifying this toast, used as a render key.
///
public Guid Key { get; }
///
/// Gets the level.
///
public ToastLevel Level { get; }
///
/// Gets the message.
///
public string Message { get; }
///
/// Gets the optional heading.
///
public string? Heading { get; }
///
/// Gets or sets a value indicating whether the toast is performing its closing animation.
///
internal bool IsClosing { get; set; }
}