package in.techware.carrefour.util.menuUtils;

import java.util.ArrayList;

import in.techware.carrefour.R;
import in.techware.carrefour.app.App;
import in.techware.carrefour.model.MenuBean;
import in.techware.carrefour.model.MenuListBean;
import in.techware.carrefour.util.AppConstants;

/**
 * Created by Jemsheer K D on 14 July, 2018.
 * Package in.techware.carrefour.util.menuUtils
 * Project Carrefour
 */
public class MerchandiseMenuUtil {

    public static final String CODE_ITEM_LIST = "1";
    public static final String CODE_PRINT_LABELS = "2";
    public static final String CODE_EXIT = "3";

    public static MenuListBean getAllMenu() {
        return BaseMenuUtil.getAllMenu(R.array.menu_merchandise);
    }

    public static String getFileName(MenuBean menuBean, int type) {
        switch (menuBean.getCode()) {
            case MerchandiseMenuUtil.CODE_ITEM_LIST:
                return AppConstants.addWorkFolderPrefix(AppConstants.FILE_PREFIX_ITEM_LIST);
            case MerchandiseMenuUtil.CODE_PRINT_LABELS:
                if (type == AppConstants.LABEL_TYPE_SHELF_LABEL) {
                    return AppConstants.addWorkFolderPrefix(AppConstants.FILE_PREFIX_SHELF_LABEL);
                } else if (type == AppConstants.LABEL_TYPE_IT_LABEL) {
                    return AppConstants.addWorkFolderPrefix(AppConstants.FILE_PREFIX_IT_LABEL);
                } else {
                    return AppConstants.addWorkFolderPrefix(AppConstants.FILE_PREFIX_INVENTORY_LABEL);
                }
            case MerchandiseMenuUtil.CODE_EXIT:
            default:
                return "";
        }
    }
}
