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

import javax.inject.Inject;

import de.ivu.elect.business.internet.boundary.InternetPraesentationErmittler;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;
import de.ivu.elect.presentation.praesentation.PraesentationStatistikSearchView;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public class PraesentationStatistikSearchMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient InternetPraesentationErmittler internetPraesentationErmittler;

  @Override
  public boolean isRendered() {
    return hasUseCasePermission(UseCasePermission.PRAESENTATION_STATISTIK_SEARCH) && internetPraesentationErmittler.getInternetPraesentationTyp()
        .isPraesentationVerfuegbar();
  }

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

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

  @Override
  public boolean isDisabledInternal() {
    return false;
  }

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

  @Override
  public String getIcon() {
    return "fa fa-list-ul";
  }

}
