Option Strict On
Option Explicit On

Imports System.Collections.Generic

Namespace Nexamas.UI.PropertyGrid

    ''' <summary>
    ''' Foundation builder for object inspection and deterministic sample facts.
    ''' </summary>
    Friend NotInheritable Class MASPropertyGridFoundationBuilder
        Private Sub New()
        End Sub

        Friend Shared Function BuildObjectSnapshot(source As Object) As MASPropertyGridSnapshot
            Return New MASPropertyGridSnapshot(MASPropertyGridObjectInspector.Inspect(source))
        End Function

        Friend Shared Function BuildSampleDeveloperToolSnapshot() As MASPropertyGridSnapshot
            Dim rows As New List(Of MASPropertyGridPropertyState) From {
                MASPropertyGridPropertyState.CreateManual("Identity", "Name", "ButtonPrimary", True),
                MASPropertyGridPropertyState.CreateManual("Identity", "Visible", True, True),
                MASPropertyGridPropertyState.CreateManual("Layout", "Width", 240.0R, True),
                MASPropertyGridPropertyState.CreateManual("Layout", "Height", 40.0R, True),
                MASPropertyGridPropertyState.CreateManual("Theme", "SurfaceMaterial", "frosted-glass", True)
            }

            Return New MASPropertyGridSnapshot(rows)
        End Function

    End Class

End Namespace
