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