import invoker,{API_INVOKER_TYPE,PLATFORM_TYPE_ENUM}from"./invoker";function hideTitlebarHandler(i,e){var n=e.resolve,a=e.reject,r=e.containerType,o=e.platformType,t=e.appType,l=e.context,d=Object.assign(i,{hidden:!0});if(r){var c=function(){i.onSuccess&&i.onSuccess(),n()},T=function(){i.onFail&&i.onFail(),a()};t===API_INVOKER_TYPE.MINI_APP?l&&l({m:"biz.navigation.hideBar",args:d,onSuccess:c,onFail:T}):o===PLATFORM_TYPE_ENUM.ANDROID?l&&l(c,T,"biz.navigation","hideBar",d):o===PLATFORM_TYPE_ENUM.IOS&&l.callHandler("biz.navigation.hideBar",Object.assign({},d),(function(){n()}))}else l&&l.call("hideTitlebar",d,(function(){n()}))}invoker.registerAPI("hideTitlebar",{mini:hideTitlebarHandler,mobile:hideTitlebarHandler}),hideTitleBar.version={android:"2.1.0",ios:"2.1.0"};export default function hideTitleBar(){return invoker.invoke("hideTitlebar")}