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