OCDevManagePlayerVariablesShareModal.react",["fbt","ix","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoModalCard.react","GeoModalFooter.react","GeoModalHeader.react","GeoSection.react","OCDevManagePlayerVariablesSelectApplicationList.react","OCDevManagePlayerVariablesShareModalMutation.graphql","OCDevManagePlayerVariablesShareModalQuery.graphql","OCDevUIDebouncedTextInput.react","OCDevUIForm.react","fbicon","react","useOCDevManageRouteParams","useOCDevUICommitMutation","useOCDevUIQuery"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m=l||(l=d("react")),n=l.useState,o=h._(/*BTDS*/"Search for worlds");function a(a){var e=a.onCancel,f=a.sharedIds,g=a.variableId;a=c("useOCDevManageRouteParams")();a=a.applicationID;var l=c("useOCDevUICommitMutation")(j!==void 0?j:j=b("OCDevManagePlayerVariablesShareModalMutation.graphql"));a=c("useOCDevUIQuery")(k!==void 0?k:k=b("OCDevManagePlayerVariablesShareModalQuery.graphql"),{applicationID:a!=null?a:"",with_permissions:["VIEW_APPLICATION","HORIZON_PERSISTENT_VARIABLE"]});var p=n([]),q=p[0],r=p[1];p=n("");var s=p[0];p=p[1];a=((a=a==null?void 0:(a=a.node)==null?void 0:(a=a.organization)==null?void 0:(a=a.applications)==null?void 0:a.nodes)!=null?a:[]).filter(function(a){return!f.includes(a.id)});a=s===""?[]:a.filter(function(a){return(a=a.name)==null?void 0:a.toLowerCase().includes(s.toLowerCase())});function t(a){r(function(b){return b.includes(a)?b.filter(function(b){return b!==a}):[].concat(b,[a])})}return m.jsx(c("OCDevUIForm.react"),{children:m.jsx(c("GeoModalCard.react"),{footer:m.jsx(c("GeoModalFooter.react"),{primaryButton:m.jsx(c("GeoButton.react"),{"data-testid":void 0,isDisabled:q.length===0,label:h._(/*BTDS*/"Share with Selected World(s)"),variant:"primary",onClick:function(){return l({input:{stat_id:g,apps_to_share_with:q}},{closeModalOnSuccess:!0,successToast:{heading:h._(/*BTDS*/"Persistent variable shared"),description:h._(/*BTDS*/"The variable can now be accessed by the selected worlds")}})}}),secondaryButton:m.jsx(c("GeoCancelButton.react"),{"data-testid":void 0,onClick:e})}),header:m.jsx(c("GeoModalHeader.react"),{heading:h._(/*BTDS*/"Add Worlds")}),children:m.jsx(c("GeoSection.react"),{children:m.jsxs(c("GeoFlexbox.react"),{direction:"column",gap:16,children:[m.jsx(c("OCDevUIDebouncedTextInput.react"),{"data-testid":void 0,icon:d("fbicon")._(i("491285"),16),isLabelHidden:!0,label:o,placeholder:o,value:s,onChange:p}),a.length>0&&m.jsx(c("OCDevManagePlayerVariablesSelectApplicationList.react"),{applications:a,selectedApplicationIds:q,toggleSelectedApp:t})]})})})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
-----