import invoker,{API_INVOKER_TYPE,PLATFORM_TYPE_ENUM}from"./invoker";function alertHandler(e,r){var n=r.resolve,o=r.reject,a=r.context,t=r.containerType,i=r.appType,l=r.platformType;if(t){var c=function(e){invoker.handleBridgeResponse(e,n,o)},s=function(e){invoker.handleBridgeResponse(e,n,o)};i===API_INVOKER_TYPE.MINI_APP?a&&a({m:"taurus.common.alert",args:e,onSuccess:c,onFail:s}):l===PLATFORM_TYPE_ENUM.ANDROID?a&&a(c,s,"taurus.common","alert",e):l===PLATFORM_TYPE_ENUM.IOS&&a.callHandler("taurus.common.alert",Object.assign({},e),(function(e){n(e)}))}else a&&a.call("alert",e,(function(){n()}))}invoker.registerAPI("alert",{mini:alertHandler,mobile:alertHandler}),alert.version={android:"1.3.2",ios:"1.3.2"};export default function alert(e){return invoker.invoke("alert",e)}