<ul class="submenu submenu2">
    <li *ngFor="let item of menuItems"
        [ngClass]="{'parent-menu-active' : item.expanded && item.items, 'SidebarMenulink': item.expanded && !item.items}">
        <a *ngIf="!item.items" [routerLink]="item.routerLink"
            (click)="isMobile ? checkSidebar.SideBar('IsActive') : ''">
            <i *ngIf="item.icon" class="{{ item.icon }}"></i>
            <span>{{ item.label }}</span>
        </a>
        <div *ngIf="item.items">
            <a (click)="toggleSubMenu(item)">
                <i *ngIf="item.icon" class="{{ item.icon }}"></i>
                <span>{{ item.label }}</span>
                <i class="pi" [class.pi-chevron-down]="!item.expanded" [class.pi-chevron-up]="item.expanded"></i>
            </a>
            <ul class="submenu" [@submenuAnimation]="item.expanded ? 'open' : 'closed'">
                <custom-sidebar-item [menuItems]="item.items" [isMobile]="isMobile"></custom-sidebar-item>
            </ul>
        </div>
    </li>
</ul>