Option Strict On
Option Explicit On

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Friend-only readiness evidence for MASContentCarousel. It records that this stage
    ''' owns visual carousel composition, same-surface navigation, selection, RTL layout,
    ''' and keyboard/pointer interaction only. Galleries, image loading, slide decks,
    ''' onboarding flows, content providers, auto-rotation clocks, and local/parallel transition
    ''' schedulers remain outside the control; official MASMotionSystem timelines are allowed.
    ''' </summary>
    Friend NotInheritable Class MASContentCarouselReadinessManifest
        Friend Sub New(status As MASContentCarouselReadinessStatus,
                       hasOfficialControlSurface As Boolean,
                       hasNoGalleryOrImageViewerPath As Boolean,
                       hasNoImageLoadingPath As Boolean,
                       hasNoSlideDeckEnginePath As Boolean,
                       hasNoOnboardingFlowPath As Boolean,
                       hasNoContentProviderPath As Boolean,
                       hasNoAutoRotationClockPath As Boolean,
                       hasNoTransitionSchedulerPath As Boolean)
            Me.Status = status
            Me.HasOfficialControlSurface = hasOfficialControlSurface
            Me.HasNoGalleryOrImageViewerPath = hasNoGalleryOrImageViewerPath
            Me.HasNoImageLoadingPath = hasNoImageLoadingPath
            Me.HasNoSlideDeckEnginePath = hasNoSlideDeckEnginePath
            Me.HasNoOnboardingFlowPath = hasNoOnboardingFlowPath
            Me.HasNoContentProviderPath = hasNoContentProviderPath
            Me.HasNoAutoRotationClockPath = hasNoAutoRotationClockPath
            Me.HasNoTransitionSchedulerPath = hasNoTransitionSchedulerPath
        End Sub

        Friend ReadOnly Property Status As MASContentCarouselReadinessStatus
        Friend ReadOnly Property HasOfficialControlSurface As Boolean
        Friend ReadOnly Property HasNoGalleryOrImageViewerPath As Boolean
        Friend ReadOnly Property HasNoImageLoadingPath As Boolean
        Friend ReadOnly Property HasNoSlideDeckEnginePath As Boolean
        Friend ReadOnly Property HasNoOnboardingFlowPath As Boolean
        Friend ReadOnly Property HasNoContentProviderPath As Boolean
        Friend ReadOnly Property HasNoAutoRotationClockPath As Boolean
        Friend ReadOnly Property HasNoTransitionSchedulerPath As Boolean

        Friend Shared Function CreateDefault() As MASContentCarouselReadinessManifest
            Dim officialSurface As Boolean = True
            Dim noGallery As Boolean = MASContentCarouselPolicy.HasNoGalleryOrImageViewerPath()
            Dim noImageLoading As Boolean = MASContentCarouselPolicy.HasNoImageLoadingPath()
            Dim noSlideDeck As Boolean = MASContentCarouselPolicy.HasNoSlideDeckEnginePath()
            Dim noOnboarding As Boolean = MASContentCarouselPolicy.HasNoOnboardingFlowPath()
            Dim noProvider As Boolean = MASContentCarouselPolicy.HasNoContentProviderPath()
            Dim noClock As Boolean = MASContentCarouselPolicy.HasNoAutoRotationClockPath()
            Dim noScheduler As Boolean = MASContentCarouselPolicy.HasNoTransitionSchedulerPath()
            Dim status As MASContentCarouselReadinessStatus = MASContentCarouselReadinessStatus.Ready

            If Not officialSurface Then status = MASContentCarouselReadinessStatus.IncompleteEvidence
            If Not noGallery Then status = MASContentCarouselReadinessStatus.BlockedByGalleryOrImageViewerLeak
            If Not noImageLoading Then status = MASContentCarouselReadinessStatus.BlockedByImageLoadingLeak
            If Not noSlideDeck Then status = MASContentCarouselReadinessStatus.BlockedBySlideDeckEngineLeak
            If Not noOnboarding Then status = MASContentCarouselReadinessStatus.BlockedByOnboardingFlowLeak
            If Not noProvider Then status = MASContentCarouselReadinessStatus.BlockedByContentProviderLeak
            If Not noClock Then status = MASContentCarouselReadinessStatus.BlockedByAutoRotationClockLeak
            If Not noScheduler Then status = MASContentCarouselReadinessStatus.BlockedByTransitionSchedulerLeak

            Return New MASContentCarouselReadinessManifest(
                status:=status,
                hasOfficialControlSurface:=officialSurface,
                hasNoGalleryOrImageViewerPath:=noGallery,
                hasNoImageLoadingPath:=noImageLoading,
                hasNoSlideDeckEnginePath:=noSlideDeck,
                hasNoOnboardingFlowPath:=noOnboarding,
                hasNoContentProviderPath:=noProvider,
                hasNoAutoRotationClockPath:=noClock,
                hasNoTransitionSchedulerPath:=noScheduler)
        End Function
    End Class

End Namespace
