package com.baoshi.swms.bean;

import android.util.ArrayMap;

import com.baoshi.swms.MainActivity;
import com.baoshi.swms.R;
import com.baoshi.swms.activity.BatchRecoverActivity;
import com.baoshi.swms.activity.CheckInventoryActivity;
import com.baoshi.swms.activity.PickingActivity;
import com.baoshi.swms.activity.PieceworkActivity;
import com.baoshi.swms.activity.WaybillDispatchActivity;

import java.util.HashMap;

/**
 * 菜单实体
 *
 * @author Zhendong Zhou
 * @date 2021/12/3 17:21
 */
public class Menu {
    public Class<?> reference;
    public int icon;

    public Menu(Class<?> reference,int icon){
        this.reference = reference;
        this.icon = icon;
    }
    public Menu(int icon){
        this.icon = icon;
    }

    public static ArrayMap<String, HashMap<String, Menu>> getMenuNeedVerifyList(){
        ArrayMap<String, HashMap<String, Menu>> menuMap = new ArrayMap<>();
        menuMap.put("收货", new HashMap<String, Menu>() {{
            put("icon", new Menu(R.drawable.ic_baseline_login_24));

            put("盲收", new Menu(MainActivity.class,R.drawable.truck));
            put("盘收一体", new Menu(MainActivity.class,R.drawable.truck));
            put("快速入库", new Menu(MainActivity.class,R.drawable.truck));
            put("收货", new Menu(MainActivity.class,R.drawable.truck));
        }});
        menuMap.put("订单管理", new HashMap<String, Menu>() {{
            put("icon", new Menu(R.drawable.ic_baseline_calendar_today_24));

            put("波次恢复", new Menu(BatchRecoverActivity.class,R.drawable.ic_baseline_camera_24));
        }});
        menuMap.put("运输管理", new HashMap<String, Menu>() {{
            put("icon", new Menu(R.drawable.truck));

            put("调度", new Menu(WaybillDispatchActivity.class,R.drawable.truck));
        }});
        menuMap.put("包裹管理", new HashMap<String, Menu>() {{
            put("手动录入", new Menu(MainActivity.class,R.drawable.truck));
        }});
        menuMap.put("库存管理", new HashMap<String, Menu>() {{
            put("icon", new Menu(R.drawable.ic_inventory));

            put("盘点", new Menu(CheckInventoryActivity.class,R.drawable.ic_check_inventory));
        }});
        menuMap.put("缓存架", new HashMap<String, Menu>() {{
            put("入库", new Menu(MainActivity.class,R.drawable.truck));
            put("容器", new Menu(MainActivity.class,R.drawable.truck));
        }});
        return menuMap;
    }

    public static ArrayMap<String, HashMap<String, Menu>> getMenuNotNeedVerifyList(){
        ArrayMap<String, HashMap<String, Menu>> menuMap = new ArrayMap<>();
        menuMap.put("仓库人工", new HashMap<String, Menu>() {{
            put("icon", new Menu(R.drawable.ic_baseline_home_work_24));

            put("计件宝", new Menu(PieceworkActivity.class,R.drawable.ic_baseline_bookmarks_24));
            put("拣货", new Menu(PickingActivity.class,R.drawable.ic_picking));
        }});
        menuMap.put("库存管理", new HashMap<String, Menu>() {{
            put("icon", new Menu(R.drawable.ic_inventory));

            put("盘点", new Menu(CheckInventoryActivity.class,R.drawable.ic_check_inventory));
        }});
        return menuMap;
    }
}
