OCDevManageWorldsCreatorPerformanceNewCollectionDialog.react",["fbt","CometRelay","GeoButton.react","GeoCancelButton.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoTextArea.react","GeoTextInput.react","GeoToast.react","GeoVStack.react","OCDevManageWorldsCollectionAddReports.react","OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation.graphql","OCDevManageWorldsPlaytestReportContext","Promise","asyncToGeneratorRuntime","geoMargin","react","useGeoToaster","uuidv4"],(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.useCallback,n=e.useContext,o=e.useEffect,p=e.useState;function a(a){var e=a.editCollectionID,f=a.isShown,g=a.setHidden;a=n(d("OCDevManageWorldsPlaytestReportContext").OCDevManageWorldsPlaytestReportContext);var i=a.editCollectionData,j=a.isEditing,k=a.onStopEditing,r=a.refetchCollections;a=a.reports;var s=c("useGeoToaster")(),t=s.add,u=d("CometRelay").useRelayEnvironment();s=p((s=i==null?void 0:i.name)!=null?s:"");var v=s[0],w=s[1];s=p((s=i==null?void 0:i.description)!=null?s:"");var x=s[0],y=s[1];s=p((s=i==null?void 0:i.reportIds)!=null?s:[]);var z=s[0];s=s[1];o(function(){var a;w((a=i==null?void 0:i.name)!=null?a:"");y((a=i==null?void 0:i.description)!=null?a:"")},[i]);var A=m(function(){k(),w(""),y(""),g()},[k,g]),B=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(){var a={collectionId:j?i==null?void 0:i.collectionId:void 0,description:x,name:v,reportIds:z};e!=null&&(a.collectionId=e);yield q({collection:a,environment:u});r&&r();t(l.jsx(c("GeoToast.react"),{hasIcon:!0,heading:j?"Folder edited successfully":"Folder created successfully",status:"success"}));A()});return function(){return a.apply(this,arguments)}}();return l.jsx(c("GeoModal.react"),{footer:l.jsx(c("GeoModalFooter.react"),{primaryButton:l.jsx(c("GeoButton.react"),{label:h._(/*BTDS*/"Save"),variant:"primary",onClick:B}),secondaryButton:l.jsx(c("GeoCancelButton.react"),{"data-testid":void 0})}),header:l.jsx(c("GeoModalHeader.react"),{heading:h._(/*BTDS*/"Create New Folder")}),isShown:f,onHide:A,children:l.jsxs(c("GeoVStack.react"),{xstyle:[c("geoMargin").bottom16,c("geoMargin").horiz16],children:[l.jsx(c("GeoTextInput.react"),{"data-testid":void 0,label:h._(/*BTDS*/"Name"),placeholder:h._(/*BTDS*/"What is your folder called?"),value:v,onChange:w}),l.jsx(c("GeoTextArea.react"),{"data-testid":void 0,isOptional:!0,label:h._(/*BTDS*/"Description"),placeholder:h._(/*BTDS*/"What kinds of reports are in your folder?"),value:x,onChange:y}),l.jsx(c("OCDevManageWorldsCollectionAddReports.react"),{curReportIds:(B=i==null?void 0:i.reportIds)!=null?B:[],reports:a,onUpdateReportIds:s})]})})}a.displayName=a.name+" [from "+f.id+"]";function q(a){var e=a.collection,f=a.environment;return new(j||(j=b("Promise")))(function(a,g){return d("CometRelay").commitMutation(f,{mutation:i!==void 0?i:i=b("OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation.graphql"),onCompleted:a,onError:g,variables:{input:{client_mutation_id:c("uuidv4")(),collection_id:e.collectionId,description:e.description,name:e.name,report_ids:e.reportIds}}})})}g["default"]=a}),226);
-----
OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],b=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"XFBUpsertHorizonPlaytestReportCollectionResponsePayload",kind:"LinkedField",name:"xfb_upsert_horizon_playtest_report_collection",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBHorizonPlaytestReportCollection",kind:"LinkedField",name:"horizon_playtest_report_collection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation",selections:b,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation",selections:b},params:{id:"24570344025886586",metadata:{},name:"OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
-----
OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],b=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"XFBUpsertHorizonPlaytestReportCollectionResponsePayload",kind:"LinkedField",name:"xfb_upsert_horizon_playtest_report_collection",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBHorizonPlaytestReportCollection",kind:"LinkedField",name:"horizon_playtest_report_collection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation",selections:b,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation",selections:b},params:{id:"24570344025886586",metadata:{},name:"OCDevManageWorldsCreatorPerformanceNewCollectionDialogMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----