
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.business.wahl.boundary.WahlSessionSelect;
import de.ivu.elect.presentation.gebietsbaum.polygon.GebietGeometrieSVGView;

/**
 *  on 20.07.2016.
 */
@Specializes
public class CoreGebietSearchMenuItemEntry extends GebietSearchMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient WahlSessionSelect wahlSessionSelect;

  public CoreGebietSearchMenuItemEntry() {
    super();
  }

  @Override
  protected boolean isWahlOrWahlterminSelected() {
    return wahlSessionSelect.isSelected();
  }

  @Override
  protected List<String> getAdditionalTopicViewIds() {
    ArrayList<String> result = new ArrayList<>(super.getAdditionalTopicViewIds());
    result.add(GebietGeometrieSVGView.VIEW_ID);
    return result;
  }
}
