package aicare.net.cn.sdk.ailinksdkdemoandroid.home;

import java.util.List;
import java.util.Locale;

/**
 * 说明：
 *
 * @author yesp
 * 2024/1/5
 */
public class JumpBean {

    private int itemType;
    private List<Integer> itemTypeList;
    /**
     * cid
     */
    private int cid;
    /**
     * 显示名称
     */
    private int itemNameResId;
    /**
     * 需要单独跳转的 Activity, null 表示不需要跳转
     */
    private Class<?> jumpActivityClass;

    /**
     * 目的跳转的 Activity
     */
    private Class<?> targetActivityClass;

    public JumpBean(int itemType, int itemNameResId, Class<?> jumpActivityClass, Class<?> targetActivityClass) {
        this.itemType = itemType;
        this.cid = itemType;
        this.itemNameResId = itemNameResId;
        this.jumpActivityClass = jumpActivityClass;
        this.targetActivityClass = targetActivityClass;
    }

    public JumpBean(int itemType, int cid, int itemNameResId, Class<?> jumpActivityClass, Class<?> targetActivityClass) {
        this.itemType = itemType;
        this.cid = cid;
        this.itemNameResId = itemNameResId;
        this.jumpActivityClass = jumpActivityClass;
        this.targetActivityClass = targetActivityClass;
    }

    public int getItemType() {
        return itemType;
    }

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public int getItemNameResId() {
        return itemNameResId;
    }

    public void setItemNameResId(int itemNameResId) {
        this.itemNameResId = itemNameResId;
    }

    public Class<?> getJumpActivityClass() {
        return jumpActivityClass;
    }

    public void setJumpActivityClass(Class<?> jumpActivityClass) {
        this.jumpActivityClass = jumpActivityClass;
    }

    public Class<?> getTargetActivityClass() {
        return targetActivityClass;
    }

    public void setTargetActivityClass(Class<?> targetActivityClass) {
        this.targetActivityClass = targetActivityClass;
    }

    public int getCid() {
        return cid;
    }

    public String getCidStr() {
        String format = String.format(Locale.US, "0x%02X", cid);
        return format;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }
}
