@namespace Connected.Components 
@inherits UIComponent
@using Microsoft.AspNetCore.Components.Routing

<div class="@GetPanelClass()" @attributes="CustomAttributes">
    @if (_sections.Any() && _sections.Count() > 1)
    {
        <TextContent Typo="Typo.subtitle1" Class="title" GutterBottom="true">
            @Headline
        </TextContent>
        <NavMenu Class="pl-4">
            @foreach (var docSection in _sections.OrderBy(x => x.LevelSortingValue))
            {
                <Connected.Components.NavLink @key="docSection.Id" Match="NavLinkMatch.All" Class="@GetNavLinkClass(docSection)" @onclick="@(e => OnNavLinkClick(docSection.Id))">
                    @docSection.Title
                </Connected.Components.NavLink>
			}
        </NavMenu>
    }
</div>