import invoker,{PLATFORM_TYPE_ENUM}from"./invoker";function setNavIconHandler(n,e){var o=e.resolve,t=e.reject,i=e.containerType,c=e.platformType,a=e.context;if(i){c===PLATFORM_TYPE_ENUM.ANDROID?a&&a((function(e){n.onSuccess&&n.onSuccess(),o()}),(function(n){t()}),"biz.navigation","setIcon",n):c===PLATFORM_TYPE_ENUM.IOS&&a.callHandler("biz.navigation.setIcon",Object.assign({},n),(function(n){o()}))}else a&&a.call("setNavIcon",n,(function(n){o()}))}invoker.registerAPI("setNavIcon",{mobile:setNavIconHandler}),setNavIcon.version={android:"1.3.0",ios:"1.3.0"};export default function setNavIcon(n){return invoker.invoke("setNavIcon",n)}