
package de.ivu.elect.presentation.entschaedigung.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;

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

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "entschaedigungsartSearchMenu";

  @Inject
  private transient EntschaedigungsartCreateMenuItemEntry entschaedigungsartCreateMenuItemEntry;

  public EntschaedigungsartSearchMenu() {
    super();
  }

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

    addMenuEntriesSorted(result);

    if (!result.isEmpty()) {
      result.add(entschaedigungsartCreateMenuItemEntry);
    }

    return result;
  }

  protected void addMenuEntriesSorted(List<MenuEntry> result) {
    // To be overridden...
  }
}
