import invoker,{API_INVOKER_TYPE,PLATFORM_TYPE_ENUM}from"./invoker";export var goBackBtnEnum;function setTitleHandler(e,n){var i=n.resolve,t=n.reject,o=n.context,a=n.containerType,r=n.appType,l=n.platformType;if(a){var s=function(e){invoker.handleBridgeResponse(e,i,t)},T=function(e){invoker.handleBridgeResponse(e,i,t)};r===API_INVOKER_TYPE.MINI_APP?o&&o({m:"biz.navigation.setTitle",args:e,onSuccess:s,onFail:T}):l===PLATFORM_TYPE_ENUM.ANDROID?o&&o(s,T,"biz.navigation","setTitle",e):l===PLATFORM_TYPE_ENUM.IOS&&o.callHandler("biz.navigation.setTitle",Object.assign({},e),(function(e){invoker.handleBridgeResponse(e,i,t)}))}else o&&o.call("setTitle",e,(function(){i()}))}!function(e){e.TRUE="true",e.FALSE="false"}(goBackBtnEnum||(goBackBtnEnum={})),invoker.registerAPI("setTitle",{mini:setTitleHandler,mobile:setTitleHandler,pc:function(e,n){window.dingtalk.platform.invokeAPI(n.msgId,"biz.navigation.setTitle",e)}}),setTitle.version={android:"1.2.0",ios:"1.2.0",pc:"1.2.0"};export default function setTitle(e){return invoker.invoke("setTitle",e)}