"use strict";exports.__esModule=!0,exports.default=setTitle,exports.goBackBtnEnum=void 0;var goBackBtnEnum,_invoker=_interopRequireWildcard(require("./invoker"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_getRequireWildcardCache=function(e){return e?n:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_getRequireWildcardCache(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(i,o,a):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}function setTitleHandler(e,t){var n=t.resolve,i=t.reject,r=t.context,o=t.containerType,a=t.appType,l=t.platformType;if(o){var u=function(e){_invoker.default.handleBridgeResponse(e,n,i)},c=function(e){_invoker.default.handleBridgeResponse(e,n,i)};a===_invoker.API_INVOKER_TYPE.MINI_APP?r&&r({m:"biz.navigation.setTitle",args:e,onSuccess:u,onFail:c}):l===_invoker.PLATFORM_TYPE_ENUM.ANDROID?r&&r(u,c,"biz.navigation","setTitle",e):l===_invoker.PLATFORM_TYPE_ENUM.IOS&&r.callHandler("biz.navigation.setTitle",Object.assign({},e),(function(e){_invoker.default.handleBridgeResponse(e,n,i)}))}else r&&r.call("setTitle",e,(function(){n()}))}function setTitle(e){return _invoker.default.invoke("setTitle",e)}exports.goBackBtnEnum=goBackBtnEnum,function(e){e.TRUE="true",e.FALSE="false"}(goBackBtnEnum||(exports.goBackBtnEnum=goBackBtnEnum={})),_invoker.default.registerAPI("setTitle",{mini:setTitleHandler,mobile:setTitleHandler,pc:function(e,t){window.dingtalk.platform.invokeAPI(t.msgId,"biz.navigation.setTitle",e)}}),setTitle.version={android:"1.2.0",ios:"1.2.0",pc:"1.2.0"};