Option Strict On
Option Explicit On

Imports System.Collections.Generic
Imports Nexamas.UI.Architecture
Imports Nexamas.UI.Components.DropDownMenu
Imports Nexamas.UI.Components.ListPopup
Imports Nexamas.UI.Controls
Imports Nexamas.UI.FloatRuntime
Imports Nexamas.UI.WinForms

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Architecture relation declarations for menu/dropdown component ownership.
    ''' </summary>
    ''' <remarks>
    ''' MASMenuButton is intentionally declared as an external WinForms trigger because it is
    ''' not a registered MAS architectural component. The registered MAS endpoint remains the
    ''' DropDownMenu float contract owned by ArchitectureSystem/FloatRuntime.
    ''' </remarks>
    Friend NotInheritable Class MASMenuComponentRelationProvider
        Implements Nexamas.UI.Architecture.IMASComponentRelationProvider

        Public Function GetRelations() As IEnumerable(Of Nexamas.UI.Architecture.MASComponentRelationDeclaration) Implements Nexamas.UI.Architecture.IMASComponentRelationProvider.GetRelations
            Dim relations As New List(Of MASComponentRelationDeclaration)()

            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASComboBox), GetType(MASDropDownListFloatContract), MASComponentRelationKind.Opens, "ComboBox opens dropdown list float contract."))
            relations.Add(MASComponentRelationDeclaration.CreateExternal(GetType(MASMenuButton), GetType(MASDropDownMenuFloatContract), MASComponentRelationKind.Opens, "External WinForms MASMenuButton trigger opens the registered dropdown menu float contract; MASMenuButton itself is not a registered MAS architectural component."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASContextMenuFloatContract), GetType(MASDropDownMenuFloatContract), MASComponentRelationKind.Uses, "ContextMenu uses the dropdown menu float rendering/runtime path."))

            Return relations
        End Function

    End Class

End Namespace
