DeveloperInstantGamesInGameEventsEntriesTable.react",["fbt","ix","DeveloperInstantGamesDisableInGameEventModal.react","DeveloperInstantGamesEditInGameEventModal.react","DeveloperInstantGamesInGameEventsEntriesTable_Application.graphql","DeveloperInstantGamesInGameEventsHelper","FBLogger","GeoButton.react","GeoFlexbox.react","GeoMediaItem.react","GeoPill.react","GeoTable.react","GeoTableContentCell.react","GeoTableWidth","GeoTooltip.react","Image.react","InstantGamesDevsiteEventFalcoEvent","LocalDateTime","RelayHooks","Timezone","createGeoTableDataSource","fbicon","geoMargin","nullthrows","react","useGeoTableSortable","useGeoTableSortableState"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react")),m=k.useMemo,n={scrollable:{height:"x1j7d2pf",overflowX:"xw2csxc",overflowY:"x1odjw0f",$$css:!0}};function a(a){var e=a.disableMutationButtonProps,f=a.entries,g=a.appID,k=d("RelayHooks").useFragment(j!==void 0?j:j=b("DeveloperInstantGamesInGameEventsEntriesTable_Application.graphql"),f);if(k.inGameEvents==null)throw c("FBLogger")("instant_games").mustfixThrow("Fetching null in-game events entries for game.");a=d("DeveloperInstantGamesInGameEventsHelper").useGeoImperativeModalWithEvent(function(a){var b=a.isShown,d=a.onHide;a=a.event;return l.jsx(c("DeveloperInstantGamesEditInGameEventModal.react"),{appID:g,event:a,isShown:b,onHide:d})});var o=a.showModal;f=a.modal;a=d("DeveloperInstantGamesInGameEventsHelper").useGeoImperativeModalWithEvent(function(a){var b=a.isShown,d=a.onHide;a=a.event;return l.jsx(c("DeveloperInstantGamesDisableInGameEventModal.react"),{appID:g,event:a,isShown:b,onHide:d})});var p=a.showModal;a=a.modal;var q=c("useGeoTableSortableState")({sortKey:"start_date",direction:"descending"}),r=q[0];q=q[1];q=c("useGeoTableSortable")({sort:r,setSort:q});var s=m(function(){return r==null?k.inGameEvents:[].concat(k.inGameEvents).sort(function(a,b){var e=r.direction==="ascending"?1:-1,f=r.sortKey;switch(f){case"id":return c("nullthrows")(a.id)>c("nullthrows")(b.id)?e:-e;case"event":return d("DeveloperInstantGamesInGameEventsHelper").getValueFromLangMap(a.event_name).toLowerCase()>d("DeveloperInstantGamesInGameEventsHelper").getValueFromLangMap(b.event_name).toLowerCase()?e:-e;case"status":return c("nullthrows")(a.event_status)>c("nullthrows")(b.event_status)?e:-e;case"start_date":return c("nullthrows")(a.start_date)>c("nullthrows")(b.start_date)?e:-e;case"end_date":return c("nullthrows")(a.end_date)>c("nullthrows")(b.end_date)?e:-e;default:return 0}})},[k.inGameEvents,r]),t=m(function(){var a;return[{key:"id",cell:function(a){a=a.item;return a.id},width:(a=d("GeoTableWidth")).proportional(3),header:"ID",sortable:[{sortKey:"id"}]},{key:"event",cell:function(a){a=a.item;return l.jsx(c("GeoTableContentCell.react"),{description:a.event_type,media:l.jsx(c("GeoMediaItem.react"),{fit:"cover",media:l.jsx(c("Image.react"),{src:a.landscape_image_source_uri}),size:48}),title:d("DeveloperInstantGamesInGameEventsHelper").getValueFromLangMap(a.event_name)})},width:a.proportional(3),header:h._(/*BTDS*/"Event"),sortable:[{sortKey:"event"}]},{key:"status",cell:function(a){var b;a=a.item;b=(b=a.event_status)!=null?b:"UNDEFINED";var d;switch(b){case"APPROVED":d="success";break;case"REJECTED":d="error";break;case"IN_REVIEW":d="warning";break;default:d="info";break}return l.jsxs(c("GeoFlexbox.react"),{children:[l.jsx(c("GeoPill.react"),{label:b,status:d,value:b}),a.event_status==="REJECTED"?l.jsx(c("GeoTooltip.react"),{content:(b=a.rejection_reason)!=null?b:""}):null]})},width:a.proportional(2),header:h._(/*BTDS*/"Status"),sortable:[{sortKey:"status"}]},{key:"start_date",cell:function(a){a=a.item;return c("LocalDateTime").fromInstant(c("nullthrows")(a.start_date),d("Timezone").UTC).format("M j, Y g:ia")},width:a.proportional(3),header:h._(/*BTDS*/"Start Date"),sortable:[{sortKey:"start_date"}]},{key:"end_date",cell:function(a){a=a.item;return c("LocalDateTime").fromInstant(c("nullthrows")(a.end_date),d("Timezone").UTC).format("M j, Y g:ia")},width:a.proportional(3),header:h._(/*BTDS*/"End Date"),sortable:[{sortKey:"end_date"}]},{key:"actions",cell:function(a){var b=a.item;a=h._(/*BTDS*/"Edit");var f=h._(/*BTDS*/"Disable");return l.jsxs(l.Fragment,{children:[l.jsx(c("GeoButton.react"),babelHelpers["extends"]({icon:d("fbicon")._(i("477825"),16),isLabelHidden:!0,label:a,onClick:function(){o(b),c("InstantGamesDevsiteEventFalcoEvent").log(function(){var a;return{app_id:g,event:"in_game_events_edit_event_click",item:{item_label:"Edit",item_type:"button"},tab:"in-game-events",extra_data:{eventID:(a=b.id)!=null?a:""}}})},xstyle:c("geoMargin").end8},e)),l.jsx(c("GeoButton.react"),babelHelpers["extends"]({icon:d("fbicon")._(i("577039"),16),isLabelHidden:!0,label:f},e,{onClick:function(){p(b),c("InstantGamesDevsiteEventFalcoEvent").log(function(){var a;return{app_id:g,event:"in_game_events_disable_event_click",item:{item_label:"Disable",item_type:"button"},tab:"in-game-events",extra_data:{eventID:(a=b.id)!=null?a:""}}})}}))]})},width:a.proportional(2),header:h._(/*BTDS*/"Actions")}]},[g,e,p,o]),u=m(function(){return c("createGeoTableDataSource")(s,{getStableUniqueID:function(a){return a.id}})},[s]);return l.jsxs(l.Fragment,{children:[l.jsx(c("GeoTable.react"),{columns:t,dataSource:u,label:h._(/*BTDS*/"Events table"),plugins:{sortable:q},variant:"dense",xstyle:n.scrollable}),f,a]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
DeveloperInstantGamesDisableInGameEventModal_SaveMutation.graphql",["DeveloperInstantGamesDisableInGameEventModal_SaveMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:"event",args:[{kind:"Variable",name:"input_data",variableName:"input"}],concreteType:"XFBInstantGameInGameEvent",kind:"LinkedField",name:"xfb_instant_games_disable_in_game_event",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"DeveloperInstantGamesDisableInGameEventModal_SaveMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"DeveloperInstantGamesDisableInGameEventModal_SaveMutation",selections:c},params:{id:b("DeveloperInstantGamesDisableInGameEventModal_SaveMutation_facebookRelayOperation"),metadata:{},name:"DeveloperInstantGamesDisableInGameEventModal_SaveMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
DeveloperInstantGamesDisableInGameEventModal_SaveMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="9620796131303572"}),null);
-----