OCDevManageWorldsWorldBroadcastView.react",["fbt","ix","$InternalEnum","GeoButton.react","GeoCardFooter.react","GeoEmptyState.react","GeoFlexbox.react","GeoHStack.react","GeoPageCard.react","GeoPageItem.react","GeoPageSection.react","GeoSection.react","GeoStep.react","GeoStepper.react","GeoText.react","Image.react","OCDevManagePage.react","OCDevManagePageHeader.react","OCDevManageWorldBroadcastVideoPlayer.react","OCDevManageWorldMetadataWorldBroadcastSaveCompleteModal.react","OCDevManageWorldMetadataWorldBroadcastSaveConfirmationModal.react","OCDevManageWorldsWorldBroadcastViewSaveMutation.graphql","OCDevManageWorldsWorldBroadcastView_application.graphql","OCDevManageWorldsWorldBroadcastView_world.graphql","OCDevUIAsyncButton.react","OCXMetaDevelopersHorizonWorldsCMSControllerRouteBuilder","XOCOrganizationPermissionUtils.oculus","asyncToGeneratorRuntime","fbicon","getDisabledProps","gkx","react","react-relay","useGeoTheme","useOCDevUICommitMutation","useOCDevUIModal"],(function(t,n,r,o,a,i,l,s,u){"use strict";var e,c,d,m,p=m||(m=o("react")),_=n("$InternalEnum").Mirrored(["PREVIEW","LIVE"]);function f(t){var a,i,l,m,f,h,y,C,b,v=t.application,S=t.world,R=o("react-relay").useFragment(e!==void 0?e:e=n("OCDevManageWorldsWorldBroadcastView_world.graphql"),S),L=o("react-relay").useFragment(c!==void 0?c:c=n("OCDevManageWorldsWorldBroadcastView_application.graphql"),v),E=(a=R==null?void 0:R.world_broadcast_status)!=null?a:"UNPUBLISHED",k=r("gkx")("9272")&&(i=L==null||(l=L.viewer_permissions)==null?void 0:l.map(o("XOCOrganizationPermissionUtils.oculus").toJSEnum).includes("PUBLISH_UNITY_WORLD"))!=null?i:!1,I=k||R.is_viewer_owner===!0||R.is_viewer_collaborator===!0,T=r("useOCDevUIModal")(),D=T.openModal,x=r("OCXMetaDevelopersHorizonWorldsCMSControllerRouteBuilder").buildUri({doc_root:"learn",cms_object_alias:"documentation/typescript/api-references-and-examples/world-broadcast/overview"}).toString(),$=r("useOCDevUICommitMutation")(d!==void 0?d:d=n("OCDevManageWorldsWorldBroadcastViewSaveMutation.graphql"));function P(){return N.apply(this,arguments)}function N(){return N=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){if(R.id!=null){var e=yield $({input:{social_vr_custom_world_id:R.id,published_privacy:q}},{closeModalOnSuccess:!0,successToast:{heading:s._(/*BTDS*/"Changes saved")}});e!=null&&q!=="DRAFT"&&D(p.jsx(r("OCDevManageWorldMetadataWorldBroadcastSaveCompleteModal.react"),{newWorldBroadcastStatus:q}))}}),N.apply(this,arguments)}var M=(R==null||(m=R.world_broadcast_video)==null?void 0:m.uri)!=null&&(R==null||(f=R.world_broadcast_video)==null?void 0:f.video_id)!=null,w=s._(/*BTDS*/"You do not have permissions to change this setting"),A=s._(/*BTDS*/"Note: Preview stream lets creators and collaborators test the feed before going live.");function F(){return E==="PUBLISHED"?{buttonLabel:s._(/*BTDS*/"Stop livestream"),disabledMessage:I?null:s._(/*BTDS*/"You do not have permissions to change this setting"),nextWorldBroadcastStatus:"UNPUBLISHED",showDescriptionSubtext:!1,showVideoPlayer:!0}:E==="DRAFT"?{buttonLabel:M?s._(/*BTDS*/"Go live"):s._(/*BTDS*/"Loading..."),disabledMessage:I?M?null:s._(/*BTDS*/"Livestream is still loading. Please wait a few minutes, then refresh the page to try again."):w,nextWorldBroadcastStatus:"PUBLISHED",showDescriptionSubtext:!0,showVideoPlayer:!0}:{buttonLabel:s._(/*BTDS*/"Preview stream"),disabledMessage:I?null:w,nextWorldBroadcastStatus:"DRAFT",showDescriptionSubtext:!0,showVideoPlayer:!1}}var O=F(),B=O.buttonLabel,W=O.disabledMessage,q=O.nextWorldBroadcastStatus,U=O.showDescriptionSubtext,V=O.showVideoPlayer;function H(){return G.apply(this,arguments)}function G(){return G=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){R.id==null||q==null||(q==="DRAFT"?yield P():D(p.jsx(r("OCDevManageWorldMetadataWorldBroadcastSaveConfirmationModal.react"),{newWorldBroadcastStatus:q,onConfirm:P})))}),G.apply(this,arguments)}var z=r("useGeoTheme")(),j=z.selectElevation,K=z.selectStaticBackgroundColor;return p.jsx(r("OCDevManagePage.react"),{columns:12,header:p.jsx(r("OCDevManagePageHeader.react"),{description:s._(/*BTDS*/"Livestream your world directly to the Meta Horizon app feed and across Metau2019s family of apps. Real-time camera views offer potential players a sneak peek inside your world."),heading:s._(/*BTDS*/"World Broadcast")}),children:p.jsxs(r("GeoPageSection.react"),{children:[U&&p.jsx(r("GeoPageItem.react"),{columns:12,children:p.jsx(r("GeoText.react"),{children:A})}),p.jsx(r("GeoPageCard.react"),{columns:12,footer:p.jsx(r("GeoCardFooter.react"),{primaryButton:p.jsx(r("OCDevUIAsyncButton.react"),babelHelpers.extends({"data-testid":void 0},r("getDisabledProps")(W),{label:B,variant:"primary",onClick:H})),secondaryButton:p.jsx(r("GeoButton.react"),{"data-testid":void 0,href:x,icon:o("fbicon")._(u("509932"),16),label:s._(/*BTDS*/"Need help?"),target:"_blank"})}),children:p.jsx(r("GeoSection.react"),{children:p.jsxs(r("GeoHStack.react"),{children:[p.jsxs(r("GeoStepper.react"),{value:-1,onChange:function(){},children:[p.jsx(r("GeoStep.react"),{id:_.PREVIEW,label:s._(/*BTDS*/"Preview stream"),status:E==="DRAFT"||E==="PUBLISHED"?"completed":"pending"}),p.jsx(r("GeoStep.react"),{id:_.LIVE,label:s._(/*BTDS*/"Go live"),status:E==="PUBLISHED"?"completed":"pending"})]}),V?M?p.jsx(r("OCDevManageWorldBroadcastVideoPlayer.react"),{uri:(h=(y=R.world_broadcast_video)==null?void 0:y.uri)!=null?h:"",videoId:(C=(b=R.world_broadcast_video)==null?void 0:b.video_id)!=null?C:""}):p.jsx(r("GeoFlexbox.react"),{"data-testid":void 0,xstyle:[g.container,j({level:1}),K({surface:"content"})]}):p.jsx(r("GeoFlexbox.react"),{"data-testid":void 0,xstyle:[g.container,j({level:1}),K({surface:"content"})],children:p.jsx(r("GeoEmptyState.react"),{heading:s._(/*BTDS*/"Something not quite right? Click below for help."),media:p.jsx(r("Image.react"),{src:u("939103")})})})]})})})]})})}f.displayName=f.name+" [from "+i.id+"]";var g={container:{borderStartStartRadius:"x1obq294",borderStartEndRadius:"x5a5i1n",borderEndEndRadius:"xde0f50",borderEndStartRadius:"x15x8krk",height:"x16nrsnc",width:"xh8yej3",$$css:!0}};l.default=f}),226);
-----
OCDevManageWorldsWorldBroadcastViewSaveMutation.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:"world_broadcast_status",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"OCDevManageWorldsWorldBroadcastViewSaveMutation",selections:[{alias:null,args:t,concreteType:"XFBHorizonWorldBroadcastUpdateResponsePayload",kind:"LinkedField",name:"xfb_horizon_world_broadcast_update",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBSocialVRCustomWorld",kind:"LinkedField",name:"social_vr_custom_world",plural:!1,selections:[n],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"OCDevManageWorldsWorldBroadcastViewSaveMutation",selections:[{alias:null,args:t,concreteType:"XFBHorizonWorldBroadcastUpdateResponsePayload",kind:"LinkedField",name:"xfb_horizon_world_broadcast_update",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBSocialVRCustomWorld",kind:"LinkedField",name:"social_vr_custom_world",plural:!1,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:"25491471197180385",metadata:{},name:"OCDevManageWorldsWorldBroadcastViewSaveMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null);
-----