Option Strict On
Option Explicit On

Imports System.Collections.Generic
Imports System.Linq

Namespace Nexamas.UI.Motion

    ''' <summary>
    ''' Public readiness report for MASMotionSystem. It is safe for harnesses and future diagnostics without exposing internals.
    ''' </summary>
    Friend NotInheritable Class MASMotionReadinessReport

        Friend Sub New(tokenCount As Integer,
                       consumerCount As Integer,
                       findings As IReadOnlyList(Of MASMotionReadinessFinding),
                       Optional runtimeProvenConsumerCount As Integer = 0,
                       Optional declaredOnlyConsumerCount As Integer = 0,
                       Optional timelineRunnerConsumerCount As Integer = 0,
                       Optional frameConsumerCount As Integer = 0,
                       Optional floatRuntimeInheritedConsumerCount As Integer = 0)
            Me.TokenCount = tokenCount
            Me.ConsumerCount = consumerCount
            Me.RuntimeProvenConsumerCount = runtimeProvenConsumerCount
            Me.DeclaredOnlyConsumerCount = declaredOnlyConsumerCount
            Me.TimelineRunnerConsumerCount = timelineRunnerConsumerCount
            Me.FrameConsumerCount = frameConsumerCount
            Me.FloatRuntimeInheritedConsumerCount = floatRuntimeInheritedConsumerCount
            Me.Findings = If(findings IsNot Nothing, findings, CType(New List(Of MASMotionReadinessFinding)(), IReadOnlyList(Of MASMotionReadinessFinding)))
        End Sub

        Friend ReadOnly Property TokenCount As Integer

        Friend ReadOnly Property ConsumerCount As Integer

        Friend ReadOnly Property RuntimeProvenConsumerCount As Integer

        Friend ReadOnly Property DeclaredOnlyConsumerCount As Integer

        Friend ReadOnly Property TimelineRunnerConsumerCount As Integer

        Friend ReadOnly Property FrameConsumerCount As Integer

        Friend ReadOnly Property FloatRuntimeInheritedConsumerCount As Integer

        Friend ReadOnly Property Findings As IReadOnlyList(Of MASMotionReadinessFinding)

        Friend ReadOnly Property ReadyForCommercialFoundation As Boolean
            Get
                Return Not Findings.Any()
            End Get
        End Property

    End Class

End Namespace
