Option Strict On
Option Explicit On

Imports System
Imports Nexamas.UI.Application

Namespace Nexamas.UI.Presentation

    ''' <summary>
    ''' Public Nexamas UI gateway for product-style presentation pages. It owns the
    ''' shared title/divider, description, body, and footer-action page recipe while
    ''' preserving existing MAS controls and MASApplication layout as the only layout engine.
    ''' </summary>
    Friend NotInheritable Class MASPresentationPage
        Private Sub New()
        End Sub

        ''' <summary>
        ''' Begins an official presentation page by applying the MASApplication page preset
        ''' and returning a constrained recipe builder for header/body/footer layout.
        ''' </summary>
        Friend Shared Function Begin(page As MASApplicationLayoutPageBuilder,
                                     kind As MASApplicationPageLayoutKind,
                                     shell As MASApplicationWindowShell) As MASPresentationPageBuilder
            If page Is Nothing Then Throw New ArgumentNullException(NameOf(page))
            If shell Is Nothing Then Throw New ArgumentNullException(NameOf(shell))

            page.ApplicationPage(kind, shell)
            Return New MASPresentationPageBuilder(page)
        End Function

        ''' <summary>
        ''' Internal MAS-owned entry point for pages whose Application host has already
        ''' applied a specialized page profile. This keeps Application-owned surfaces on
        ''' the Presentation header/body/footer grammar without forcing them through the
        ''' public standard TopBar preset.
        ''' </summary>
        Friend Shared Function BeginPreconfigured(page As MASApplicationLayoutPageBuilder) As MASPresentationPageBuilder
            If page Is Nothing Then Throw New ArgumentNullException(NameOf(page))
            Return New MASPresentationPageBuilder(page)
        End Function

        ''' <summary>
        ''' Evaluates whether the Presentation Page system is available as an official
        ''' Nexamas UI gateway. The report exposes product facts only.
        ''' </summary>
        Friend Shared Function EvaluateReadiness() As MASPresentationReadinessReport
            Return MASPresentationReadinessGate.Evaluate()
        End Function
    End Class

End Namespace
