@using AppLibs.Libs
@{
    List<NavItem> t = WSNavigation.GetListMenu();
}

@foreach (var i in t)
{

    @if (i.IsGroup)
    {
        <div class="nav-header">
            @i.Name
        </div>
    }
    else if (i.SubItem == null)
    {
        <a class="nav-i d-f" href="javascript:void(0)" app-url="@i.Url" app-nav nav-id="@i.ID">
            <span class="atg atg-@i.Icon mr-2">
            </span>
            <span>@i.Name</span>
        </a>
    }
    else
    {
        <div class="nav-i has-sub d-f f-c" data-dropdown>
            <a class="nav-i d-f" href="javascript:void(0)">
                <span class="atg atg-@i.Icon mr-2">
                </span>
                <span>@i.Name</span>
                <div class="more"><span class="atg atg-more"></span></div>
            </a>

            <div class="sub-item d-f f-c">
                @foreach (var j in i.SubItem)
                {
                    <a class="nav-i d-f nonhide" href="javascript:void(0)" app-url="@j.Url" app-nav nav-id="@j.ID" nav-sub>
                        <span class="atg atg-circle mr-2"></span>
                        <span>@j.Name</span>
                    </a>
                }
            </div>
        </div>
    }
}