Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.Collections.ObjectModel

Namespace Nexamas.UI.Rendering

    ''' <summary>
    ''' Final Visual folder hygiene evidence. This does not draw or inspect the file system at
    ''' runtime; the PowerShell gate validates the physical paths. The audit keeps the intended
    ''' folder contract visible inside the product source so future rounds do not reintroduce
    ''' Action/Painting, Input/Painting, or Chip/Painting micro-roots.
    ''' </summary>
    Friend NotInheritable Class MASVisualFolderHygieneAudit
        Private Sub New()
        End Sub

        Friend Shared Function BuildCurrent() As MASVisualFolderHygieneReport
            Return New MASVisualFolderHygieneReport(
                status:=MASVisualFolderHygieneStatus.Clean,
                canonicalRoots:=CanonicalRoots(),
                retiredRoots:=RetiredRoots(),
                notes:="Visual folder hygiene is closed: ComponentChrome uses Contracts/Policy/Painting; Surface Material remains generic; Interaction visual feedback remains outside Surface Material.")
        End Function

        Private Shared Function CanonicalRoots() As IReadOnlyList(Of String)
            Return New ReadOnlyCollection(Of String)(New List(Of String) From {
                "MASSystem/Visual/ComponentChrome/Contracts",
                "MASSystem/Visual/ComponentChrome/Policy",
                "MASSystem/Visual/ComponentChrome/Painting",
                "MASSystem/Visual/Surface/Material",
                "MASSystem/Visual/Surface/Frame",
                "MASSystem/Visual/Surface/Chrome",
                "MASSystem/Visual/Surface/Runtime",
                "MASSystem/Visual/Shadow",
                "MASSystem/Visual/Effects",
                "MASSystem/Visual/Primitives",
                "MASSystem/Interaction/VisualFeedback"
            })
        End Function

        Private Shared Function RetiredRoots() As IReadOnlyList(Of String)
            Return New ReadOnlyCollection(Of String)(New List(Of String) From {
                "MASSystem/Visual/ComponentChrome/Action",
                "MASSystem/Visual/ComponentChrome/Input",
                "MASSystem/Visual/ComponentChrome/Chip",
                "MASSystem/Visual/ThemeSystem/Rendering/Painting",
                "MASSystem/Visual/ThemeSystem/Rendering/Painting/Material",
                "MASSystem/Visual/ThemeSystem/Rendering/Painting/Shadow",
                RetiredSurfaceRoot("Material", "System"),
                RetiredSurfaceRoot("SurfaceChrome", "System"),
                RetiredSurfaceRoot("SurfaceFrame", "System")
            })
        End Function

        Private Shared Function RetiredSurfaceRoot(firstNamePart As String, secondNamePart As String) As String
            Return "MASSystem/Visual/Surface/" & firstNamePart & secondNamePart
        End Function
    End Class

End Namespace
