OCDevManagePlatformServicesMigrationToolExclusionsSelector.react",["fbt","AbstractRelaySearchSource","GeoBaseSearchableSelectorItem.react","GeoPill.react","GeoSearchableMultiSelector.react","OCDevManagePlatformServices","OCDevManagePlatformServicesMigrationToolExclusionsSelectorCurrentSelectedItemsSearchSourceQuery.graphql","OCDevManagePlatformServicesMigrationToolExclusionsSelectorPlatformServiceItemsSearchSourceQuery.graphql","RelayHooks","SearchableEntry","XOCPlatformService.oculus","getDisabledProps","react","sumOfArray"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react"));e=k;var m=e.useMemo,n=e.useState;function a(a){var b=a.excludedItemIDs,e=a.onChangeExcludedItemIDs,f=a.servicesToMigrate,g=a.sourceApplicationIDs;a=n("");var i=a[0],j=a[1],k=d("RelayHooks").useRelayEnvironment();a=m(function(){return new q(k,g,f)},[k,f,g]);var o=m(function(){return new r(k,b)},[k,b]);function p(){if(f.length===0)return h._(/*BTDS*/"Select a service before adding exclusions");if(g.length===0)return h._(/*BTDS*/"Select at least one source application before adding exclusions")}return l.jsx(c("GeoSearchableMultiSelector.react"),babelHelpers["extends"]({},c("getDisabledProps")(p()),{buttonLabelRenderer:function(){return h._(/*BTDS*/{"*":"{count} items selected","_1":"{count} item selected"},[h._plural(b.length),h._param("count",b.length)])},description:h._(/*BTDS*/"Search across all selected services for items that you wish to exclude from the migration"),emptySearchResultsContent:h._(/*BTDS*/"No results"),isOptional:!0,label:h._(/*BTDS*/"Excluded items"),searchSource:i===""?o:a,value:b.map(function(a){return new(c("SearchableEntry"))({title:"",uniqueID:a})}),onChange:function(a){return e(a.map(function(a){return a.getUniqueID()}))},onClose:function(){return j("")},onQueryChange:j,children:function(a){var b=c("XOCPlatformService.oculus").cast(a.getType());return l.jsx(c("GeoBaseSearchableSelectorItem.react"),{badge:b!=null?l.jsx(c("GeoPill.react"),{label:"",value:d("OCDevManagePlatformServices").getPlatformServiceConfiguration(b).displayNameSingular}):null,description:a.getSubtitle(),label:a.getTitle()})}}))}a.displayName=a.name+" [from "+f.id+"]";function o(a){var b=a.nodes;a=a.xoc_platform_service_item_search;return(a=((a=a==null?void 0:a.nodes)!=null?a:[]).concat(b!=null?b:[]).map(function(a){var b=a.api_name,d=a.display_name,e=a.id;a=a.platform_service;return e!=null&&a!=null?new(c("SearchableEntry"))({subtitle:(b!=null?b:"")!==""?h._(/*BTDS*/"{prefix}: {api-name}",[h._param("prefix",a==="ADD_ONS"?"SKU":"API Name"),h._param("api-name",b)]):null,title:(b=d!=null?d:b)!=null?b:"--",type:a,uniqueID:e,order:c("sumOfArray")(Array.from(d!=null?d:"").map(function(a){return a.charCodeAt(0)}))}):null}).filter(Boolean))!=null?a:[]}var p={debounceAmount:500,getAllForEmptyQuery:!1,packageFn:o},q=function(c){function a(a,d,e){var f=function(a){return{query:i!==void 0?i:i=b("OCDevManagePlatformServicesMigrationToolExclusionsSelectorPlatformServiceItemsSearchSourceQuery.graphql"),variables:{applicationIDs:d,queryString:a,services:e}}};return c.call(this,a,babelHelpers["extends"]({},p,{bootstrapRequests:[{gen:f}],queryRequests:[{gen:f}]}),o)||this}babelHelpers.inheritsLoose(a,c);return a}(c("AbstractRelaySearchSource")),r=function(c){function a(a,d){var e=function(a){return{query:j!==void 0?j:j=b("OCDevManagePlatformServicesMigrationToolExclusionsSelectorCurrentSelectedItemsSearchSourceQuery.graphql"),variables:{excludedItemIDs:d}}};return c.call(this,a,babelHelpers["extends"]({},p,{bootstrapRequests:[{gen:e}],queryRequests:[{gen:e}]}),o)||this}babelHelpers.inheritsLoose(a,c);return a}(c("AbstractRelaySearchSource"));g["default"]=a}),226);
-----