Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports Nexamas.UI.Controls
Imports Nexamas.UI.Host
Imports Nexamas.UI.Layout
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.Theming
Imports Nexamas.UI.Components
Imports SkiaSharp

Namespace Nexamas.UI.Application


    ''' <summary>
    ''' Public beginner-facing application-surface layout builder. It is not a second layout engine:
    ''' each semantic region is converted into an official MASApplicationLayoutPageBuilder and arranged
    ''' by MASLayout. Use it for real application screens with command bars, navigation/side regions,
    ''' true workspace/content areas, inspectors, and footers instead of assigning Region/Bounds/Left/Top values.
    ''' </summary>
    Partial Public NotInheritable Class MASApplicationSurfaceLayoutBuilder
        Private _commandBarPage As MASApplicationLayoutPageBuilder
        Private _sidebarPage As MASApplicationLayoutPageBuilder
        Private _sidebarFooterPage As MASApplicationLayoutPageBuilder
        Private _contentPage As MASApplicationLayoutPageBuilder
        Private _inspectorPage As MASApplicationLayoutPageBuilder
        Private _footerPage As MASApplicationLayoutPageBuilder

        Private ReadOnly _backgroundRegistry As MASApplicationSurfaceBackgroundRegistry

        Private _showCommandBackground As Boolean = False
        Private _showRegionBackgrounds As Boolean = False
        Private _commandBackgroundSurfaceMaterialKey As String = MASSurfaceMaterialIds.Auto
        Private _regionBackgroundSurfaceMaterialKey As String = MASSurfaceMaterialIds.Auto
        Private _standardChromeShell As MASApplicationWindowShell
        Private _commandBackgroundPadding As MASLayoutInset = MASApplicationLayoutSizeTokens.ApplicationSurfaceCommandBackgroundPaddingInset()
        Private _regionBackgroundPadding As MASLayoutInset = MASApplicationLayoutSizeTokens.ApplicationSurfaceRegionBackgroundPaddingInset()
        Private _commandBarPlacement As MASApplicationSurfaceCommandBarPlacement = MASApplicationSurfaceCommandBarPlacement.Auto
        Private _footerPlacement As MASApplicationSurfaceFooterPlacement = MASApplicationSurfaceFooterPlacement.FullApplicationSurfaceBottom

        Private _commandBodyGap As Single = MASApplicationLayoutSizeTokens.ApplicationSurfaceGap
        Private _bodyFooterGap As Single = MASApplicationLayoutSizeTokens.ApplicationSurfaceGap
        Private _columnGap As Single = MASApplicationLayoutSizeTokens.ApplicationSurfaceGap
        Private _sidebarFooterGap As Single = MASApplicationLayoutSizeTokens.ApplicationSurfaceGap
        Private _outerPadding As MASLayoutInset = MASApplicationLayoutSizeTokens.ApplicationSurfaceOuterPaddingInset()
        Private _sidebarSize As MASApplicationSurfaceSideSize = MASApplicationSurfaceSideSize.[Default]
        Private _inspectorSize As MASApplicationSurfaceSideSize = MASApplicationSurfaceSideSize.[Default]
        Private _commandBarSize As MASApplicationSurfaceBarSize = MASApplicationSurfaceBarSize.[Default]
        Private _footerSize As MASApplicationSurfaceBarSize = MASApplicationSurfaceBarSize.[Default]
        Private _sidebarFooterSize As MASApplicationSurfaceBarSize = MASApplicationSurfaceBarSize.[Default]
        Private _minimumContentWidth As Single = MASApplicationLayoutSizeTokens.ApplicationSurfaceMinimumContentWidth

        Friend Sub New()
            Me.New(Nothing)
        End Sub

        Friend Sub New(backgroundRegistry As MASApplicationSurfaceBackgroundRegistry)
            _backgroundRegistry = If(backgroundRegistry, New MASApplicationSurfaceBackgroundRegistry())
        End Sub

    End Class

End Namespace
