import _extends from"@babel/runtime/helpers/extends";import invoker,{API_INVOKER_TYPE,PLATFORM_TYPE_ENUM}from"./invoker";function popWindow(e,n){var o=n.resolve,i=n.reject,a=n.context,r=n.containerType,s=n.appType,t=n.platformType;if(r){var l=function(e){invoker.handleBridgeResponse(e,o,i)},p=function(e){invoker.handleBridgeResponse(e,o,i)};s===API_INVOKER_TYPE.MINI_APP?a&&a({m:"biz.navigation.close",args:e,onSuccess:l,onFail:p}):t===PLATFORM_TYPE_ENUM.ANDROID?a&&a(l,p,"biz.navigation","close",e):t===PLATFORM_TYPE_ENUM.IOS&&a.callHandler("biz.navigation.close",Object.assign({},e),(function(e){invoker.handleBridgeResponse(e,o,i)}))}else a&&a.call("popWindow",e,(function(e){invoker.handleBridgeResponse(e,o,i)}))}invoker.registerAPI("closePage",{mini:popWindow,mobile:popWindow,pc:function(e,n){window.dingtalk.platform.invokeAPI(n.msgId,"biz.navigation.quit",e)}}),closePage.version={android:"1.2.0",ios:"1.2.0",pc:"1.2.0"};export default function closePage(e){return invoker.invoke("closePage",_extends({},e,{_apiName:"closePage"}))}