package in.techware.carrefour.util.menuUtils;

import in.techware.carrefour.R;
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 OrderMenuUtil {

    public static final String CODE_NEW_ORDER = "1";
    public static final String CODE_GET_ORDER = "2";
    public static final String CODE_RESTORE = "3";
    public static final String CODE_EXIT = "4";

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

    public static String getFileName(MenuBean menuBean, int type) {
        switch (menuBean.getCode()) {
            case OrderMenuUtil.CODE_NEW_ORDER:
                return AppConstants.addWorkFolderPrefix(AppConstants.FILE_PREFIX_ORDER);
            case OrderMenuUtil.CODE_GET_ORDER:
                return AppConstants.addReceivedFolderPrefix(AppConstants.FILE_PREFIX_ORDER);
            case OrderMenuUtil.CODE_RESTORE:
                return AppConstants.addSentFolderPrefix(AppConstants.FILE_PREFIX_ORDER);
            case OrderMenuUtil.CODE_EXIT:
            default:
                return "";
        }
    }
}
