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

@Specializes
public class WasGebietSearchMenuBuilder extends CoreGebietSearchMenuBuilder {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient WasStimmbezirkCreateMenuItemEntry stimmbezirkCreateMenuItemEntry;

  @Inject
  private transient WasBriefwahlbezirkCreateMenuItemEntry briefwahlbezirkCreateMenuItemEntry;

  public WasGebietSearchMenuBuilder() {
    super();
  }

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

    addCreateErfassungsgebieteMenuEntries(result);

    return result;
  }

  protected void addCreateErfassungsgebieteMenuEntries(List<MenuEntry> result) {
    result.add(stimmbezirkCreateMenuItemEntry);

    result.add(briefwahlbezirkCreateMenuItemEntry);
  }
}
