import invoker,{API_INVOKER_TYPE,PLATFORM_TYPE_ENUM}from"./invoker";function chooseContactHandler(e,n){var t=n.resolve,r=n.reject,o=n.context,a=n.containerType,i=n.appType,c=n.platformType;if(a){var s=function(e){invoker.handleBridgeResponse(e,t,r)},l=function(e){invoker.handleBridgeResponse(e,t,r)};i===API_INVOKER_TYPE.MINI_APP?o&&o({m:"taurus.common.bizContactDepartmentsPickerExternal",args:e,onSuccess:s,onFail:l}):c===PLATFORM_TYPE_ENUM.ANDROID?o&&o(s,l,"taurus.common","bizContactDepartmentsPickerExternal",e):c===PLATFORM_TYPE_ENUM.IOS&&o.callHandler("taurus.common.bizContactDepartmentsPickerExternal",Object.assign({},e),(function(e){invoker.handleBridgeResponse(e,t,r)}))}else o&&o.call("bizContactDepartmentsPickerExternal",e,(function(e){invoker.handleBridgeResponse(e,t,r)}))}invoker.registerAPI("bizContactDepartmentsPickerExternal",{mini:chooseContactHandler,mobile:chooseContactHandler,pc:function(e,n){window.dingtalk.platform.invokeAPI(n.msgId,"biz.contact.departmentsPickerEx",e)}}),bizContactDepartmentsPickerExternal.version={android:"3.0.3",ios:"3.0.3",pc:"3.0.3"};export default function bizContactDepartmentsPickerExternal(e){return invoker.invoke("bizContactDepartmentsPickerExternal",e)}