OCDevManagePlatformServicesMigrationToolModal.react",["fbt","GeoFlexbox.react","GeoMultiSelector.react","GeoMultiSelectorItem.react","GeoSelector.react","GeoSelectorItem.react","OCDevManagePlatformServiceItemApplicationSelector.react","OCDevManagePlatformServices","OCDevManagePlatformServicesMigrationToolExclusionsSelector.react","OCDevManagePlatformServicesMigrationToolModalQuery.graphql","OCDevUIFormInputValidator.react","OCDevUIFormModalCard.react","OCDevUIValidatorCommonErrors","asyncToGeneratorRuntime","react","useOCDevManageRouteParams","useOCDevUIQuery"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k=j||(j=d("react")),l=j.useState,m=["LEADERBOARDS"];function a(){var a=c("useOCDevManageRouteParams")();a=a.applicationID;a=c("useOCDevUIQuery")(i!==void 0?i:i=b("OCDevManagePlatformServicesMigrationToolModalQuery.graphql"),{applicationID:a!=null?a:""});a=a.fetch__Application;var e=l([]),f=e[0],g=e[1];e=l([]);var j=e[0],n=e[1];e=l(!1);var o=e[0];e=e[1];var p=l([a.id].filter(Boolean)),q=p[0],r=p[1];p=l([]);var s=p[0];p=p[1];function t(){return u.apply(this,arguments)}function u(){u=b("asyncToGeneratorRuntime").asyncToGenerator(function*(){});return u.apply(this,arguments)}a=a.organization;return k.jsx(c("OCDevUIFormModalCard.react"),{heading:h._(/*BTDS*/"Platform services migration tool"),onSubmit:t,children:k.jsxs(c("GeoFlexbox.react"),{direction:"column",gap:16,children:[k.jsx(c("OCDevUIFormInputValidator.react"),{validateField:function(){return j.length===0?d("OCDevUIValidatorCommonErrors").REQUIRED_FIELD_ERROR_MESSAGE:null},children:k.jsx(c("GeoMultiSelector.react"),{hasSelectAll:!0,label:h._(/*BTDS*/"Services to migrate"),value:j,onChange:function(a){return n(function(b){b.length>a.length&&g([]);return a})},children:m.map(function(a){return k.jsx(c("GeoMultiSelectorItem.react"),{label:d("OCDevManagePlatformServices").getPlatformServiceConfiguration(a).displayName,value:a},a)})})}),k.jsxs(c("GeoSelector.react"),{label:h._(/*BTDS*/"Migration type"),value:o,onChange:e,children:[k.jsx(c("GeoSelectorItem.react"),{label:h._(/*BTDS*/"Share with target applications"),value:!1}),k.jsx(c("GeoSelectorItem.react"),{label:h._(/*BTDS*/"Unshare from target applications"),value:!0})]}),k.jsxs(c("GeoFlexbox.react"),{gap:16,children:[k.jsx(c("OCDevManagePlatformServiceItemApplicationSelector.react"),{allowDeselectSidenavApp:!0,description:h._(/*BTDS*/"Platform service items shared with any selected app will be migrated"),label:h._(/*BTDS*/"Source applications"),organization:a,validateField:function(){return q.length===0?d("OCDevUIValidatorCommonErrors").REQUIRED_FIELD_ERROR_MESSAGE:null},value:q,onChange:function(a){return r(function(b){b.length>a.length&&g([]);return a})}}),k.jsx(c("OCDevManagePlatformServiceItemApplicationSelector.react"),{allowDeselectSidenavApp:!0,description:o?h._(/*BTDS*/"Migrated platform service items will be unshared with all selected apps"):h._(/*BTDS*/"Migrated platform service items will be shared with all selected apps"),label:h._(/*BTDS*/"Target applications"),organization:a,validateField:function(){return q.length===0?d("OCDevUIValidatorCommonErrors").REQUIRED_FIELD_ERROR_MESSAGE:null},value:s,onChange:p})]}),k.jsx(c("OCDevManagePlatformServicesMigrationToolExclusionsSelector.react"),{excludedItemIDs:f,servicesToMigrate:j,sourceApplicationIDs:q,onChangeExcludedItemIDs:g})]})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
-----