Option Strict On
Option Explicit On

Imports System
Imports Nexamas.UI.Components
Imports Nexamas.UI.Theming

Namespace Nexamas.UI.Application

    ''' <summary>
    ''' Internal command description used by the owned PanelShell execution path.
    ''' Public SDK consumers must use high-level dialog gateways such as
    ''' MASSelectionPanelOptions instead of composing command bars directly.
    ''' </summary>
    Friend NotInheritable Class MASApplicationPanelAction

        Friend Property Text As String = String.Empty

        Friend Property CommandId As String = String.Empty

        Friend Property Intent As MASButtonIntent = MASButtonIntent.Default

        Friend Property Personality As MASButtonPersonality = MASButtonPersonality.MAS

        Friend Property Enabled As Boolean = True

        Friend Property Visible As Boolean = True

        Friend Property IsDefaultButton As Boolean = False

        Friend Property CloseOnClick As Boolean = True

        Friend Property Callback As Action(Of MASApplicationPanelResult)

        Friend Sub New()
        End Sub

        Friend Sub New(text As String,
                       commandId As String)

            Me.Text = If(text, String.Empty)
            Me.CommandId = If(commandId, String.Empty)

        End Sub

        Friend Shared Function Create(text As String,
                                      commandId As String,
                                      Optional intent As MASButtonIntent = MASButtonIntent.Default,
                                      Optional closeOnClick As Boolean = True) As MASApplicationPanelAction

            Return New MASApplicationPanelAction(text, commandId) With {
                .Intent = intent,
                .CloseOnClick = closeOnClick
            }

        End Function

    End Class

End Namespace