Option Strict On
Option Explicit On

Namespace Nexamas.UI.TextInput

    ' CONTRACT:
    ' MASTextMultilineOptions describes multiline behavior without owning state.
    '
    ' Stage 5A scope:
    ' - Pure configuration object.
    ' - No rendering, no input handling, no layout measurement.
    Friend NotInheritable Class MASTextMultilineOptions

        Friend Property AcceptsReturn As Boolean = True
        Friend Property AcceptsTab As Boolean = False
        Friend Property WordWrap As Boolean = True
        Friend Property NormalizeLineEndings As Boolean = True
        Friend Property TabSize As Integer = 4

        Friend Function Clone() As MASTextMultilineOptions
            Return New MASTextMultilineOptions() With {
                .AcceptsReturn = Me.AcceptsReturn,
                .AcceptsTab = Me.AcceptsTab,
                .WordWrap = Me.WordWrap,
                .NormalizeLineEndings = Me.NormalizeLineEndings,
                .TabSize = Me.TabSize
            }
        End Function

        Friend Sub Normalize()
            If TabSize < 1 Then TabSize = 1
            If TabSize > 16 Then TabSize = 16
        End Sub

    End Class

End Namespace
