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.Components.ListRendering
Imports Nexamas.UI.FloatRuntime
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.Values

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Built-in architecture descriptors owned by the FloatRuntime family.
    '''
    ''' Legacy GroupBox-backed panel float contracts were intentionally removed.
    ''' Generic application panels are now represented by the PanelShell-backed
    ''' ShowPanelShell gateway and the MASPanelShellFloatHost registration.
    ''' </summary>
    Friend NotInheritable Class MASComponentFloatRuntimeArchitectureProvider
        Implements IMASComponentRegistrationProvider

        Public Function GetComponents() As IEnumerable(Of MASComponentDescriptor) _
            Implements IMASComponentRegistrationProvider.GetComponents

            Dim list As New List(Of MASComponentDescriptor)()

            list.Add(
                MASComponentDescriptor.Create(Of MASDropDownMenuFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    controlKind:=CommonEnums.ControlKind.DropDownMenu,
                    surfaceFamily:=CommonEnums.SurfaceFamily.DropDownMenu,
                    materialRole:=MASMaterialRole.Popup,
                    interactionRole:=MASInteractionRole.Menu,
                    shadowRole:=MASShadowRole.Popup,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Menu,
                    themeSurfaceRole:=NexamasUISurfaceRole.Menu,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Menu,
                    inputRole:=MASInputRole.PointerAndKeyboard,
                    focusRole:=MASFocusRole.FocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASContextMenuFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.ContextMenu,
                    materialRole:=MASMaterialRole.Popup,
                    interactionRole:=MASInteractionRole.Menu,
                    shadowRole:=MASShadowRole.Popup,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Menu,
                    themeSurfaceRole:=NexamasUISurfaceRole.Menu,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Menu,
                    inputRole:=MASInputRole.PointerAndKeyboard,
                    focusRole:=MASFocusRole.FocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASMessageBoxFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.PanelShell,
                    materialRole:=MASMaterialRole.Dialog,
                    interactionRole:=MASInteractionRole.Floating,
                    shadowRole:=MASShadowRole.Dialog,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Dialog,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Dialog,
                    inputRole:=MASInputRole.PointerAndKeyboard,
                    focusRole:=MASFocusRole.ModalFocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASToastFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.Toast,
                    materialRole:=MASMaterialRole.Toast,
                    interactionRole:=MASInteractionRole.Passive,
                    shadowRole:=MASShadowRole.Toast,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Toast,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Toast,
                    inputRole:=MASInputRole.PointerOnly,
                    focusRole:=MASFocusRole.NotFocusable))

            list.Add(
                MASComponentDescriptor.Create(Of MASTooltipFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.Tooltip,
                    materialRole:=MASMaterialRole.Tooltip,
                    interactionRole:=MASInteractionRole.Passive,
                    shadowRole:=MASShadowRole.Tooltip,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Caption,
                    themeSurfaceRole:=NexamasUISurfaceRole.Tooltip,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Passive,
                    floatRole:=MASFloatRole.Tooltip,
                    inputRole:=MASInputRole.Passive,
                    focusRole:=MASFocusRole.NotFocusable))


            list.Add(
                MASComponentDescriptor.Create(Of MASPopoverFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.Tooltip,
                    materialRole:=MASMaterialRole.Tooltip,
                    interactionRole:=MASInteractionRole.Floating,
                    shadowRole:=MASShadowRole.Tooltip,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Tooltip,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Popup,
                    inputRole:=MASInputRole.PointerAndKeyboard,
                    focusRole:=MASFocusRole.FocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASDrawerFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.PanelShell,
                    materialRole:=MASMaterialRole.Dialog,
                    interactionRole:=MASInteractionRole.Floating,
                    shadowRole:=MASShadowRole.Dialog,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Dialog,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Dialog,
                    inputRole:=MASInputRole.PointerAndKeyboard,
                    focusRole:=MASFocusRole.ModalFocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASFileExplorerFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.PanelShell,
                    materialRole:=MASMaterialRole.Dialog,
                    interactionRole:=MASInteractionRole.Composite,
                    shadowRole:=MASShadowRole.Dialog,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Dialog,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Explorer,
                    inputRole:=MASInputRole.RoutedContainer,
                    focusRole:=MASFocusRole.ModalFocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASFileExplorerViewModeMenuFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.DropDownMenu,
                    materialRole:=MASMaterialRole.Popup,
                    interactionRole:=MASInteractionRole.Menu,
                    shadowRole:=MASShadowRole.Popup,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Menu,
                    themeSurfaceRole:=NexamasUISurfaceRole.Menu,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Menu,
                    inputRole:=MASInputRole.PointerAndKeyboard,
                    focusRole:=MASFocusRole.FocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASFilePickerFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    surfaceFamily:=CommonEnums.SurfaceFamily.PanelShell,
                    materialRole:=MASMaterialRole.Dialog,
                    interactionRole:=MASInteractionRole.Composite,
                    shadowRole:=MASShadowRole.Dialog,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Dialog,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Picker,
                    inputRole:=MASInputRole.RoutedContainer,
                    focusRole:=MASFocusRole.ModalFocusScope))

            list.Add(
                MASComponentDescriptor.Create(Of MASDropDownListFloatContract)(
                    category:=MASComponentCategory.FloatContent,
                    controlKind:=CommonEnums.ControlKind.DropDownListOverlay,
                    surfaceFamily:=CommonEnums.SurfaceFamily.DropDown,
                    materialRole:=MASMaterialRole.Popup,
                    interactionRole:=MASInteractionRole.Selectable,
                    shadowRole:=MASShadowRole.Popup,
                    radiusRole:=MASRadiusRole.SurfaceFamily,
                    typographyRole:=MASTypographyRole.Body,
                    themeSurfaceRole:=NexamasUISurfaceRole.Popup,
                    themeColorRole:=NexamasUIColorRole.TextBody,
                    themeStateRole:=NexamasUIStateRole.Interactive,
                    floatRole:=MASFloatRole.Menu,
                    inputRole:=MASInputRole.PointerOnly,
                    focusRole:=MASFocusRole.NotFocusable))

            Return list

        End Function

    End Class

End Namespace