OCDevManageWorldImportOptionsSection.react",["fbt","GeoButton.react","GeoCancelButton.react","GeoCheckboxInput.react","GeoCheckboxList.react","GeoFlexbox.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoNotice.react","GeoNoticeContent.react","GeoSection.react","GeoSpinner.react","GeoText.react","GeoToast.react","HzWorldsCreatorFalcoEvent","OCDevManageWorldImportOptionsSectionMutation.graphql","geoMargin","gkx","react","useGeoToaster","useOCDevUICommitMutation","uuidv4"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u.useState;function m(t){var o=t.fromWorldID,a=t.onHide,l=t.setFromWorldID,u=t.toWorldID,m=t.userID,p=d(!1),_=p[0],f=p[1],g=d(!1),h=g[0],y=g[1],C=d(!1),b=C[0],v=C[1],S=d(!1),R=S[0],L=S[1],E=d(!1),k=E[0],I=E[1],T=r("useOCDevUICommitMutation")(e!==void 0?e:e=n("OCDevManageWorldImportOptionsSectionMutation.graphql")),D=r("gkx")("23291"),x=r("useGeoToaster")(),$=x.add;function P(){var e=r("uuidv4")();r("HzWorldsCreatorFalcoEvent").log(function(){return{action_uuid:e,context:{overwrite_snapshot:D,sync_goals:_,sync_leaderboards:h,sync_variables:b},event_type:"import",route_info:{world_id:o},source:"web",sub_event:"start",target_world_id:u,world_id:o}}),L(!0),T({input:{action_uuid:e,actor_id:m,from_world_id:o,overwrite_snapshot:D,source:"WEB",sync_goals:_,sync_leaderboards:h,sync_variables:b,to_world_id:u}}).then(function(t){var n,i;r("HzWorldsCreatorFalcoEvent").log(function(){var n;return{action_uuid:e,context:{sync_goals:_,sync_leaderboards:h,sync_variables:b},event_type:"import",route_info:{world_id:o},source:"web",sub_event:"complete",target_snapshot_id:t==null||(n=t.xfb_together_wb_world_import)==null||(n=n.world)==null||(n=n.autosave_snapshot)==null?void 0:n.id,target_world_id:u,world_id:o}});var l=(n=t==null||(i=t.xfb_together_wb_world_import)==null?void 0:i.client_error_code)!=null?n:0;l===0?($(c.jsx(r("GeoToast.react"),{heading:s._(/*BTDS*/"Import succeeded")})),a("transition")):(r("HzWorldsCreatorFalcoEvent").log(function(){return{action_uuid:e,client_error_message:"errorCode : "+l.toString(),context:{overwrite_snapshot:D,sync_goals:_,sync_leaderboards:h,sync_variables:b},event_type:"import",route_info:{world_id:o},source:"web",sub_event:"fail",target_world_id:u,world_id:o}}),$(l===1?c.jsx(r("GeoToast.react"),{heading:s._(/*BTDS*/"Import failed due to reaching world capacity."),status:"error"}):c.jsx(r("GeoToast.react"),{heading:s._(/*BTDS*/"Something went wrong. Please try again later."),status:"error"})))}).catch(function(t){$(c.jsx(r("GeoToast.react"),{heading:s._(/*BTDS*/"Something went wrong. Please try again later."),status:"error"})),r("HzWorldsCreatorFalcoEvent").log(function(){return{action_uuid:e,client_error_message:t.message,context:{overwrite_snapshot:D,sync_goals:_,sync_leaderboards:h,sync_variables:b},event_type:"import",route_info:{world_id:o},source:"web",sub_event:"fail",target_world_id:u,world_id:o}})}).finally(function(){L(!1)})}return c.jsx(r("GeoModal.react"),{footer:c.jsx(r("GeoModalFooter.react"),{primaryButton:c.jsx(r("GeoButton.react"),{isDisabled:R,label:s._(/*BTDS*/"Import into world"),variant:"primary",onClick:P}),secondaryButton:c.jsx(r("GeoCancelButton.react"),{isDisabled:R,label:s._(/*BTDS*/"Cancel")}),startContent:c.jsx(r("GeoButton.react"),{isDisabled:R,label:s._(/*BTDS*/"Back"),onClick:function(){return l("")}})}),header:c.jsx(r("GeoModalHeader.react"),{description:s._(/*BTDS*/"Importing your world will import all of its assets. You can also select which variables to import into your world. Selected variables will be added into your world and will not delete or overwrite others."),heading:s._(/*BTDS*/"Import options")}),onHide:a,children:c.jsx(r("GeoSection.react"),{children:R?c.jsx("div",{className:"x78zum5 xl56j7k",children:c.jsxs(r("GeoFlexbox.react"),{alignItems:"center",direction:"column",justifyContent:"center",children:[c.jsx(r("GeoSpinner.react"),{loggingName:i.id}),c.jsx(r("GeoFlexbox.react"),{justifyContent:"center",xstyle:r("geoMargin").top8,children:c.jsx(r("GeoText.react"),{children:s._(/*BTDS*/"Importing")})})]})}):c.jsxs("div",{className:"x1u5z0ei x1ysnsbj",children:[c.jsxs(r("GeoCheckboxList.react"),{children:[c.jsx(r("GeoCheckboxInput.react"),{description:s._(/*BTDS*/"In order to import quests, you must also give the current world access to the variable groups used in the original world."),label:s._(/*BTDS*/"Quests (includes Variable Groups)"),value:_,onChange:function(){_?I(!1):(v(!0),I(!0)),f(function(e){return!e})}}),c.jsx(r("GeoCheckboxInput.react"),{description:s._(/*BTDS*/"Selecting this will give the current world access to variable groups used in the original world, as well as the persistent variables inside."),isDisabled:k,label:s._(/*BTDS*/"Variable groups"),value:b,onChange:function(){return v(function(e){return!e})}}),c.jsx(r("GeoCheckboxInput.react"),{label:s._(/*BTDS*/"Leaderboards"),value:h,onChange:function(){return y(function(e){return!e})}})]}),c.jsx(r("GeoNotice.react"),{showIcon:!0,status:"info",xstyle:r("geoMargin").top12,children:c.jsx(r("GeoNoticeContent.react"),{children:s._(/*BTDS*/"Note: Import will override your destination world with changes from the selected world.")})})]})})})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226);
-----
OCDevManageWorldImportOptionsSectionMutation.graphql",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{kind:"Variable",name:"data",variableName:"input"}],n={alias:null,args:null,kind:"ScalarField",name:"client_error_code",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o=[r],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"update_time",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"OCDevManageWorldImportOptionsSectionMutation",selections:[{alias:null,args:t,concreteType:"XFBTogetherWbWorldImportResponsePayload",kind:"LinkedField",name:"xfb_together_wb_world_import",plural:!1,selections:[n,{alias:null,args:null,concreteType:"XFBSocialVRCustomWorld",kind:"LinkedField",name:"world",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBSocialVRCustomWorldSnapshot",kind:"LinkedField",name:"autosave_snapshot",plural:!1,selections:o,storageKey:null},{args:null,kind:"FragmentSpread",name:"OCDevManageWorldDetailsView_world"}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"OCDevManageWorldImportOptionsSectionMutation",selections:[{alias:null,args:t,concreteType:"XFBTogetherWbWorldImportResponsePayload",kind:"LinkedField",name:"xfb_together_wb_world_import",plural:!1,selections:[n,{alias:null,args:null,concreteType:"XFBSocialVRCustomWorld",kind:"LinkedField",name:"world",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBSocialVRCustomWorldSnapshot",kind:"LinkedField",name:"autosave_snapshot",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"version_code",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cloned_count",storageKey:null},{alias:null,args:null,concreteType:"XFBSocialVRCustomWorldToCollaboratorPersonasConnection",kind:"LinkedField",name:"collaborator_personas",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBVRPersona",kind:"LinkedField",name:"nodes",plural:!0,selections:[a,r],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"creation_time",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},r,{alias:null,args:null,concreteType:"XFBSocialVRCustomWorld",kind:"LinkedField",name:"if_viewer_can_import_into",plural:!1,selections:o,storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_featured",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_force_unpublished",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_viewer_collaborator",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_viewer_owner",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_viewer_playtester",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"last_saved_at",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"lifetime_unique_player_count",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"likes_count",storageKey:null},a,{alias:null,args:null,concreteType:"XFBTogetherAppUser",kind:"LinkedField",name:"owner_togetherappuser",plural:!1,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"vr_user",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"vr_alias",storageKey:null},r],storageKey:null},r],storageKey:null},{alias:null,args:null,concreteType:"XFBSocialVRCustomWorldSnapshot",kind:"LinkedField",name:"published_snapshot",plural:!1,selections:[l,r],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"total_population",storageKey:null},{alias:null,args:null,concreteType:"XFBSocialVRCustomWorldTrailer",kind:"LinkedField",name:"trailers",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"aspect_ratio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"status_display",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"video_uri",storageKey:null},r],storageKey:null},l,{alias:null,args:[{kind:"Literal",name:"first",value:1}],concreteType:"XFBSocialVRCustomWorldWorldScreenshotsConnection",kind:"LinkedField",name:"world_screenshots",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBSocialVRCustomWorldScreenshot",kind:"LinkedField",name:"nodes",plural:!0,selections:[{alias:"background_image_uri",args:[{kind:"Literal",name:"height",value:1098},{kind:"Literal",name:"width",value:1098}],kind:"ScalarField",name:"image_uri",storageKey:"image_uri(height:1098,width:1098)"},{alias:null,args:[{kind:"Literal",name:"height",value:88},{kind:"Literal",name:"width",value:88}],kind:"ScalarField",name:"image_uri",storageKey:"image_uri(height:88,width:88)"},r],storageKey:null}],storageKey:"world_screenshots(first:1)"},{alias:null,args:null,concreteType:"XFBSocialVRCustomWorld",kind:"LinkedField",name:"if_viewer_can_shutdown_server_client",plural:!1,selections:[i,r],storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:"24463149150031602",metadata:{},name:"OCDevManageWorldImportOptionsSectionMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null);
-----