"use strict";exports.__esModule=!0;var env_1=require("../env"),h5Event_1=require("./h5Event"),weexEvent_1=require("./weexEvent"),h5PcEvent_1=require("./h5PcEvent"),uniBridgeV2_1=require("./uniBridgeV2"),env=env_1.getENV(),NOT_SUPPORT_MSG="Not support uni event in the platfrom: "+env.platform+", appType: "+env.appType;exports.uniEventOn=function(e,n){uniBridgeV2_1.getUniBridge().then(function(){switch(env.platform){case env_1.ENV_ENUM.ios:case env_1.ENV_ENUM.android:switch(env.appType){case env_1.APP_TYPE.WEB:return h5Event_1.on(e,n);case env_1.APP_TYPE.WEEX:return weexEvent_1.on(e,n);default:throw new Error(NOT_SUPPORT_MSG)}case env_1.ENV_ENUM.pc:if(env.appType===env_1.APP_TYPE.WEB)return h5PcEvent_1.on(e,n);throw new Error(NOT_SUPPORT_MSG);default:throw new Error(NOT_SUPPORT_MSG)}})},exports.uniEventOff=function(e,n){uniBridgeV2_1.getUniBridge().then(function(){switch(env.platform){case env_1.ENV_ENUM.ios:case env_1.ENV_ENUM.android:switch(env.appType){case env_1.APP_TYPE.WEB:return h5Event_1.off(e,n);case env_1.APP_TYPE.WEEX:return weexEvent_1.off(e,n);default:throw new Error(NOT_SUPPORT_MSG)}case env_1.ENV_ENUM.pc:if(env.appType===env_1.APP_TYPE.WEB)return h5PcEvent_1.off(e,n);throw new Error(NOT_SUPPORT_MSG);default:throw new Error(NOT_SUPPORT_MSG)}})};