"use strict";exports.__esModule=!0,exports.default=showTitleBar;var _invoker=_interopRequireWildcard(require("./invoker"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(i,o,a):i[o]=e[o]}return i.default=e,t&&t.set(e,i),i}function showTitlebarHandler(e,r){var t=r.resolve,i=r.reject,n=r.containerType,o=r.platformType,a=r.appType,l=r.context,u=Object.assign(e,{hidden:!1});if(n){var c=function(){e.onSuccess&&e.onSuccess(),t()},s=function(){e.onFail&&e.onFail(),i()};a===_invoker.API_INVOKER_TYPE.MINI_APP?l&&l({m:"biz.navigation.hideBar",args:u,onSuccess:c,onFail:s}):o===_invoker.PLATFORM_TYPE_ENUM.ANDROID?l&&l(c,s,"biz.navigation","hideBar",u):o===_invoker.PLATFORM_TYPE_ENUM.IOS&&l.callHandler("biz.navigation.hideBar",Object.assign({},u),(function(){t()}))}else l&&l.call("showTitlebar",u,(function(){t()}))}function showTitleBar(){return _invoker.default.invoke("showTitlebar")}_invoker.default.registerAPI("showTitlebar",{mini:showTitlebarHandler,mobile:showTitlebarHandler}),showTitleBar.version={android:"2.1.0",ios:"2.1.0"},module.exports=exports.default,module.exports.default=exports.default;