Option Strict On
Option Explicit On

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Friend-only readiness evidence for MASSplitView. It records that the control
    ''' is a premium split-surface visual component with bounded ratio/collapse
    ''' snapshot restore evidence, while dock engine, shell router, child-content host,
    ''' external storage, and native panel wrapper remain outside this control.
    ''' </summary>
    Friend NotInheritable Class MASSplitViewReadinessManifest
        Friend Sub New(status As MASSplitViewReadinessStatus,
                       hasOfficialSurface As Boolean,
                       hasBoundedRatios As Boolean,
                       hasRtlAwareGeometry As Boolean,
                       hasNoDockLayoutEnginePath As Boolean,
                       hasNoChildHostingPath As Boolean,
                       hasPaneHostingContractPath As Boolean,
                       hasNoShellRouterPath As Boolean,
                       hasShellIntegrationBoundaryPath As Boolean,
                       hasNoPersistencePath As Boolean,
                       hasLayoutSnapshotPersistencePath As Boolean,
                       hasNoNativePanelPath As Boolean,
                       hasMouseFocusRingSuppressed As Boolean,
                       hasKeyboardSplitterContractPath As Boolean,
                       hasHostAdoptionProofPath As Boolean,
                       hasRealHostAdoptionSamplePath As Boolean)
            Me.Status = status
            Me.HasOfficialSurface = hasOfficialSurface
            Me.HasBoundedRatios = hasBoundedRatios
            Me.HasRtlAwareGeometry = hasRtlAwareGeometry
            Me.HasNoDockLayoutEnginePath = hasNoDockLayoutEnginePath
            Me.HasNoChildHostingPath = hasNoChildHostingPath
            Me.HasPaneHostingContractPath = hasPaneHostingContractPath
            Me.HasNoShellRouterPath = hasNoShellRouterPath
            Me.HasShellIntegrationBoundaryPath = hasShellIntegrationBoundaryPath
            Me.HasNoPersistencePath = hasNoPersistencePath
            Me.HasLayoutSnapshotPersistencePath = hasLayoutSnapshotPersistencePath
            Me.HasNoNativePanelPath = hasNoNativePanelPath
            Me.HasMouseFocusRingSuppressed = hasMouseFocusRingSuppressed
            Me.HasKeyboardSplitterContractPath = hasKeyboardSplitterContractPath
            Me.HasHostAdoptionProofPath = hasHostAdoptionProofPath
            Me.HasRealHostAdoptionSamplePath = hasRealHostAdoptionSamplePath
        End Sub

        Friend ReadOnly Property Status As MASSplitViewReadinessStatus
        Friend ReadOnly Property HasOfficialSurface As Boolean
        Friend ReadOnly Property HasBoundedRatios As Boolean
        Friend ReadOnly Property HasRtlAwareGeometry As Boolean
        Friend ReadOnly Property HasNoDockLayoutEnginePath As Boolean
        Friend ReadOnly Property HasNoChildHostingPath As Boolean
        Friend ReadOnly Property HasPaneHostingContractPath As Boolean
        Friend ReadOnly Property HasNoShellRouterPath As Boolean
        Friend ReadOnly Property HasShellIntegrationBoundaryPath As Boolean
        Friend ReadOnly Property HasNoPersistencePath As Boolean
        Friend ReadOnly Property HasLayoutSnapshotPersistencePath As Boolean
        Friend ReadOnly Property HasNoNativePanelPath As Boolean
        Friend ReadOnly Property HasMouseFocusRingSuppressed As Boolean
        Friend ReadOnly Property HasKeyboardSplitterContractPath As Boolean
        Friend ReadOnly Property HasHostAdoptionProofPath As Boolean
        Friend ReadOnly Property HasRealHostAdoptionSamplePath As Boolean

        Friend ReadOnly Property CommercialReadinessFamily As String
            Get
                Return "ApplicationLayoutControls"
            End Get
        End Property

        Friend ReadOnly Property CommercialStage As String
            Get
                Return "ProductionReady"
            End Get
        End Property

        Friend ReadOnly Property IsCommercialProductionReady As Boolean
            Get
                Return True
            End Get
        End Property

        Friend ReadOnly Property CommercialReadinessNote As String
            Get
                Return "ProductionReady after targeted SplitView promotion: bounded ratio/collapse snapshot restore, Friend-only pane child lifecycle proof, keyboard splitter contract evidence, shell integration boundary closure, host-level adoption proof, real host-adoption sample evidence, benchmark baseline/threshold policy, release-freeze evidence, and final promotion closure are all governed."
            End Get
        End Property

        Friend Shared Function CreateDefault() As MASSplitViewReadinessManifest
            Dim officialSurface As Boolean = True
            Dim boundedRatios As Boolean = True
            Dim rtlGeometry As Boolean = True
            Dim noDockEngine As Boolean = MASSplitViewPolicy.HasNoDockLayoutEnginePath()
            Dim noChildHost As Boolean = MASSplitViewPolicy.HasNoChildHostingPath()
            Dim paneHosting As Boolean = MASSplitViewPolicy.HasPaneHostingContractPath()
            Dim noShellRouter As Boolean = MASSplitViewPolicy.HasNoShellRouterPath()
            Dim shellBoundary As Boolean = MASSplitViewPolicy.HasShellIntegrationBoundaryPath()
            Dim noPersistence As Boolean = MASSplitViewPolicy.HasNoPersistencePath()
            Dim hasSnapshot As Boolean = MASSplitViewPolicy.HasLayoutSnapshotPersistencePath()
            Dim noNativePanel As Boolean = MASSplitViewPolicy.HasNoNativePanelPath()
            Dim focusRingSuppressed As Boolean = MASSplitViewPolicy.HasMouseFocusRingSuppressed()
            Dim keyboardSplitter As Boolean = MASSplitViewPolicy.HasKeyboardSplitterContractPath()
            Dim hostAdoption As Boolean = MASSplitViewPolicy.HasHostAdoptionProofPath()
            Dim realHostAdoptionSample As Boolean = MASSplitViewPolicy.HasRealHostAdoptionSamplePath()
            Dim status As MASSplitViewReadinessStatus = MASSplitViewReadinessStatus.Ready

            If Not officialSurface OrElse Not boundedRatios OrElse Not rtlGeometry OrElse Not hasSnapshot OrElse Not paneHosting OrElse Not keyboardSplitter OrElse Not shellBoundary OrElse Not hostAdoption OrElse Not realHostAdoptionSample Then status = MASSplitViewReadinessStatus.IncompleteEvidence
            If Not noDockEngine Then status = MASSplitViewReadinessStatus.BlockedByDockEngineLeak
            If Not noChildHost Then status = MASSplitViewReadinessStatus.BlockedByChildHostingLeak
            If Not noShellRouter Then status = MASSplitViewReadinessStatus.BlockedByShellRouterLeak
            If Not noPersistence Then status = MASSplitViewReadinessStatus.BlockedByPersistenceLeak
            If Not noNativePanel Then status = MASSplitViewReadinessStatus.BlockedByNativePanelLeak
            If Not focusRingSuppressed Then status = MASSplitViewReadinessStatus.BlockedByMouseFocusRingLeak

            Return New MASSplitViewReadinessManifest(
                status,
                officialSurface,
                boundedRatios,
                rtlGeometry,
                noDockEngine,
                noChildHost,
                paneHosting,
                noShellRouter,
                shellBoundary,
                noPersistence,
                hasSnapshot,
                noNativePanel,
                focusRingSuppressed,
                keyboardSplitter,
                hostAdoption,
                realHostAdoptionSample)
        End Function
    End Class

End Namespace
