Option Strict On
Option Explicit On

Namespace Nexamas.UI.Controls.Governance

    Friend NotInheritable Class MASLabelReadinessManifest
        Friend Sub New(hasTypographyPolicy As Boolean,
                       hasThemeTextRoleRoute As Boolean,
                       hasWrappedTextPolicy As Boolean,
                       hasRtlAlignmentPolicy As Boolean,
                       hasNoAdHocTextMeasurement As Boolean,
                       hasNoPublicApiLeak As Boolean)
            Me.HasTypographyPolicy = hasTypographyPolicy
            Me.HasThemeTextRoleRoute = hasThemeTextRoleRoute
            Me.HasWrappedTextPolicy = hasWrappedTextPolicy
            Me.HasRtlAlignmentPolicy = hasRtlAlignmentPolicy
            Me.HasNoAdHocTextMeasurement = hasNoAdHocTextMeasurement
            Me.HasNoPublicApiLeak = hasNoPublicApiLeak
        End Sub

        Friend ReadOnly Property HasTypographyPolicy As Boolean
        Friend ReadOnly Property HasThemeTextRoleRoute As Boolean
        Friend ReadOnly Property HasWrappedTextPolicy As Boolean
        Friend ReadOnly Property HasRtlAlignmentPolicy As Boolean
        Friend ReadOnly Property HasNoAdHocTextMeasurement As Boolean
        Friend ReadOnly Property HasNoPublicApiLeak As Boolean

        Friend ReadOnly Property Status As MASLabelReadinessStatus
            Get
                If Not HasTypographyPolicy Then Return MASLabelReadinessStatus.BlockedByMissingTypographyPolicy
                If Not HasThemeTextRoleRoute Then Return MASLabelReadinessStatus.BlockedByMissingThemeTextRoleRoute
                If Not HasWrappedTextPolicy Then Return MASLabelReadinessStatus.BlockedByMissingWrappedTextPolicy
                If Not HasRtlAlignmentPolicy Then Return MASLabelReadinessStatus.BlockedByMissingRtlAlignmentPolicy
                If Not HasNoAdHocTextMeasurement Then Return MASLabelReadinessStatus.BlockedByAdHocTextMeasurement
                If Not HasNoPublicApiLeak Then Return MASLabelReadinessStatus.BlockedByPublicApiLeak
                Return MASLabelReadinessStatus.Ready
            End Get
        End Property

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

        Friend Shared Function CreateCurrent() As MASLabelReadinessManifest
            Return New MASLabelReadinessManifest(
                hasTypographyPolicy:=True,
                hasThemeTextRoleRoute:=True,
                hasWrappedTextPolicy:=True,
                hasRtlAlignmentPolicy:=True,
                hasNoAdHocTextMeasurement:=True,
                hasNoPublicApiLeak:=True)
        End Function
    End Class

End Namespace
