
package de.ivu.elect.presentation.email.action;

import de.ivu.elect.business.email.entity.Email;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

import javax.inject.Inject;
import javax.inject.Named;
import java.util.ArrayList;
import java.util.List;

@Named(EmailActionMenu.COMPONENT_NAME)
public class EmailActionMenu extends AbstractActionMenuModelBuilder<Email> {

  public static final String COMPONENT_NAME = "emailActionMenu";

  private static final long serialVersionUID = 1L;

  @Inject
  protected EmailSendeErneutAction emailSendeErneutAction;

  @Inject
  protected EmailDeleteAction emailDeleteAction;

  public EmailActionMenu() {
    super();
  }

  @Override
  protected List<ActionEntry<Email>> getActionEntriesSorted() {
    List<ActionEntry<Email>> result = new ArrayList<>();

    result.add(emailSendeErneutAction);
    result.add(emailDeleteAction);

    return result;
  }
}
