Option Strict On
Option Explicit On

Imports System

Namespace Nexamas.UI.Theming

    ''' <summary>
    ''' Immutable implementation of interaction color states.
    ''' </summary>
    ''' <remarks>
    ''' Stores state colors for normal and danger interaction variants plus disabled fill.
    ''' It must not decide active state, geometry, strength, or rendering.
    ''' </remarks>

    <Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Advanced)>
    Friend NotInheritable Class InteractionTheme
        Implements IMASInteractionTheme

        Private ReadOnly _hover As MASInteractionThemeState
        Private ReadOnly _pressed As MASInteractionThemeState
        Private ReadOnly _selected As MASInteractionThemeState
        Private ReadOnly _focused As MASInteractionThemeState

        Private ReadOnly _dangerHover As MASInteractionThemeState
        Private ReadOnly _dangerPressed As MASInteractionThemeState
        Private ReadOnly _dangerSelected As MASInteractionThemeState
        Private ReadOnly _dangerFocused As MASInteractionThemeState

        Private ReadOnly _disabledFill As MASInteractionThemeLayer

        Friend Sub New(hover As MASInteractionThemeState,
                       pressed As MASInteractionThemeState,
                       selected As MASInteractionThemeState,
                       focused As MASInteractionThemeState,
                       dangerHover As MASInteractionThemeState,
                       dangerPressed As MASInteractionThemeState,
                       dangerSelected As MASInteractionThemeState,
                       dangerFocused As MASInteractionThemeState,
                       disabledFill As MASInteractionThemeLayer)

            _hover = hover
            _pressed = pressed
            _selected = selected
            _focused = focused

            _dangerHover = dangerHover
            _dangerPressed = dangerPressed
            _dangerSelected = dangerSelected
            _dangerFocused = dangerFocused

            _disabledFill = disabledFill
        End Sub

        Public ReadOnly Property Hover As MASInteractionThemeState Implements IMASInteractionTheme.Hover
            Get
                Return _hover
            End Get
        End Property

        Public ReadOnly Property Pressed As MASInteractionThemeState Implements IMASInteractionTheme.Pressed
            Get
                Return _pressed
            End Get
        End Property

        Public ReadOnly Property Selected As MASInteractionThemeState Implements IMASInteractionTheme.Selected
            Get
                Return _selected
            End Get
        End Property

        Public ReadOnly Property Focused As MASInteractionThemeState Implements IMASInteractionTheme.Focused
            Get
                Return _focused
            End Get
        End Property

        Public ReadOnly Property DangerHover As MASInteractionThemeState Implements IMASInteractionTheme.DangerHover
            Get
                Return _dangerHover
            End Get
        End Property

        Public ReadOnly Property DangerPressed As MASInteractionThemeState Implements IMASInteractionTheme.DangerPressed
            Get
                Return _dangerPressed
            End Get
        End Property

        Public ReadOnly Property DangerSelected As MASInteractionThemeState Implements IMASInteractionTheme.DangerSelected
            Get
                Return _dangerSelected
            End Get
        End Property

        Public ReadOnly Property DangerFocused As MASInteractionThemeState Implements IMASInteractionTheme.DangerFocused
            Get
                Return _dangerFocused
            End Get
        End Property

        Public ReadOnly Property DisabledFill As MASInteractionThemeLayer Implements IMASInteractionTheme.DisabledFill
            Get
                Return _disabledFill
            End Get
        End Property

    End Class

End Namespace