package cn.net.caoyao.cpzshandset.service.presenter.tools;

import android.content.Context;
import android.content.Intent;
import cn.net.caoyao.cpzshandset.common.config.HandsetVersionConstant;
import cn.net.caoyao.cpzshandset.service.presenter.HomeConstact;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.chinatex.ChinatexHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.common.CommonHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.commonEgg.CommonEggHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.commonfarmers.CommonFarmersHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.counter.CounterHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.jinLine.JinLineHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.jinLiquor.JinLiquorHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.kia.KIAHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.liqueur.LiqueurHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.liqueurSFY.LiqueurSFYHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.medicineXY.MedicineXYHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.seeds.SeedsHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.sheepEx.SheepExHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.yth.YthHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.ythImage.YthImageHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.ythLogin.YthLoginHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.ythPunit.YthPunitHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.ythScanner.YthScannerHomePresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.home.yunCar.YunCarHomePresenter;

public class HomeConfigCreateTools {
	/**
	 * 获取首页的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public HomeConstact.Presenter createHomePresenter(int handsetVersionMode, Context context,
			HomeConstact.View homeView, Intent intent) {
		HomeConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_RICE_VERSION_MODE:
			// 大米
			break;
		case HandsetVersionConstant.HANDSET_HOLOTHURIAN_VERSION_MODE:
			// 海参
			break;
		case HandsetVersionConstant.HANDSET_WINE_TERMINAL_VERSION_MODE:
			// 酒终端
			break;
		case HandsetVersionConstant.HANDSET_WINE_DEALER_VERSION_MODE:
			// 酒经销商
			break;
		case HandsetVersionConstant.HANDSET_FIRE_EXTINGUISHER_VERSION_MODE:
			// 灭火器
			break;
		case HandsetVersionConstant.HANDSET_AGRICULTURAL_PRODUCTS_VERSION_MODE:
			// 农产品
			break;
		case HandsetVersionConstant.HANDSET_SEED_VERSION_MODE:
			presenter = new SeedsHomePresenter(context, homeView);
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			presenter = new YthHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			//云天化图片版
			presenter = new YthImageHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_CHINATEX_VERSION_MODE:
			//中纺
			presenter = new ChinatexHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginHomePresenter(context, homeView,intent);
			break;
		case HandsetVersionConstant.HANDSET_SHEEP_EXCHANGE_CARGO:
			//羊老大调货
			presenter = new SheepExHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			//云天化扫码发货
			presenter = new YthScannerHomePresenter(context, homeView, intent);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			//白酒
			presenter = new LiqueurHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_MEDICINE_XY_VERSION_MODE:
			//上药
			presenter = new MedicineXYHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_COUNTER_VERSION_MODE:
			//专柜销售
			presenter = new CounterHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			presenter = new CommonFarmersHomePresenter(context, homeView);
			break;	
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			presenter = new YthPunitHomePresenter(context, homeView, intent);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			presenter = new LiqueurSFYHomePresenter(context, homeView,intent);
			break;
		case HandsetVersionConstant.HANDSET_YUN_CAR_VERSION_MODE://汽配
			presenter = new YunCarHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_JIN_LIQUOR_VERSION_MODE:
			//劲酒
			presenter = new JinLiquorHomePresenter(context, homeView);
			break;
		case HandsetVersionConstant.HANDSET_JIN_LIQUOR_PRODUCT_LINE_VERSION_MODE:
			presenter = new JinLineHomePresenter(context, homeView);
			break;
			
		case HandsetVersionConstant.HANDSET_KIA_PRODUCT_LINE_VERSION_MODE://起亚
			presenter = new KIAHomePresenter(context, homeView);
			break;	
		}
		return presenter;
	}
}
