package cn.axzo.workflow.common.enums;


import com.google.common.collect.Lists;

import java.util.List;

import static cn.axzo.workflow.common.enums.BusinessTypeEnum.APPROVAL;
import static cn.axzo.workflow.common.enums.BusinessTypeEnum.SIGN;

/**
 * Flowable Event Enum For RocketMQ
 *
 * @author wangli
 * @since 2023/9/4 10:38
 */
public enum BpmnButtonEnum {
    /**
     * 同意按钮
     */
    BPMN_APPROVE(1, "BPMN_APPROVE", "同意", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 驳回按钮
     */
    BPMN_REJECT(2, "BPMN_REJECT", "驳回", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 确认签字
     */
    BPMN_CONFIRM_SIGN(3, "BPMN_CONFIRM_SIGN", "确认签字", Lists.newArrayList(SIGN)),
    /**
     * 查看文档
     */
    BPMN_VIEW_DOC(4, "BPMN_VIEW_DOC", "查看文档", Lists.newArrayList(SIGN)),
    /**
     * 撤回按钮
     */
    BPMN_REVOCATION(5, "BPMN_REVOCATION", "撤回", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 转交按钮
     */
    BPMN_TRANSFER(6, "BPMN_TRANSFER", "转交", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 加签按钮
     */
    BPMN_COUNTERSIGN(7, "BPMN_COUNTERSIGN", "加签", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 评论按钮
     */
    BPMN_COMMENT(8, "BPMN_COMMENT", "评论", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 回退按钮
     */
    BPMN_ROLLBACK(9, "BPMN_ROLLBACK", "回退", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 抄送按钮
     */
    BPMN_COPY(10, "BPMN_COPY", "抄送", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 提级审批按钮
     */
    BPMN_UPGRADE(12, "BPMN_UPGRADE", "提级审批", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 催办按钮
     */
    BPMN_REMIND(11, "BPMN_REMIND", "催办", Lists.newArrayList(APPROVAL, SIGN)),
    /**
     * 管理员转交按钮
     */
    BPMN_ADMIN_TRANSFER(90, "BPMN_ADMIN_TRANSFER", "管理员转交", Lists.newArrayList());


    public int getOrder() {
        return order;
    }

    public String getBtnKey() {
        return btnKey;
    }

    public String getBtnName() {
        return btnName;
    }

    public List<BusinessTypeEnum> getSupportBizType() {
        return supportBizType;
    }

    private final int order;
    private final String btnKey;
    private final String btnName;
    private final List<BusinessTypeEnum> supportBizType;


    BpmnButtonEnum(int order, String btnKey, String btnName, List<BusinessTypeEnum> supportBizType) {
        this.order = order;
        this.btnKey = btnKey;
        this.btnName = btnName;
        this.supportBizType = supportBizType;
    }

}
