Option Strict On
Option Explicit On

Namespace Nexamas.UI.Controls.Governance

    Friend NotInheritable Class MASTitleReadinessManifest
        Friend Sub New(hasTitleTypographyPolicy As Boolean,
                       hasSeparatorPolicy As Boolean,
                       hasRtlShapedTextRoute As Boolean,
                       hasThemeHierarchyRoute As Boolean,
                       hasNoPublicApiLeak As Boolean)
            Me.HasTitleTypographyPolicy = hasTitleTypographyPolicy
            Me.HasSeparatorPolicy = hasSeparatorPolicy
            Me.HasRtlShapedTextRoute = hasRtlShapedTextRoute
            Me.HasThemeHierarchyRoute = hasThemeHierarchyRoute
            Me.HasNoPublicApiLeak = hasNoPublicApiLeak
        End Sub

        Friend ReadOnly Property HasTitleTypographyPolicy As Boolean
        Friend ReadOnly Property HasSeparatorPolicy As Boolean
        Friend ReadOnly Property HasRtlShapedTextRoute As Boolean
        Friend ReadOnly Property HasThemeHierarchyRoute As Boolean
        Friend ReadOnly Property HasNoPublicApiLeak As Boolean

        Friend ReadOnly Property Status As MASTitleReadinessStatus
            Get
                If Not HasTitleTypographyPolicy Then Return MASTitleReadinessStatus.BlockedByMissingTitleTypographyPolicy
                If Not HasSeparatorPolicy Then Return MASTitleReadinessStatus.BlockedByMissingSeparatorPolicy
                If Not HasRtlShapedTextRoute Then Return MASTitleReadinessStatus.BlockedByMissingRtlShapedTextRoute
                If Not HasThemeHierarchyRoute Then Return MASTitleReadinessStatus.BlockedByMissingThemeHierarchyRoute
                If Not HasNoPublicApiLeak Then Return MASTitleReadinessStatus.BlockedByPublicApiLeak
                Return MASTitleReadinessStatus.Ready
            End Get
        End Property

        Friend ReadOnly Property IsReady As Boolean
            Get
                Return Status = MASTitleReadinessStatus.Ready
            End Get
        End Property

        Friend Shared Function CreateCurrent() As MASTitleReadinessManifest
            Return New MASTitleReadinessManifest(
                hasTitleTypographyPolicy:=True,
                hasSeparatorPolicy:=True,
                hasRtlShapedTextRoute:=True,
                hasThemeHierarchyRoute:=True,
                hasNoPublicApiLeak:=True)
        End Function
    End Class

End Namespace
