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

import javax.inject.Inject;

import de.ivu.elect.business.internet.boundary.InternetPraesentationErmittler;
import de.ivu.elect.presentation.exchange.ExportDescription;
import de.ivu.elect.presentation.exchange.menu.AbstractExportMenuItemEntry;
import de.ivu.elect.presentation.internet.exchange.InternetKonfigurationExportDescription;

public class InternetSeiteExportMenuItemEntry extends AbstractExportMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient InternetKonfigurationExportDescription exportDescription;

  @Inject
  private transient InternetPraesentationErmittler internetPraesentationErmittler;

  public InternetSeiteExportMenuItemEntry() {
    super();
  }

  @Override
  protected ExportDescription getExportDescription() {
    return exportDescription;
  }

  @Override
  public String getLabel() {
    return getMessage(getLabelKey(), getMessage("entity.einzahl.INTERNET_KONFIGURATION"));
  }

  @Override
  public boolean isRendered() {
    return super.isRendered() && internetPraesentationErmittler.getInternetPraesentationTyp().isWidgetsKonfigurierbar();
  }
}
