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