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

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

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

import de.ivu.elect.jee.presentation.menu.MenuEntry;
import de.ivu.elect.presentation.system.menu.SystemGebietsebeneEditMenuItem;
import de.ivu.elect.presentation.ui.AbstractPageMenuModelBuilder;

@Named(KonfigurationPageMenu.COMPONENT_NAME)
public class KonfigurationPageMenu extends AbstractPageMenuModelBuilder {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "konfigurationPageMenu";

  @Inject
  protected transient KonfigurationSearchMenuItemEntry konfigurationSearchMenuItemEntry;

  @Inject
  protected transient KonfigurationImportMenuItemEntry konfigurationImportMenuItemEntry;

  @Inject
  protected transient KonfigurationExportMenuItemEntry konfigurationExportMenuItemEntry;

  @Inject
  private transient SystemGebietsebeneEditMenuItem systemGebietsebeneEditMenuItem;

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

    result.add(konfigurationSearchMenuItemEntry);
    result.add(konfigurationImportMenuItemEntry);
    result.add(konfigurationExportMenuItemEntry);
    result.add(separator);
    result.add(systemGebietsebeneEditMenuItem);

    return result;
  }
}
