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

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

import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.jee.presentation.menu.AbstractMenuModelBuilder;
import de.ivu.elect.jee.presentation.menu.MenuEntry;
import de.ivu.elect.presentation.wahlvorschlag.menu.ListeListenkandidaturreihenfolgeEditMenuItemEntry;

@Named(ListenkandidaturSearchMenu.COMPONENT_NAME)
public class ListenkandidaturSearchMenu extends AbstractMenuModelBuilder {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "listenkandidaturSearchMenu";

  @Inject
  private transient ListenkandidaturCreateMenuItemEntry listenkandidaturCreateMenuItemEntry;

  @Inject
  private transient ListeListenkandidaturreihenfolgeEditMenuItemEntry listeListenkandidaturreihenfolgeEditMenuItemEntry;

  @Inject
  private transient ListenkandidaturZuTestzweckenZulassenMenuItemEntry listenkandidaturZuTestzweckenZulassenMenuItemEntry;

  public ListenkandidaturSearchMenu() {
    super();
  }

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

    addMenuEntriesCreate(result);

    result.add(listeListenkandidaturreihenfolgeEditMenuItemEntry);

    result.add(listenkandidaturZuTestzweckenZulassenMenuItemEntry);

    return result;
  }

  protected void addMenuEntriesCreate(List<MenuEntry> result) {
    result.add(listenkandidaturCreateMenuItemEntry);
  }
}
