Option Strict On
Option Explicit On

Imports System
Imports SkiaSharp

Namespace Nexamas.UI.Theming

    ''' <summary>
    ''' Describes one optional interaction visual layer, such as a fill or ring color.
    ''' </summary>
    ''' <remarks>
    ''' Disabled layers must be ignored by resolvers. Enabled layers must provide
    ''' a visible color.
    ''' </remarks>
    <Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Advanced)>
    Friend Structure MASInteractionThemeLayer

        Friend Sub New(enabled As Boolean, color As SKColor)
            If enabled AndAlso color.Alpha = 0 Then
                Throw New ArgumentException("Enabled interaction layer cannot use a fully transparent color.", NameOf(color))
            End If

            _enabled = enabled
            _color = color
        End Sub

        Private ReadOnly _enabled As Boolean
        Private ReadOnly _color As SKColor

        Friend ReadOnly Property Enabled As Boolean
            Get
                Return _enabled
            End Get
        End Property

        Friend ReadOnly Property Color As SKColor
            Get
                Return _color
            End Get
        End Property

        Friend Shared ReadOnly Property None As MASInteractionThemeLayer
            Get
                Return New MASInteractionThemeLayer(False, SKColors.Transparent)
            End Get
        End Property

    End Structure

End Namespace