Option Strict On
Option Explicit On

Namespace Nexamas.UI.Localization

    ''' <summary>
    ''' Immutable sample of a localizable product string across the supported Phase 6 cultures.
    ''' </summary>
    Friend NotInheritable Class MASLocalizationStringEntry
        Friend Sub New(key As String,
                       englishText As String,
                       germanText As String,
                       arabicText As String)
            Me.Key = Normalize(key)
            Me.EnglishText = Normalize(englishText)
            Me.GermanText = Normalize(germanText)
            Me.ArabicText = Normalize(arabicText)
        End Sub

        Friend ReadOnly Property Key As String
        Friend ReadOnly Property EnglishText As String
        Friend ReadOnly Property GermanText As String
        Friend ReadOnly Property ArabicText As String

        Friend ReadOnly Property IsComplete As Boolean
            Get
                Return Key.Length > 0 AndAlso EnglishText.Length > 0 AndAlso GermanText.Length > 0 AndAlso ArabicText.Length > 0
            End Get
        End Property

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

End Namespace
