Option Strict On
Option Explicit On

Namespace Nexamas.UI.ThemeStudio

    ''' <summary>
    ''' Immutable theme entry projected by Theme Studio from the official MAS theme registry.
    ''' </summary>
    ''' <remarks>
    ''' The entry deliberately exposes product-safe facts only: identity, current selection,
    ''' and the number of foundation/family groups available for inspection. It does not
    ''' expose ThemeManager, ThemeHost, factories, mutable theme objects, or renderer internals.
    ''' </remarks>
    Friend NotInheritable Class MASThemeStudioThemeEntry

        Friend Sub New(id As String,
                       displayName As String,
                       version As Integer,
                       isCurrent As Boolean,
                       foundationGroupCount As Integer,
                       familyGroupCount As Integer)
            Me.Id = Normalize(id)
            Me.DisplayName = Normalize(displayName)
            Me.Version = version
            Me.IsCurrent = isCurrent
            Me.FoundationGroupCount = Math.Max(0, foundationGroupCount)
            Me.FamilyGroupCount = Math.Max(0, familyGroupCount)
        End Sub

        Friend ReadOnly Property Id As String
        Friend ReadOnly Property DisplayName As String
        Friend ReadOnly Property Version As Integer
        Friend ReadOnly Property IsCurrent As Boolean
        Friend ReadOnly Property FoundationGroupCount As Integer
        Friend ReadOnly Property FamilyGroupCount As Integer

        Private Shared Function Normalize(value As String) As String
            Return If(value, String.Empty).Trim()
        End Function

    End Class

End Namespace
