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.DeviceIdConfigConstact;
import cn.net.caoyao.cpzshandset.service.presenter.SettingConstact;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.chinatex.ChinatexDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.chinatex.ChinatexSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.common.CommonDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.common.CommonSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.commonEgg.CommonEggDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.commonEgg.CommonEggSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.commonfarmers.CommonFarmersDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.commonfarmers.CommonFarmersSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.counter.CounterDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.counter.CounterSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.kia.KIADeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.kia.KIASettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.liqueur.LiqueurDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.liqueur.LiqueurSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.liqueurSFY.LiqueurSFYDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.liqueurSFY.LiqueurSFYSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.medicineXY.MedicineXYDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.medicineXY.MedicineXYSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.seeds.SeedsDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.seeds.SeedsSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.sheepEx.SheepExDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.sheepEx.SheepExSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.yth.YthDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.yth.YthSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythImage.YthImageDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythImage.YthImageSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythLogin.YthLoginDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythLogin.YthLoginSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythPunit.YthPunitDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythPunit.YthPunitSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythScanner.YthScannerDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.ythScanner.YthScannerSettingPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.yunCar.YunCarDeviecIdConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.setting.yunCar.YunCarSettingPresenter;

public class SettingConfigCreateTools {
	/**
	 * 创建设置的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param configView
	 * @param intent
	 * @return
	 */
	public SettingConstact.Presenter createSettingPresenter(int handsetVersionMode, Context context,
			SettingConstact.View settingView, Intent intent) {
		SettingConstact.Presenter presenter = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonSettingPresenter(settingView, context);
			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 SeedsSettingPresenter(settingView, context);
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			presenter = new YthSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			presenter = new YthImageSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_CHINATEX_VERSION_MODE:
			presenter = new ChinatexSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginSettingPresenter(settingView, context,intent);
			break;
		case HandsetVersionConstant.HANDSET_SHEEP_EXCHANGE_CARGO:
			//羊老大  调货
			presenter = new SheepExSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			presenter = new YthScannerSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			//白酒
			presenter = new LiqueurSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_MEDICINE_XY_VERSION_MODE:
			//上药追溯
			presenter = new MedicineXYSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_COUNTER_VERSION_MODE:
			//专柜终端
			presenter = new CounterSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			presenter = new CommonFarmersSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			presenter = new YthPunitSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//武汉世方御养生酒业有限公司
			presenter = new LiqueurSFYSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_YUN_CAR_VERSION_MODE:
			presenter = new YunCarSettingPresenter(settingView, context);
			break;
		case HandsetVersionConstant.HANDSET_KIA_PRODUCT_LINE_VERSION_MODE:
			presenter = new KIASettingPresenter(settingView, context);
			break;	
			
		}
		return presenter;
	}
	
	/**
	 * 创建配置设备id的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param configView
	 * @param intent
	 * @return
	 */
	public DeviceIdConfigConstact.Presenter createDeviceIdConfigPresenter(int handsetVersionMode, Context context,
			DeviceIdConfigConstact.View dView, Intent intent) {
		DeviceIdConfigConstact.Presenter presenter = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonDeviecIdConfigPresenter(dView, context);
			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 SeedsDeviecIdConfigPresenter(dView, context);
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			presenter = new YthDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			presenter = new YthImageDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_CHINATEX_VERSION_MODE:
			presenter = new ChinatexDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_SHEEP_EXCHANGE_CARGO:
			//羊老大   调货
			presenter = new SheepExDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			presenter = new YthScannerDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			presenter = new LiqueurDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_MEDICINE_XY_VERSION_MODE:
			//上药追溯
			presenter = new MedicineXYDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_COUNTER_VERSION_MODE:
			//专柜终端
			presenter = new CounterDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版
			presenter = new CommonFarmersDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			presenter = new YthPunitDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//武汉世方御养生酒业有限公司
			presenter = new LiqueurSFYDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_YUN_CAR_VERSION_MODE:
			//云南汽配
			presenter = new YunCarDeviecIdConfigPresenter(dView, context);
			break;
		case HandsetVersionConstant.HANDSET_KIA_PRODUCT_LINE_VERSION_MODE:
			//起亚
			presenter = new KIADeviecIdConfigPresenter(dView, context);
			break;	
		}
		return presenter;
	}
}
