Option Strict On
Option Explicit On

Namespace Nexamas.UI.Application

    ''' <summary>
    ''' Public SDK result for showing a toast and ensuring the toast host surface is available.
    ''' </summary>
    Friend NotInheritable Class MASApplicationToastShowResult

        Friend Sub New(toastId As Integer,
                       surface As MASApplicationSurfaceShowResult)
            Me.ToastId = toastId
            Me.Surface = If(surface, MASApplicationSurfaceShowResult.Rejected("Toast surface show did not return a result."))
        End Sub

        Friend ReadOnly Property ToastId As Integer

        Friend ReadOnly Property Surface As MASApplicationSurfaceShowResult

        Friend ReadOnly Property IsAccepted As Boolean
            Get
                Return Surface IsNot Nothing AndAlso Surface.IsAccepted
            End Get
        End Property

    End Class

End Namespace
