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

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

import javax.enterprise.inject.Specializes;
import javax.inject.Inject;

import de.ivu.elect.jee.presentation.menu.MenuEntry;
import de.ivu.elect.presentation.replikation.menu.ReplikationStatusMenuItemEntry;

@Specializes
public class WasSystemPageMenu extends SystemPageMenu {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient ReplikationStatusMenuItemEntry replikationStatusMenuItemEntry;

  @Override
  protected List<MenuEntry> getMenuEntriesSorted() {
    List<MenuEntry> result = new ArrayList<>(super.getMenuEntriesSorted());

    result.add(result.indexOf(systemLogSearchMenuItemEntry) + 1, replikationStatusMenuItemEntry);

    return result;
  }
}
