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

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.wahl.WahlParameterSearchView;

public class WahlParameterSearchMenuItemEntry extends AbstractWahlParameterMenuItemEntry {

  private static final long serialVersionUID = 1L;

  public WahlParameterSearchMenuItemEntry() {
    super();
  }

  @Override
  protected UseCasePermission getUseCasePermission() {
    return UseCasePermission.WAHL_PARAMETER_SEARCH;
  }

  @Override
  public boolean isDisabledInternal() {
    return !isWahlterminSelected() && !isWahlSelected();
  }

  @Override
  public String getTargetViewId() {
    return WahlParameterSearchView.VIEW_ID;
  }

  @Override
  protected String getLabel() {
    return getMessage(getLabelKey(), getMeta().getMehrzahlMessage());
  }

  @Override
  public String getLabelKey() {
    return "entity.search.menu.item.label";
  }

  @Override
  public String getIcon() {
    return getIcons().getIconGear();
  }
}
