
package de.ivu.elect.presentation.ergebnis.menu;

import java.util.ArrayList;
import java.util.List;

import de.ivu.elect.jee.presentation.menu.AbstractBaseMenuItemEntry;
import de.ivu.elect.jee.presentation.menu.AbstractSubMenuEntry;
import de.ivu.elect.jee.presentation.menu.MenuEntry;

public class ErgebnisseMainMenuEntry extends AbstractSubMenuEntry {

  private static final long serialVersionUID = 1L;

  public ErgebnisseMainMenuEntry() {
    super();
  }

  @Override
  protected List<MenuEntry> getSubMenuEntriesSorted() {
    return new ArrayList<>();
  }

  @Override
  public String getLabelKey() {
    return "ergebnis.main.menu.item.label";
  }

  public boolean isSubTopicActive() {
    return getSubMenuEntriesSorted().stream().filter(menuEntry -> menuEntry instanceof AbstractBaseMenuItemEntry).anyMatch(MenuEntry::isTopicActive);
  }

}
