Option Strict On
Option Explicit On

Namespace Nexamas.UI.Controls

    ''' <summary>
    ''' Friend-only readiness evidence for MASWizard. It proves the wizard is a guided
    ''' MAS child-content container composed with MASStepper and not a public page model,
    ''' workflow engine, action/cancel service, validation owner, or native host wrapper.
    ''' </summary>
    Friend NotInheritable Class MASWizardReadinessManifest
        Private Sub New(status As MASWizardReadinessStatus,
                        composesOfficialStepper As Boolean,
                        hasFocusScopeBoundary As Boolean,
                        publicWizardPageAbsent As Boolean,
                        workflowServiceAbsent As Boolean,
                        actionOrValidationOwnerAbsent As Boolean)
            Me.Status = status
            Me.ComposesOfficialStepper = composesOfficialStepper
            Me.HasFocusScopeBoundary = hasFocusScopeBoundary
            Me.PublicWizardPageAbsent = publicWizardPageAbsent
            Me.WorkflowServiceAbsent = workflowServiceAbsent
            Me.ActionOrValidationOwnerAbsent = actionOrValidationOwnerAbsent
        End Sub

        Friend ReadOnly Property Status As MASWizardReadinessStatus
        Friend ReadOnly Property ComposesOfficialStepper As Boolean
        Friend ReadOnly Property HasFocusScopeBoundary As Boolean
        Friend ReadOnly Property PublicWizardPageAbsent As Boolean
        Friend ReadOnly Property WorkflowServiceAbsent As Boolean
        Friend ReadOnly Property ActionOrValidationOwnerAbsent As Boolean

        Friend ReadOnly Property IsReady As Boolean
            Get
                Return Status = MASWizardReadinessStatus.Ready AndAlso
                       ComposesOfficialStepper AndAlso
                       HasFocusScopeBoundary AndAlso
                       PublicWizardPageAbsent AndAlso
                       WorkflowServiceAbsent AndAlso
                       ActionOrValidationOwnerAbsent
            End Get
        End Property

        Friend Shared Function CreateCurrent() As MASWizardReadinessManifest
            Return New MASWizardReadinessManifest(
                MASWizardReadinessStatus.Ready,
                composesOfficialStepper:=MASWizardFlowPolicy.ComposesOfficialStepper,
                hasFocusScopeBoundary:=MASWizardFlowPolicy.HasFocusScopeBoundary,
                publicWizardPageAbsent:=MASWizardFlowPolicy.HasNoPublicWizardPage,
                workflowServiceAbsent:=MASWizardFlowPolicy.HasNoWorkflowService,
                actionOrValidationOwnerAbsent:=MASWizardFlowPolicy.HasNoActionOrValidationOwner)
        End Function
    End Class

End Namespace
