Option Strict On
Option Explicit On

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Friend-only readiness evidence for MASTopBarComponent. It proves app chrome,
    ''' menu float routing, window-command mapping, native-window adapter boundaries, and
    ''' render-cache ownership remain internal without opening a public chrome renderer.
    ''' </summary>
    Friend NotInheritable Class MASTopBarReadinessManifest
        Private Sub New(status As MASTopBarReadinessStatus,
                        hasChromePolicy As Boolean,
                        hasDropDownMenuFloatRoute As Boolean,
                        hasNativeChromeBoundary As Boolean,
                        hasWindowCommandPolicy As Boolean,
                        hasStaticRenderCacheBoundary As Boolean,
                        publicChromeRendererAbsent As Boolean)
            Me.Status = status
            Me.HasChromePolicy = hasChromePolicy
            Me.HasDropDownMenuFloatRoute = hasDropDownMenuFloatRoute
            Me.HasNativeChromeBoundary = hasNativeChromeBoundary
            Me.HasWindowCommandPolicy = hasWindowCommandPolicy
            Me.HasStaticRenderCacheBoundary = hasStaticRenderCacheBoundary
            Me.PublicChromeRendererAbsent = publicChromeRendererAbsent
        End Sub

        Friend ReadOnly Property Status As MASTopBarReadinessStatus
        Friend ReadOnly Property HasChromePolicy As Boolean
        Friend ReadOnly Property HasDropDownMenuFloatRoute As Boolean
        Friend ReadOnly Property HasNativeChromeBoundary As Boolean
        Friend ReadOnly Property HasWindowCommandPolicy As Boolean
        Friend ReadOnly Property HasStaticRenderCacheBoundary As Boolean
        Friend ReadOnly Property PublicChromeRendererAbsent As Boolean

        Friend ReadOnly Property IsReady As Boolean
            Get
                Return Status = MASTopBarReadinessStatus.Ready AndAlso
                       HasChromePolicy AndAlso
                       HasDropDownMenuFloatRoute AndAlso
                       HasNativeChromeBoundary AndAlso
                       HasWindowCommandPolicy AndAlso
                       HasStaticRenderCacheBoundary AndAlso
                       PublicChromeRendererAbsent
            End Get
        End Property

        Friend Shared Function CreateCurrent() As MASTopBarReadinessManifest
            Return New MASTopBarReadinessManifest(
                MASTopBarReadinessStatus.Ready,
                hasChromePolicy:=True,
                hasDropDownMenuFloatRoute:=MASTopBarChromePolicy.HasDropDownMenuFloatRoute,
                hasNativeChromeBoundary:=MASTopBarChromePolicy.HasNativeChromeBoundary,
                hasWindowCommandPolicy:=MASTopBarChromePolicy.HasWindowCommandPolicy,
                hasStaticRenderCacheBoundary:=MASTopBarChromePolicy.HasStaticRenderCacheBoundary,
                publicChromeRendererAbsent:=MASTopBarChromePolicy.HasNoPublicChromeRenderer)
        End Function
    End Class

End Namespace
