@using Volo.Abp.UI.Navigation
@model ApplicationMenu
@foreach (var menuItem in Model.Items)
{
    if (menuItem.IsLeaf)
    {
        if (menuItem.Url == null)
        {
            continue;
        }

        <li class="nav-item @(menuItem.IsDisabled ? "disabled" : "")">
            <a class="nav-link" href="@(menuItem.Url ?? "#")">@menuItem.DisplayName</a> @*<span class="sr-only">(current)</span>*@
        </li>
    }
    else
    {
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="Menu_@(menuItem.Name)" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">@menuItem.DisplayName</a>
            <div class="dropdown-menu" aria-labelledby="Menu_@(menuItem.Name)">
                @foreach (var childMenuItem in menuItem.Items)
                {
                    <a class="dropdown-item" href="@(childMenuItem.Url ?? "#")">@childMenuItem.DisplayName</a>
                }
            </div>
        </li>
    }
}
