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

import de.ivu.elect.business.email.entity.EmailLayout;
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(EmailLayoutActionMenu.COMPONENT_NAME)
public class EmailLayoutActionMenu extends AbstractActionMenuModelBuilder<EmailLayout> {

  public static final String COMPONENT_NAME = "emailLayoutActionMenu";

  private static final long serialVersionUID = 1L;

  @Inject
  protected EmailLayoutEditAction emailLayoutEditAction;

  @Inject
  protected EmailLayoutDeleteAction emailLayoutDeleteAction;

  public EmailLayoutActionMenu() {
    super();
  }

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

    result.add(emailLayoutEditAction);
    result.add(emailLayoutDeleteAction);

    return result;
  }
}
