﻿Option Strict On
Option Explicit On

Imports System.Collections.Generic
Imports System.Globalization
Imports Nexamas.UI.Application
Imports Nexamas.UI.Components
Imports Nexamas.UI.Controls
Imports Nexamas.UI.Layout

Partial Friend Class NexamasUIShowcase

    Private Sub BuildAreaPage(page As MASApplicationLayoutPageBuilder,
                              category As ShowcaseNavigationCategory)
        If page Is Nothing Then Return

        ApplyShowcaseWorkspaceSurface(page)

        Dim entries As IReadOnlyList(Of ShowcaseNavigationEntry) = ShowcaseNavigationCatalog.GetEntries(category)
        BuildShowcaseRouteSummary(page, ShowcaseNavigationCatalog.ResolveCategorySummary(category))

        Dim title As MASLabel = CreateBody(ShowcaseNavigationCatalog.ResolveCategoryTitle(category))
        title.LabelVariant = MASLabelVariant.Heading
        AddShowcaseContent(page, title, MASSize.FillWidth)

        AddShowcaseContent(page, CreateMuted(ShowcaseNavigationCatalog.ResolveCategoryKind(category) & " area • " & entries.Count.ToString(CultureInfo.InvariantCulture) & " catalog routes represented inside focused Wizard journeys. The fixed left index is hidden so the workspace stays wide; This overview stays curated and is reached from the compact Areas menu for orientation only. It previews the area with real Nexamas.UI controls instead of duplicating every capability as a second menu path."), MASSize.FillWidth)

        BuildAreaContextWorkspace(page, category, entries)
        BuildAreaPreview(page, category)
        BuildAreaBottomRouteTrail(page, category)
    End Sub
End Class
