Option Strict On
Option Explicit On

Imports System

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Immutable public data contract for <see cref="Nexamas.UI.Controls.MASSegmentedControl"/>.
    ''' The visual renderer, pointer handling, animation, and material identity remain Nexamas UI-owned internals.
    ''' </summary>
    Public NotInheritable Class MASSegmentEntry

        Public ReadOnly Property Id As String
        Public ReadOnly Property Label As String
        Public ReadOnly Property Tag As Object

        Public Sub New(id As String,
                       label As String,
                       Optional tag As Object = Nothing)

            Dim safeId As String = If(id, String.Empty).Trim()
            Dim safeLabel As String = If(label, String.Empty).Trim()

            If safeId.Length = 0 Then Throw New ArgumentException("Segment id cannot be empty.", NameOf(id))
            If safeLabel.Length = 0 Then Throw New ArgumentException("Segment label cannot be empty.", NameOf(label))

            Me.Id = safeId
            Me.Label = safeLabel
            Me.Tag = tag
        End Sub

    End Class

End Namespace
