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

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.gruppeimgebiet.ReferendumVorlageImGebietCreateView;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public class ReferendumVorlageImGebietCreateMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

  public ReferendumVorlageImGebietCreateMenuItemEntry() {
    super();
  }

  @Override
  public boolean isRendered() {
    return hasUseCasePermission(UseCasePermission.REFERENDUM_VORLAGE_CREATE);
  }

  @Override
  protected AbstractGebietSecurity getGebietSecurity() {
    return getBearbeitenGebietSecurity();
  }

  @Override
  public boolean isDisabledInternal() {
    return !isGebietSelected();
  }

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

  @Override
  public String getLabelKey() {
    return "referendum.vorlage.im.gebiet.create.menu.item.label";
  }

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