Option Strict On
Option Explicit On

Imports System.Collections.Generic
Imports Nexamas.UI.Architecture
Imports Nexamas.UI.Components
Imports Nexamas.UI.Rendering

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Architecture relation declarations for file/navigation composite component ownership.
    ''' </summary>
    Friend NotInheritable Class MASNavigationComponentRelationProvider
        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(MASFileBrowser), GetType(MASListView), MASComponentRelationKind.Contains, "File browser contains list view."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFileBrowser), GetType(MASTreeView), MASComponentRelationKind.Contains, "File browser contains tree view."))

            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFilePickerControl), GetType(MASPanelShellContract), MASComponentRelationKind.Uses, "FilePicker control renders its outer shell through PanelShell."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFileExplorerView), GetType(MASPanelShellContract), MASComponentRelationKind.Uses, "FileExplorer view renders its outer shell through PanelShell."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFilePickerFloatContract), GetType(MASFilePickerControl), MASComponentRelationKind.Hosts, "Float architecture contract hosts FilePicker control as its content root."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFileExplorerFloatContract), GetType(MASFileExplorerView), MASComponentRelationKind.Hosts, "Float architecture contract hosts FileExplorer view as its content root."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFilePickerControl), GetType(MASFileBrowser), MASComponentRelationKind.CompositeChild, "Picker contains browser."))
            relations.Add(MASComponentRelationDeclaration.Create(GetType(MASFilePickerControl), GetType(MASFilePickerNavigationBar), MASComponentRelationKind.CompositeChild, "Picker contains navigation bar."))

            Return relations
        End Function

    End Class

End Namespace
