Option Strict On
Option Explicit On

Imports System
Imports Nexamas.UI.Components

Namespace Nexamas.UI.Theming

    ''' <summary>
    ''' Immutable implementation of the theme foundation bundle.
    ''' Stores the complete set of foundational visual contracts for one theme.
    ''' </summary>
    ''' <remarks>
    ''' This class is a data container only. It validates required sections and exposes
    ''' read-only foundation contracts without rendering or resolving control state.
    ''' </remarks>
    <Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Advanced)>
    Friend NotInheritable Class FoundationTheme
        Implements IMASThemeFoundation

        Private ReadOnly _background As IMASBackgroundTheme
        Private ReadOnly _brand As IMASBrandTheme
        Private ReadOnly _neutrals As IMASNeutralTheme
        Private ReadOnly _semantics As IMASSemanticTheme
        Private ReadOnly _textColors As IMASTextColorTheme
        Private ReadOnly _interaction As IMASInteractionTheme
        Private ReadOnly _talNeutralInteraction As IMASInteractionTheme
        Private ReadOnly _talPrimaryInteraction As IMASInteractionTheme
        Private ReadOnly _surface As IMASFoundationSurfaceTheme
        Private ReadOnly _talNeutralSurface As MASButtonSurfaceTheme
        Private ReadOnly _talPrimarySurface As MASButtonSurfaceTheme
        Private ReadOnly _masNeutralSurface As MASButtonSurfaceTheme
        Private ReadOnly _masPrimarySurface As MASButtonSurfaceTheme
        Private ReadOnly _masSubtleSurface As MASButtonSurfaceTheme

        Friend Sub New(background As IMASBackgroundTheme,
               brand As IMASBrandTheme,
               neutrals As IMASNeutralTheme,
               semantics As IMASSemanticTheme,
               textColors As IMASTextColorTheme,
               interaction As IMASInteractionTheme,
               talNeutralInteraction As IMASInteractionTheme,
               talPrimaryInteraction As IMASInteractionTheme,
               surface As IMASFoundationSurfaceTheme,
               talNeutralSurface As MASButtonSurfaceTheme,
               talPrimarySurface As MASButtonSurfaceTheme,
               masNeutralSurface As MASButtonSurfaceTheme,
               masPrimarySurface As MASButtonSurfaceTheme,
               masSubtleSurface As MASButtonSurfaceTheme)

            If background Is Nothing Then Throw New ArgumentNullException(NameOf(background))
            If brand Is Nothing Then Throw New ArgumentNullException(NameOf(brand))
            If neutrals Is Nothing Then Throw New ArgumentNullException(NameOf(neutrals))
            If semantics Is Nothing Then Throw New ArgumentNullException(NameOf(semantics))
            If textColors Is Nothing Then Throw New ArgumentNullException(NameOf(textColors))
            If interaction Is Nothing Then Throw New ArgumentNullException(NameOf(interaction))
            If talNeutralInteraction Is Nothing Then Throw New ArgumentNullException(NameOf(talNeutralInteraction))
            If talPrimaryInteraction Is Nothing Then Throw New ArgumentNullException(NameOf(talPrimaryInteraction))
            If surface Is Nothing Then Throw New ArgumentNullException(NameOf(surface))


            _background = background
            _brand = brand
            _neutrals = neutrals
            _semantics = semantics
            _textColors = textColors
            _interaction = interaction
            _talNeutralInteraction = talNeutralInteraction
            _talPrimaryInteraction = talPrimaryInteraction
            _surface = surface
            _talNeutralSurface = talNeutralSurface
            _talPrimarySurface = talPrimarySurface
            _masNeutralSurface = masNeutralSurface
            _masPrimarySurface = masPrimarySurface
            _masSubtleSurface = masSubtleSurface
        End Sub

        Public ReadOnly Property Background As IMASBackgroundTheme Implements IMASThemeFoundation.Background
            Get
                Return _background
            End Get
        End Property

        Public ReadOnly Property Brand As IMASBrandTheme Implements IMASThemeFoundation.Brand
            Get
                Return _brand
            End Get
        End Property

        Public ReadOnly Property Neutrals As IMASNeutralTheme Implements IMASThemeFoundation.Neutrals
            Get
                Return _neutrals
            End Get
        End Property

        Public ReadOnly Property Semantics As IMASSemanticTheme Implements IMASThemeFoundation.Semantics
            Get
                Return _semantics
            End Get
        End Property

        Public ReadOnly Property TextColors As IMASTextColorTheme Implements IMASThemeFoundation.TextColors
            Get
                Return _textColors
            End Get
        End Property

        Public ReadOnly Property Interaction As IMASInteractionTheme Implements IMASThemeFoundation.Interaction
            Get
                Return _interaction
            End Get
        End Property

        Public ReadOnly Property TalNeutralInteraction As IMASInteractionTheme Implements IMASThemeFoundation.TalNeutralInteraction
            Get
                Return _talNeutralInteraction
            End Get
        End Property

        Public ReadOnly Property TalPrimaryInteraction As IMASInteractionTheme Implements IMASThemeFoundation.TalPrimaryInteraction
            Get
                Return _talPrimaryInteraction
            End Get
        End Property

        Public ReadOnly Property Surface As IMASFoundationSurfaceTheme Implements IMASThemeFoundation.Surface
            Get
                Return _surface
            End Get
        End Property

        Public ReadOnly Property TalNeutralSurface As MASButtonSurfaceTheme Implements IMASThemeFoundation.TalNeutralSurface
            Get
                Return _talNeutralSurface
            End Get
        End Property

        Public ReadOnly Property TalPrimarySurface As MASButtonSurfaceTheme Implements IMASThemeFoundation.TalPrimarySurface
            Get
                Return _talPrimarySurface
            End Get
        End Property

        Public ReadOnly Property MasNeutralSurface As MASButtonSurfaceTheme Implements IMASThemeFoundation.MasNeutralSurface
            Get
                Return _masNeutralSurface
            End Get
        End Property

        Public ReadOnly Property MasPrimarySurface As MASButtonSurfaceTheme Implements IMASThemeFoundation.MasPrimarySurface
            Get
                Return _masPrimarySurface
            End Get
        End Property

        Public ReadOnly Property MasSubtleSurface As MASButtonSurfaceTheme Implements IMASThemeFoundation.MasSubtleSurface
            Get
                Return _masSubtleSurface
            End Get
        End Property

    End Class

End Namespace