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