OCDevManageWorldMetadataWorldBroadcastView",["fbt","GeoDivider.react","GeoLink.react","GeoSelector.react","GeoSelectorItem.react","GeoTextPairing.react","GeoToast.react","GeoVStack.react","OCDevManageWorldBroadcastVideoPlayer.react","OCDevManageWorldMetadataWorldBroadcastSaveConfirmationModal.react","OCDevManageWorldMetadataWorldBroadcastView_application.graphql","OCDevManageWorldMetadataWorldBroadcastView_world.graphql","OCDevUIAsyncButton.react","OCXMetaDevelopersHorizonWorldsCMSControllerRouteBuilder","XOCOrganizationPermissionUtils.oculus","geoMargin","getDisabledProps","gkx","react","react-relay","useGeoToaster","useOCDevUIModal"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c.useState;function p(t){var a,i,l,c,p,_,f,g,h,y=t.application,C=t.world,b=o("react-relay").useFragment(e!==void 0?e:e=n("OCDevManageWorldMetadataWorldBroadcastView_world.graphql"),C),v=o("react-relay").useFragment(u!==void 0?u:u=n("OCDevManageWorldMetadataWorldBroadcastView_application.graphql"),y),S=(a=b==null?void 0:b.world_broadcast_status)!=null?a:"UNPUBLISHED",R=m(S),L=R[0],E=R[1],k=L!==S,I=r("useGeoToaster")(),T=I.add,D=r("gkx")("9272")&&(i=v==null||(l=v.viewer_permissions)==null?void 0:l.map(o("XOCOrganizationPermissionUtils.oculus").toJSEnum).includes("PUBLISH_UNITY_WORLD"))!=null?i:!1,x=D||b.is_viewer_owner===!0||b.is_viewer_collaborator===!0,$=r("useOCDevUIModal")(),P=$.openModal,N=r("OCXMetaDevelopersHorizonWorldsCMSControllerRouteBuilder").buildUri({doc_root:"learn",cms_object_alias:"documentation/typescript/api-references-and-examples/world-broadcast/overview"}).toString(),M=x?k?null:s._(/*BTDS*/"Noting to save"):s._(/*BTDS*/"You do not have permissions to change this setting");function w(){T(d.jsx(r("GeoToast.react"),{hasIcon:!0,heading:s._(/*BTDS*/"Changes saved")}))}function A(){T(d.jsx(r("GeoToast.react"),{hasIcon:!0,heading:s._(/*BTDS*/"Failed to save changes"),status:"error"}))}function F(){var e=b.id;if(e!=null){var t=L!==S;t&&P(d.jsx(r("OCDevManageWorldMetadataWorldBroadcastSaveConfirmationModal.react"),{newWorldBroadcastStatus:L,oldWorldBroadcastStatus:S,worldID:e,onFailure:A,onSuccess:w}))}}var O=(S==="PUBLISHED"||S==="DRAFT")&&(b==null||(c=b.world_broadcast_video)==null?void 0:c.uri)!=null&&(b==null||(p=b.world_broadcast_video)==null?void 0:p.video_id)!=null;return d.jsxs(r("GeoVStack.react"),{context:"container",grow:1,relation:"unrelated",xstyle:r("geoMargin").all16,children:[d.jsx(r("GeoTextPairing.react"),{description:s._(/*BTDS*/"Implement World Broadcast to showcase your world. This feature helps users preview and discover your experience. Add World Broadcast to bring your world to life. For more details about how this tool works and where your broadcast will be served, please refer to the {worldBroadcastToolLink}.",[s._param("worldBroadcastToolLink",d.jsx(r("GeoLink.react"),{href:N,target:"_blank",children:"Developer Documentation"}))]),heading:s._(/*BTDS*/"World Broadcast u2219 Optional"),size:"header3"}),d.jsx(r("GeoDivider.react"),{}),d.jsxs(r("GeoSelector.react"),{"data-testid":void 0,label:s._(/*BTDS*/"Status"),message:s._(/*BTDS*/"Set to Draft to allow you and your collaborators to preview your World Broadcast. When youu2019re ready, set to Live to allow users to see your World Broadcast."),placeholder:s._(/*BTDS*/"Select an Item"),value:L,onChange:E,children:[d.jsx(r("GeoSelectorItem.react"),{label:s._(/*BTDS*/"Off"),value:"UNPUBLISHED"}),d.jsx(r("GeoSelectorItem.react"),{label:s._(/*BTDS*/"Draft"),value:"DRAFT"}),d.jsx(r("GeoSelectorItem.react"),{label:s._(/*BTDS*/"Live"),value:"PUBLISHED"})]}),O&&d.jsx(r("OCDevManageWorldBroadcastVideoPlayer.react"),{uri:(_=(f=b.world_broadcast_video)==null?void 0:f.uri)!=null?_:"",videoId:(g=(h=b.world_broadcast_video)==null?void 0:h.video_id)!=null?g:""}),d.jsx("div",{className:"x8x9d4c",children:d.jsx(r("OCDevUIAsyncButton.react"),babelHelpers.extends({"data-testid":void 0},r("getDisabledProps")(M),{label:s._(/*BTDS*/"Save Changes"),variant:"primary",onClick:F}))})]})}p.displayName=p.name+" [from "+i.id+"]",l.default=p}),226);
-----
OCDevManageWorldMetadataWorldBroadcastView_application.graphql",[],(function(t,n,r,o,a,i){"use strict";var e={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageWorldMetadataWorldBroadcastView_application",selections:[{alias:null,args:null,kind:"ScalarField",name:"viewer_permissions",storageKey:null}],type:"Application",abstractKey:null};a.exports=e}),null);
-----
-----
OCDevManageWorldMetadataWorldBroadcastView_application.graphql",[],(function(t,n,r,o,a,i){"use strict";var e={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageWorldMetadataWorldBroadcastView_application",selections:[{alias:null,args:null,kind:"ScalarField",name:"viewer_permissions",storageKey:null}],type:"Application",abstractKey:null};a.exports=e}),null);
-----