@using MudBlazor

@foreach (var node in Nodes.OrderBy(n => n.Label))
{
    @if (node.ChildNodes.Count > 0)
    {
        <MudTreeViewItem T="string" Value="@node.FullPath" Text="@node.Label" Expanded="true">
            <SettingsTreeNode Nodes="node.ChildNodes" />
        </MudTreeViewItem>
    }
    else
    {
        <MudTreeViewItem T="string" Value="@node.FullPath" Text="@node.Label" />
    }
}

@code {
    [Parameter] public List<SettingsDialog.CategoryNode> Nodes { get; set; } = new();
}
