local l_CorePackages_0 = game:GetService("CorePackages");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("Modules");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_script_FirstAncestor_0.Common.RoactRodux);
local v4 = require(l_CorePackages_0.UIBlox);
local v5 = require(l_CorePackages_0.RoactNavigation);
local l_withStyle_0 = v4.Style.withStyle;
local v7 = require(l_script_FirstAncestor_0.LuaApp.Enum.OverlayType);
local v8 = require(l_script_FirstAncestor_0.LuaApp.Services.RoactAnalytics);
local v9 = require(l_script_FirstAncestor_0.LuaApp.Services.AppEventIngestService);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_Contexts_0 = require(l_CorePackages_0.Workspace.Packages.SocialLuaAnalytics).Analytics.Enums.Contexts;
local v12 = require(l_script_FirstAncestor_0.LuaApp.Components.FullscreenPageWithSafeArea);
local v13 = require(l_script_FirstAncestor_0.LuaApp.AppPage);
local v14 = require(l_CorePackages_0.Workspace.Packages.FriendsLanding);
local l_EntryPoint_0 = v14.EntryPoint;
local l_EnumScreens_0 = v14.EnumScreens;
local v17 = require(l_script_FirstAncestor_0.LuaApp.Navigation.AndroidBackButtonNavigationHandler.Container);
local v18 = require(script.Parent.isRootRouteInRN);
local v19 = require(l_script_FirstAncestor_0.LuaApp.Components.Players.PlayerSearch);
local _ = require(l_script_FirstAncestor_0.Profile.Flags.ProfileIXPTest);
local v21 = require(l_CorePackages_0.Cryo);
local v22 = require(l_script_FirstAncestor_0.LuaApp.Experiment.RoactAppExperiment);
local v23 = require(l_script_FirstAncestor_0.LuaApp.Experiment.AppUserLayers);
local l_UniversalAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).UniversalAppPolicy;
local _ = require(l_CorePackages_0.Workspace.Packages.ProfileQRCode);
local l_useNavigationProps_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppNavigation).useNavigationProps;
local v27 = require(l_script_FirstAncestor_0.Common.memoize);
local l_Logger_0 = require(l_CorePackages_0.Workspace.Packages.Loggers).Logger;
local l_RobloxEventReceiver_0 = require(l_CorePackages_0.Workspace.Packages.RealtimeDelivery).RobloxEventReceiver;
local l_llama_0 = require(l_CorePackages_0.LuaSocialLibrariesDeps).llama;
local l_OffPlatformFriendRequestsIXP_0 = require(l_CorePackages_0.Workspace.Packages.ContactImporter).Flags.OffPlatformFriendRequestsIXP;
local l_FFlagEnableFriendsLandingControllerBar_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagEnableFriendsLandingControllerBar;
local l_useDesignTokens_0 = require(l_CorePackages_0.Workspace.Packages.Style).useDesignTokens;
local l_useNavigation_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useNavigation;
local l_useUiModeInfo_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppHooks).useUiModeInfo;
local l_UiMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).UiMode;
local v37 = require(l_script_FirstAncestor_0.LuaApp.Constants);
local v38 = require(script.Parent.Parent.utils.formatUser);
local v39 = v2.PureComponent:extend("FriendsLandingUniversalAppWrapper");
local v40 = game:DefineFastFlag("FriendsLandingAllowNavParamsUAR", false);
v39.defaultProps = {
    wideMode = false
};
v39.init = function(v41)
    v41.robloxEventReceiver = l_RobloxEventReceiver_0.new(v41.props.notificationService);
    v41.navigateDownToFriendRequests = function()
        v41.props.navigateDownToFriendRequests();
    end;
    v41.viewUserProfile = function(v42, v43)
        if v43 then
            local v44 = v43.profilePeekViewProps or {};
            local v45 = v43.contextualMenuProps or {};
            v41.props.navigateToUserInfo(v42, {
                contextualMenuProps = l_llama_0.Dictionary.join(v45, {
                    user = if not v45.user then {} else v38(v45.user)
                }),
                profilePeekViewProps = l_llama_0.Dictionary.join(v44, {
                    resetPeekView = true,
                    source = v43.source
                }),
                entryPoint = v43.entryPoint,
                openJoinable = v43.openJoinable,
                userInGame = v43.userInGame
            });
        end;
    end;
    v41.navigateToLuaAppPages = {
        [l_EnumScreens_0.FriendFinder] = v41.navigateDownToFriendRequests,
        [l_EnumScreens_0.ViewUserProfile] = v41.viewUserProfile,
        [l_EnumScreens_0.LearnMore] = if not not v41.props.contactImporterAndPYMKEnabled and v41.props.isContactImporterPolicyEnabled or v41.props.isLocalUserSoothsayer then v41.props.openLearnMoreLink else nil,
        [l_EnumScreens_0.ProfileQRCode] = function()
            v41.props.navigateTo3DQRCodePage({
                source = l_Contexts_0.AddFriends
            });
        end,
        [l_EnumScreens_0.SearchPage] = if not l_FFlagEnableFriendsLandingControllerBar_0 then nil else function()
            v41.props.navigation.navigate(v13.SearchPage, {
                defaultSearchType = v37.SearchTypes.Players
            });
        end,
        [l_EnumScreens_0.AmpWizardContainer] = v41.props.openAmpWizardContainer
    };
    v41.luaAppPages = {
        playerSearchPage = v19
    };
    v41.isAndroidBackButtonHandlerDisabled = function()
        local l_currentAppPage_0 = v41.props.currentAppPage;
        local v47 = true;
        if l_currentAppPage_0 ~= v13.GameDetail then
            v47 = true;
            if l_currentAppPage_0 ~= v13.ShareGameToChat then
                v47 = true;
                if l_currentAppPage_0 ~= v13.ProfilePeekView then
                    v47 = true;
                    if l_currentAppPage_0 ~= v13.AvatarExperienceWrapperTransparent then
                        v47 = true;
                        if v41.props.centralOverlayType ~= v7.PeopleList then
                            v47 = l_currentAppPage_0 == v13.AvatarExperienceWrapper;
                        end;
                    end;
                end;
            end;
        end;
        return v47;
    end;
    v41.renderAndroidBackButtonNavigationHandler = function(v48)
        return function(v49)
            return v2.createElement(v17, {
                canGoBackInRN = not v18(v49.state),
                navigateBackInRN = v49.pop,
                disabled = v48
            });
        end;
    end;
    v41.getLoadingTimeInfo = function()
        return v41.props.navigateToFriendsLandingEventStart;
    end;
    v41.navigationAppContainer = v5.createAppContainer(l_EntryPoint_0);
    v41.renderFriendsLanding = v41.props.renderFriendsLanding or v27(function(v50, v51, v52, v53, v54)
        return v2.createElement(v41.navigationAppContainer, {
            exitFriendsLanding = v50,
            navigateToLuaAppPages = v51,
            isLuaProfilePageEnabled = true,
            wideMode = v52,
            luaAppPages = v53,
            logger = l_Logger_0,
            renderAndroidBackButtonNavigationHandler = v41.renderAndroidBackButtonNavigationHandler(v54),
            debug_willUnmount = v41.props.debug_entryPointWillUnmount,
            entryPage = v41.props.entryPage,
            luaAddFriendsPageEnabled = v41.props.luaAddFriendsPageEnabled,
            robloxEventReceiver = v41.robloxEventReceiver,
            getLoadingTimeInfo = v41.getLoadingTimeInfo,
            contactImporterAndPYMKEnabled = not not v41.props.contactImporterAndPYMKEnabled and v41.props.isContactImporterPolicyEnabled or v41.props.isLocalUserSoothsayer,
            contactImporterExperimentVariant = v41.props.contactImporterExperimentVariant,
            diagService = v41.props.roactAnalytics.Diag,
            eventIngestService = v41.props.eventIngestService,
            openProfilePeekView = v41.props.openProfilePeekView,
            openPlayerContextualMenu = v41.props.openPlayerContextualMenu,
            passedNavParams = if not v40 then nil else v41.props.passedNavParams
        });
    end);
end;
v39.render = function(v55)
    return l_withStyle_0(function(_)
        return v2.createElement(v12, {
            BackgroundColor3 = v55.props.BackgroundColor,
            BackgroundTransparency = v55.props.BackgroundTransparency,
            useFullScalePage = v55.props.useFullScalePage,
            includeStatusBar = true
        }, {
            FriendsLanding = v55.renderFriendsLanding(v55.props.navigateBackInAppRoute, v55.navigateToLuaAppPages, v55.props.wideMode, v55.luaAppPages, v55.isAndroidBackButtonHandlerDisabled())
        });
    end);
end;
v39 = l_RoactServices_0.connect({
    roactAnalytics = v8,
    eventIngestService = v9
})((l_UniversalAppPolicy_0.connect(function(v57)
    return {
        isContactImporterPolicyEnabled = v57.getContactImporterEnabled()
    };
end)((v3.connect(function(v58, _)
    return {
        centralOverlayType = v58.CentralOverlay.OverlayType
    };
end, nil)((v22.connectUserLayer({
    v23.SocialFriendsLayer
}, function(v60, _)
    return {
        luaAddFriendsPageEnabled = (v60[v23.SocialFriendsLayer] or {}).show_lua_add_friends_page == "True",
        contactImporterAndPYMKEnabled = l_OffPlatformFriendRequestsIXP_0.experimentOrRolloutEnabled(v60),
        contactImporterExperimentVariant = l_OffPlatformFriendRequestsIXP_0.getExperimentVariant(v60)
    };
end)(v39)))))));
return function(v62)
    local v63 = l_useDesignTokens_0();
    local v64 = l_useUiModeInfo_0();
    local v65 = nil;
    if l_FFlagEnableFriendsLandingControllerBar_0 then
        v65 = l_useNavigation_0();
    end;
    return v2.createElement(v39, v21.Dictionary.join(v62, {
        BackgroundColor = v63.LuaApps.App.Page.BackgroundColor,
        BackgroundTransparency = v63.LuaApps.App.Page.BackgroundTransparency,
        navigation = v65,
        useFullScalePage = v64.uiMode == l_UiMode_0.TenFoot
    }, (l_useNavigationProps_0(function(_, v67)
        return {
            navigateToFriendsLandingEventStart = v67.navigateToFriendsLandingEventStart
        };
    end))));
end;


local function v0(v1)
    if v1.routes and #v1.routes > 1 then
        return false;
    else
        local v2 = v1.routes and v1.routes[v1.index];
        if not v2 then
            return true;
        else
            return v0(v2);
        end;
    end;
end;
return v0;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Modules");
local _ = game:GetService("CorePackages");
local v2 = require(l_script_FirstAncestor_0.LuaApp.Thunks.NavigateBack);
local v3 = require(l_script_FirstAncestor_0.LuaApp.Thunks.NavigateDownToFriendRequests);
local v4 = require(l_script_FirstAncestor_0.LuaApp.Thunks.OpenProfilePeekView);
local v5 = require(l_script_FirstAncestor_0.LuaApp.Components.AmpUpsell.OpenAmpWizardContainer);
local v6 = require(l_script_FirstAncestor_0.LuaApp.Thunks.NavigateToUserInfo);
local v7 = require(l_script_FirstAncestor_0.LuaApp.Thunks.OpenContactImporterLearnMoreLink);
local _ = require(l_script_FirstAncestor_0.LuaApp.Thunks.OpenPhoneVerificationWebview);
local v9 = require(l_script_FirstAncestor_0.LuaApp.Thunks.OpenCentralOverlayForPlayerContextualMenu);
local v10 = require(l_script_FirstAncestor_0.LuaApp.Thunks.NavigateDownTo3DQRCodePage);
return function(v11)
    return {
        navigateBackInAppRoute = function()
            v11(v2());
        end,
        navigateDownToFriendRequests = function()
            v11(v3());
        end,
        openProfilePeekView = function(v12, v13)
            assert(type(v12) == "string", "Expected userId to be a string");
            v11(v4(v12, v13));
        end,
        openPlayerContextualMenu = function(v14)
            v11(v9(v14));
        end,
        navigateToUserInfo = function(v15, v16)
            assert(type(v15) == "string", "Expected userId to be a string");
            v11(v6(v15, v16));
        end,
        openLearnMoreLink = function()
            v11(v7());
        end,
        navigateTo3DQRCodePage = function(v17)
            v11(v10(v17));
        end,
        openAmpWizardContainer = function(v18, v19)
            v11(v5(v18, v19));
        end
    };
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local _ = script:FindFirstAncestor("Modules");
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local l_getFFlagSoothsayerCheckForContactImporter_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).getFFlagSoothsayerCheckForContactImporter;
return function(v4, _)
    local v6 = v4.Navigation.history[#v4.Navigation.history];
    return {
        currentAppPage = v6[#v6].name,
        wideMode = v4.FormFactor == l_FormFactor_0.WIDE,
        isLocalUserSoothsayer = not not l_getFFlagSoothsayerCheckForContactImporter_0() and v4.IsLocalUserSoothsayer
    };
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local _ = script:FindFirstAncestor("Modules");
local l_Logger_0 = require(l_CorePackages_0.Workspace.Packages.Loggers).Logger;
local l_Analytics_0 = require(l_CorePackages_0.Workspace.Packages.Analytics).Analytics;
local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = {
    homePage = game:DefineFastString("HomePageNavigationFriendsLandingCounter", "HomePageNavigationFriendsLanding"),
    morePage = game:DefineFastString("MorePageNavigationFriendsLandingCounter", "MorePageNavigationFriendsLanding")
};
local v7 = v5.strictInterface({
    localUserId = v5.string,
    context = v5.string,
    analytics = v5.optional(v5.table)
});
return function(v8)
    assert(v7(v8));
    local v9 = v8.analytics or l_Analytics_0.new(l_RbxAnalyticsService_0);
    if not v6[v8.context] then
        l_Logger_0:error("Error from navigate: Invalid destination '{}'", v8.context);
        return ;
    else
        v9.EventStream:setRBXEventStream(v8.context, "buttonClick", {
            uid = v8.localUserId,
            btn = "friendsLanding"
        });
        v9.Diag:reportCounter(v6[v8.context], 1);
        return ;
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.t);
local v2 = require(l_CorePackages_0.LuaSocialLibrariesDeps);
local l_llama_0 = v2.llama;
local l_PresenceType_0 = v2.RoduxPresence.config({}).Enums.PresenceType;
local l_UserModel_0 = require(l_CorePackages_0.Workspace.Packages.UserLib).Models.UserModel;
local v6 = {
    [l_PresenceType_0.InGame] = l_UserModel_0.PresenceType.IN_GAME,
    [l_PresenceType_0.Online] = l_UserModel_0.PresenceType.ONLINE,
    [l_PresenceType_0.InStudio] = l_UserModel_0.PresenceType.IN_STUDIO,
    [l_PresenceType_0.Offline] = l_UserModel_0.PresenceType.OFFLINE
};
return function(v7)
    assert(v1.table(v7), "formatUser: user should be a table");
    return l_llama_0.Dictionary.join(v7, {
        name = v7.username,
        gameInstanceId = v7.gameId,
        presence = v6[v7.userPresenceType] or v6[l_PresenceType_0.Offline]
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.Promise);
local v5 = require(l_CorePackages_0.Packages.t);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_Modules_0.LuaApp.Services.RoactAnalytics);
local l_AppUserGameSettings_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppUserGameSettings;
local l_AppGuiService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppGuiService;
local v10 = require(l_Modules_0.LuaApp.Enum.NotificationType);
local v11 = require(l_Modules_0.Common.RoactUtilities.ExternalEventConnection);
local v12 = require(l_Modules_0.LuaApp.Components.ScreenGuiWithBlurControl);
local l_FullscreenTitleBar_0 = require(l_CorePackages_0.UIBlox).App.Bar.FullscreenTitleBar;
local v14 = require(l_Modules_0.LuaApp.Flags.GetFIntFullscreenTitleBarTriggerDelayMillis);
local v15 = require(l_Modules_0.LuaApp.Flags.GetFFlagFixFullscreenTitleBarPromiseCancel);
local v16 = v3.PureComponent:extend("FullscreenTitleBar");
v16.validateProps = v5.strictInterface({
    titleText = v5.optional(v5.string),
    displayOrder = v5.integer,
    appUserGameSettings = v5.optional(v5.union(v5.Instance, v5.table)),
    guiService = v5.optional(v5.union(v5.Instance, v5.table)),
    analytics = v5.optional(v5.union(v5.Instance, v5.table))
});
v16.defaultProps = {
    titleText = "Roblox",
    displayOrder = 1
};
v16.init = function(v17)
    v17:setState({
        isTriggered = false,
        fullscreenEnabled = v17.props.appUserGameSettings:InFullScreen()
    });
    v17.onFullscreenChanged = function(v18)
        v17:setState({
            fullscreenEnabled = v18,
            isTriggered = false
        });
    end;
    v17.triggerTitleBar = function()
        local v19 = v14() / 1000;
        if v19 > 0 then
            v17.triggerTitleBarPromise = v4.delay(v19):andThenCall(function()
                v17.triggerTitleBarPromise = nil;
                if not v17.state.isTriggered then
                    v17:setState({
                        isTriggered = true
                    });
                end;
            end);
            return ;
        else
            if not v17.state.isTriggered then
                v17:setState({
                    isTriggered = true
                });
            end;
            return ;
        end;
    end;
    v17.cancelTriggerTitleBar = function()
        if v17.triggerTitleBarPromise then
            v17.triggerTitleBarPromise:cancel();
            v17.triggerTitleBarPromise = nil;
        end;
    end;
    v17.onDisappear = function()
        if v17.hideTitleBarPromise then
            if not v15() then
                v17.hideTitleBarPromise.cancel();
            else
                v17.hideTitleBarPromise:cancel();
            end;
            v17.hideTitleBarPromise = nil;
        end;
        v17.hideTitleBarPromise = v4.delay(0.5):andThenCall(function()
            v17.hideTitleBarPromise = nil;
            if v17.state.isTriggered then
                v17:setState({
                    isTriggered = false
                });
            end;
        end);
    end;
    v17.exitFullscreen = function()
        if v17.state.isTriggered then
            v17:setState({
                isTriggered = false
            });
        end;
        v17.props.guiService:ToggleFullscreen();
    end;
    v17.closeRoblox = function()
        v17.props.guiService:BroadcastNotification("", v10.NATIVE_EXIT);
    end;
    v17.mouseReenter = function()
        if not (not v17.state.isTriggered or not v17.hideTitleBarPromise) then
            v17.hideTitleBarPromise:cancel();
            v17.hideTitleBarPromise = nil;
        end;
    end;
end;
v16.render = function(v20)
    return v3.createFragment({
        FullscreenChangedEvent = v3.createElement(v11, {
            event = v20.props.appUserGameSettings.FullscreenChanged,
            callback = v20.onFullscreenChanged
        }),
        FullscreenTitleBar = v20.state.fullscreenEnabled and v3.createElement(v3.Portal, {
            target = l_CoreGui_0
        }, {
            FullscreenTitleBarScreen = v3.createElement(v12, {
                ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
                DisplayOrder = v20.props.displayOrder
            }, {
                TriggerArea = v3.createElement("Frame", {
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    Size = UDim2.new(1, 0, 0, 1),
                    [v3.Event.MouseEnter] = v20.triggerTitleBar,
                    [v3.Event.MouseLeave] = v20.cancelTriggerTitleBar
                }),
                Bar = v3.createElement(l_FullscreenTitleBar_0, {
                    title = v20.props.titleText,
                    isTriggered = v20.state.isTriggered,
                    onDisappear = v20.onDisappear,
                    onHover = v20.mouseReenter,
                    exitFullscreen = v20.exitFullscreen,
                    closeRoblox = v20.closeRoblox
                })
            })
        })
    });
end;
v16.willUnmount = function(v21)
    if v21.hideTitleBarPromise then
        v21.hideTitleBarPromise:cancel();
    end;
    if v21.triggerTitleBarPromise then
        v21.triggerTitleBarPromise:cancel();
    end;
end;
return l_RoactServices_0.connect({
    analytics = v7,
    appUserGameSettings = l_AppUserGameSettings_0,
    guiService = l_AppGuiService_0
})(v16);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local v5 = require(l_Modules_0.LuaApp.withLocalization);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags);
local v8 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_RoactAnalyticsCommonGameEvents_0 = v7.RoactAnalyticsCommonGameEvents;
local l_AppGuiService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppGuiService;
local v11 = require(l_Modules_0.LuaApp.Enum.FeatureContext);
local v12 = require(l_Modules_0.LuaApp.Thunks.OpenGameDetails);
local v13 = require(l_Modules_0.LuaApp.Models.User);
local l_PlayabilityStatusEnum_0 = require(l_CorePackages_0.Workspace.Packages.PlayabilityRodux).Enums.PlayabilityStatusEnum;
local l_ConvertUniverseIdToString_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).ConvertUniverseIdToString;
local v16 = require(l_Modules_0.LuaApp.Util.joinGame);
local v17 = require(l_Modules_0.LuaApp.Constants);
local v18 = require(l_Modules_0.LuaApp.Components.FitImageTextButton);
local v19 = require(l_Modules_0.LuaApp.Components.LoadingBarWithTheme);
local v20 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppUseWithLocalization);
local l_EnableOptionalPlaceIdForUserIdGameJoins_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).EnableOptionalPlaceIdForUserIdGameJoins;
local l_SocialContextToastIxpConfig_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).SocialContextToastIxpConfig;
local l_GREEN_PRIMARY_0 = v17.Color.GREEN_PRIMARY;
local l_WHITE_0 = v17.Color.WHITE;
local l_VIEW_GAME_DETAILS_FROM_BUTTON_0 = v17.AnalyticsKeyword.VIEW_GAME_DETAILS_FROM_BUTTON;
local l_SmallRobuxIcon_0 = v17.SmallRobuxIcon;
local function v33(v27, v28, v29)
    assert(type(v27) == "number", "formatInteger expects a number; was given type: " .. type(v27));
    v28 = v28 or ",";
    v29 = v29 or 3;
    assert(v28, "cannot be nil");
    assert(v29, "cannot be nil");
    local v30 = string.format("%.0f", (math.abs(v27)));
    local v31 = #v30 % v29;
    if v31 == 0 then
        v31 = v29;
    end;
    local v32 = v30:sub(1, v31) .. v30:sub(v31 + 1):gsub("(" .. string.rep("%d", v29) .. ")", v28 .. "%1");
    if v27 < 0 then
        v32 = "-" .. v32;
    end;
    return v32;
end;
local v34 = {
    [v11.PeopleList] = {
        ViewDetailsEnabled = true,
        JoinGameEnabled = true,
        BuyToPlayButtonEnabled = true
    },
    [v11.PlacesList] = {
        ViewDetailsEnabled = false,
        JoinGameEnabled = false,
        BuyToPlayButtonEnabled = true
    },
    Default = {
        ViewDetailsEnabled = true,
        JoinGameEnabled = true,
        BuyToPlayButtonEnabled = true
    }
};
local v35 = v2.PureComponent:extend("GameButton");
v35.defaultProps = {
    showLoadingIndicatorWhenDataNotReady = false
};
v35.init = function(v36)
    v36.openGameDetailsFromButton = function()
        local l_universePlaceInfo_0 = v36.props.universePlaceInfo;
        if l_universePlaceInfo_0 then
            local l_analytics_0 = v36.props.analytics;
            local l_friend_0 = v36.props.friend;
            local l_index_0 = v36.props.index;
            local l_absolutePosition_0 = v36.props.absolutePosition;
            local l_callbackOnOpenGameDetails_0 = v36.props.callbackOnOpenGameDetails;
            local l_featureContext_0 = v36.props.featureContext;
            local l_universeRootPlaceId_0 = l_universePlaceInfo_0.universeRootPlaceId;
            local l_placeId_0 = l_universePlaceInfo_0.placeId;
            local l_universeId_0 = l_universePlaceInfo_0.universeId;
            if l_placeId_0 then
                if l_featureContext_0 == v11.PeopleList then
                    l_analytics_0.reportViewProfileFromPeopleList(l_friend_0.id, l_index_0, l_absolutePosition_0, l_universeRootPlaceId_0, l_VIEW_GAME_DETAILS_FROM_BUTTON_0);
                    l_analytics_0.reportOpenGameDetailFromPeopleList(l_friend_0.id, l_index_0, l_absolutePosition_0, l_universeRootPlaceId_0, l_universeId_0, "gameButton", "GameDetailFromGameButton");
                end;
                if l_callbackOnOpenGameDetails_0 then
                    l_callbackOnOpenGameDetails_0();
                end;
                v36.props.openGameDetails(l_universeId_0);
            end;
            return ;
        else
            return ;
        end;
    end;
    v36.joinGameByUser = function()
        local l_universePlaceInfo_1 = v36.props.universePlaceInfo;
        if l_universePlaceInfo_1 then
            local l_analytics_1 = v36.props.analytics;
            local l_friend_1 = v36.props.friend;
            local l_index_1 = v36.props.index;
            local l_callbackOnJoinGame_0 = v36.props.callbackOnJoinGame;
            local l_featureContext_1 = v36.props.featureContext;
            local l_absolutePosition_1 = v36.props.absolutePosition;
            local l_inGameFriendCount_0 = v36.props.inGameFriendCount;
            local l_source_0 = v36.props.source;
            local l_placeId_1 = l_universePlaceInfo_1.placeId;
            local l_universeRootPlaceId_1 = l_universePlaceInfo_1.universeRootPlaceId;
            if l_callbackOnJoinGame_0 then
                l_callbackOnJoinGame_0();
            end;
            local v58 = nil;
            local v59 = nil;
            if l_featureContext_1 == v11.PeopleList then
                v59 = v17.AnalyticsContext.PeopleListInHomePage;
                v58 = function(v60)
                    l_analytics_1.reportPeopleListJoinGame(l_friend_1.id, l_index_1, l_absolutePosition_1, l_placeId_1, l_universeRootPlaceId_1, l_friend_1.gameInstanceId, l_inGameFriendCount_0, v60, l_source_0);
                end;
            elseif l_featureContext_1 == v11.PlacesList then
                v59 = v17.AnalyticsContext.GamePlayIntentInPlacesList;
                v58 = function(v61)
                    l_analytics_1.reportJoinGameInPlacesList(l_friend_1.id, l_placeId_1, l_universeRootPlaceId_1, l_friend_1.gameInstanceId, v61);
                end;
            end;
            if not l_EnableOptionalPlaceIdForUserIdGameJoins_0() or not l_SocialContextToastIxpConfig_0.CheckIsFallbackPlaceIdParamEnabled() then
                v16:ByUser(l_friend_1, v59, v58);
                return ;
            else
                v16:ByUserAndPlaceId(l_friend_1, l_placeId_1, v59, v58);
                return ;
            end;
        else
            return ;
        end;
    end;
end;
v35.render = function(v62)
    local l_universePlaceInfo_2 = v62.props.universePlaceInfo;
    if l_universePlaceInfo_2 or not v62.props.showLoadingIndicatorWhenDataNotReady then
        local l_localization_0 = v62.props.localization;
        local l_layoutOrder_0 = v62.props.layoutOrder;
        local l_maxWidth_0 = v62.props.maxWidth;
        local v67 = v34[v62.props.featureContext] or v34.Default;
        local v68 = false;
        local v69 = false;
        local v70 = nil;
        if l_universePlaceInfo_2 then
            v68 = v67.JoinGameEnabled and l_universePlaceInfo_2.isPlayable;
            v69 = v67.BuyToPlayButtonEnabled and l_universePlaceInfo_2.reasonProhibited == l_PlayabilityStatusEnum_0.PurchaseRequired;
            v70 = l_universePlaceInfo_2.price;
        end;
        local l_ViewDetailsEnabled_0 = v67.ViewDetailsEnabled;
        local function v92(v72, v73)
            local l_l_GREEN_PRIMARY_0_0 = l_GREEN_PRIMARY_0;
            local v75 = 0;
            local l_l_WHITE_0_0 = l_WHITE_0;
            local v77 = 0;
            local l_WHITE_1 = v17.Color.WHITE;
            local v79 = 0;
            local l_GRAY1_0 = v17.Color.GRAY1;
            local v81 = 0;
            local v82 = nil;
            if v72 then
                local l_Theme_0 = v72.Theme;
                local l_Font_0 = v72.Font;
                l_l_GREEN_PRIMARY_0_0 = l_Theme_0.ContextualPrimaryDefault.Color;
                v75 = l_Theme_0.ContextualPrimaryDefault.Transparency;
                l_l_WHITE_0_0 = l_Theme_0.ContextualPrimaryContent.Color;
                v77 = l_Theme_0.ContextualPrimaryContent.Transparency;
                l_WHITE_1 = l_Theme_0.SystemPrimaryDefault.Color;
                v79 = l_Theme_0.SystemPrimaryDefault.Transparency;
                l_GRAY1_0 = l_Theme_0.SystemPrimaryContent.Color;
                v81 = l_Theme_0.SystemPrimaryContent.Transparency;
                v82 = l_Font_0.Header2.Font;
            end;
            local l_l_l_GREEN_PRIMARY_0_0_0 = l_l_GREEN_PRIMARY_0_0;
            local l_v75_0 = v75;
            local l_l_l_WHITE_0_0_0 = l_l_WHITE_0_0;
            local l_v77_0 = v77;
            local v89 = nil;
            local v90 = nil;
            local v91 = nil;
            if not v68 then
                if not v69 then
                    if not l_ViewDetailsEnabled_0 then
                        return nil;
                    else
                        v89 = v73.viewDetailsText;
                        v90 = v62.openGameDetailsFromButton;
                        l_l_l_GREEN_PRIMARY_0_0_0 = l_WHITE_1;
                        l_v75_0 = v79;
                        l_l_l_WHITE_0_0_0 = l_GRAY1_0;
                        l_v77_0 = v81;
                    end;
                else
                    v90 = v62.openGameDetailsFromButton;
                    v91 = l_SmallRobuxIcon_0;
                end;
            else
                v89 = v73.joinText;
                v90 = v62.joinGameByUser;
            end;
            return v2.createElement(v18, {
                backgroundColor = l_l_l_GREEN_PRIMARY_0_0_0,
                backgroundTransparency = l_v75_0,
                backgroundImage = "rbxasset://textures/ui/LuaChat/9-slice/input-default.png",
                layoutOrder = l_layoutOrder_0,
                leftIconEnabled = v91 ~= nil,
                leftIcon = v91,
                maxWidth = l_maxWidth_0,
                minWidth = 90,
                textFont = v82,
                text = not not v69 and v33(v70) or v89,
                textColor = l_l_l_WHITE_0_0_0,
                textTransparency = l_v77_0,
                onActivated = v90
            });
        end;
        local function v95(v93)
            return l_withStyle_0(function(v94)
                return v92(v94, v93);
            end);
        end;
        if not v20() then
            return v95({
                joinText = l_localization_0:Format("Feature.Chat.Drawer.Join"),
                viewDetailsText = l_localization_0:Format("Feature.Chat.Drawer.ViewDetails")
            });
        else
            return v5({
                joinText = "Feature.Chat.Drawer.Join",
                viewDetailsText = "Feature.Chat.Drawer.ViewDetails"
            })(v95);
        end;
    else
        return v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.new(0, 104, 0, 32)
        }, {
            LoadingBar = v2.createElement(v19)
        });
    end;
end;
return (l_RoactServices_0.connect({
    analytics = l_RoactAnalyticsCommonGameEvents_0,
    guiService = l_AppGuiService_0,
    localization = v8
})((v3.connect(function(v96, v97)
    return {
        universePlaceInfo = v96.UniversePlaceInfos[l_ConvertUniverseIdToString_0(v97.universeId)],
        inGameFriendCount = v96.FriendPresenceCounts[v13.PresenceType.IN_GAME]
    };
end, function(v98)
    return {
        openGameDetails = function(v99)
            v98(v12(v99));
        end
    };
end)(v35))));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.Common.Roact);
local v3 = require(l_Modules_0.Common.RoactRodux);
local v4 = require(l_Modules_0.LuaApp.Constants);
local v5 = require(l_Modules_0.LuaApp.Components.Games.PlayButtonContainer);
local v6 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailMoreButton);
local v7 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailsShareButton);
local v8 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailsPlayWithFriendsButton);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_ActionBarHeight_0 = v4.GameDetails.ActionBarHeight;
local l_ActionBarGradientHeight_0 = v4.GameDetails.ActionBarGradientHeight;
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local v13 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v14 = require(l_Modules_0.LuaApp.Flags.GetLuaAppGameDetailsShareButtonEnabledV2);
local v15 = v2.PureComponent:extend("ActionBar");
v15.defaultProps = {
    bottomPadding = 0,
    showMorePage = true,
    showShareButton = false
};
v15.init = function(v16)
    v16.state = {
        showPlayWithFriendsButton = true
    };
end;
v15.willUnmount = function(_)
end;
v15.render = function(v18)
    local l_appTheme_0 = v18.props.appTheme;
    local l_ZIndex_0 = v18.props.ZIndex;
    local l_leftPadding_0 = v18.props.leftPadding;
    local l_rightPadding_0 = v18.props.rightPadding;
    local l_bottomPadding_0 = v18.props.bottomPadding;
    local l_containerWidth_0 = v18.props.containerWidth;
    local l_universeId_0 = v18.props.universeId;
    local l_showMorePage_0 = v18.props.showMorePage;
    local l_withNewThemeProvider_0 = v18.props.withNewThemeProvider;
    local v28 = v18.state.showPlayWithFriendsButton and v18.props.shouldShowPlayWithFriendsPolicy;
    local v29 = not not l_showMorePage_0 and l_ActionBarHeight_0 or 0;
    local v30 = not l_showMorePage_0 and 0 or 10;
    local v31 = l_ActionBarHeight_0 + l_bottomPadding_0;
    local v32 = v31 + l_ActionBarGradientHeight_0;
    local v33 = -v29 - v30;
    local v34 = v18.props.shareButtonEnabled and v18.props.shouldShowShareButton;
    if v34 then
        v33 = 2 * v33;
    end;
    if v34 then
        v28 = false;
    end;
    if v28 then
        v33 = 2 * v33;
    end;
    return l_withStyle_0(function(v35)
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, v32),
            Position = UDim2.new(0, 0, 1, -v32),
            BackgroundTransparency = 1,
            ZIndex = l_ZIndex_0
        }, {
            ActionBar = v2.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, v31),
                Position = UDim2.new(0, 0, 1, -v31),
                BackgroundColor3 = not not l_withNewThemeProvider_0 and v35.Theme.BackgroundDefault.Color or l_appTheme_0.Color.Background,
                BackgroundTransparency = 0,
                BorderSizePixel = 0
            }, {
                ListLayout = v2.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Horizontal,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, v30)
                }),
                Padding = v2.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, l_leftPadding_0),
                    PaddingRight = UDim.new(0, l_rightPadding_0),
                    PaddingBottom = UDim.new(0, l_bottomPadding_0)
                }),
                MoreButton = l_showMorePage_0 and v2.createElement(v6, {
                    LayoutOrder = 1,
                    universeId = l_universeId_0,
                    leftPadding = l_leftPadding_0,
                    rightPadding = l_leftPadding_0,
                    containerWidth = l_containerWidth_0
                }),
                ShareButton = not not v34 and v2.createElement(v7, {
                    LayoutOrder = 2,
                    universeId = l_universeId_0,
                    leftPadding = l_leftPadding_0,
                    rightPadding = l_leftPadding_0,
                    containerWidth = l_containerWidth_0,
                    withNewThemeProvider = l_withNewThemeProvider_0,
                    context = "ActionBar"
                }) or nil,
                PlayWithFriendsButton = not not v28 and v2.createElement(v8, {
                    LayoutOrder = 3,
                    universeId = l_universeId_0,
                    leftPadding = l_leftPadding_0,
                    rightPadding = l_leftPadding_0,
                    containerWidth = l_containerWidth_0,
                    withNewThemeProvider = l_withNewThemeProvider_0,
                    context = "ActionBar"
                }) or nil,
                PlayButtonContainer = v2.createElement(v5, {
                    Size = UDim2.new(1, v33, 1, 0),
                    LayoutOrder = 4,
                    Font = l_appTheme_0.GameDetails.Text.Font,
                    universeId = l_universeId_0,
                    referralSource = v18.props.referralSource
                })
            }),
            Gradient = v2.createElement("ImageLabel", {
                Size = UDim2.new(1, 0, 0, l_ActionBarGradientHeight_0),
                Position = UDim2.new(0, 0, 1, -v31),
                AnchorPoint = Vector2.new(0, 1),
                BackgroundTransparency = 1,
                Image = "rbxasset://textures/ui/LuaApp/graphic/gradient_0_100.png",
                ImageColor3 = not not l_withNewThemeProvider_0 and v35.Theme.BackgroundDefault.Color or l_appTheme_0.Color.Background
            })
        });
    end);
end;
return (v3.connect(function(v36, _)
    return {
        shareButtonEnabled = v14(v36.LocalUserId)
    };
end)((l_RoactAppPolicy_0.connect(function(v38, _)
    return {
        showMorePage = v38.getGameDetailsMorePage(),
        shouldShowShareButton = v38.shouldShowGameDetailsShareButton(),
        shouldShowPlayWithFriendsPolicy = v38.getGameDetailsPlayWithFriends()
    };
end)((v13(v15))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_Modules_0.Common.Roact);
local v3 = require(l_Modules_0.Common.RoactRodux);
local v4 = require(l_Modules_0.LuaApp.Enum.OverlayType);
local v5 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local l_ApiFetchGameDetails_0 = require(l_CorePackages_0.Workspace.Packages.GameDetailRodux).GameDetails.ApiFetchGameDetails;
local v7 = require(l_Modules_0.LuaApp.Thunks.OpenCentralOverlayForGameDetailMore);
local v8 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v8.Style.withStyle;
local l_ImageSetButton_0 = v8.Core.ImageSet.ImageSetButton;
local l_ImageSetLabel_0 = v8.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v8.App.ImageSet.Images;
local l_ShimmerPanel_0 = v8.App.Loading.ShimmerPanel;
local v14 = require(l_Modules_0.LuaApp.withTheme_DEPRECATED);
local v15 = UDim2.new(0, 44, 0, 44);
local v16 = UDim2.new(0, 37, 0, 37);
local v17 = l_Images_0["component_assets/circle_17"];
local v18 = Rect.new(8, 8, 9, 9);
local v19 = l_Images_0["icons/menu/more_on"];
local v20 = l_Images_0["icons/menu/more_off"];
local v21 = v2.PureComponent:extend("GameDetailMoreButton");
v21.getMoreMenuPosition = function(v22)
    local l_screenWidth_0 = v22.props.screenWidth;
    local l_leftPadding_0 = v22.props.leftPadding;
    local l_current_0 = v22.moreButtonRef.current;
    if l_current_0 == nil then
        return UDim2.new(0, 0, 0, 0);
    else
        local v26 = l_current_0.AbsolutePosition.x + l_current_0.AbsoluteSize.x / 2;
        local l_Y_0 = l_current_0.AbsolutePosition.Y;
        local v28 = (l_screenWidth_0 - 300) / 2;
        local _ = nil;
        return UDim2.new(0, l_screenWidth_0 < 600 and 0 or if v26 < l_leftPadding_0 + 150 then l_leftPadding_0 - v28 else (v26 - 150) - v28, 0, l_Y_0 - 15);
    end;
end;
v21.getMoreMenuWidth = function(v30)
    local l_leftPadding_1 = v30.props.leftPadding;
    local l_rightPadding_0 = v30.props.rightPadding;
    local l_screenWidth_1 = v30.props.screenWidth;
    local v34 = (v30.props.containerWidth - l_leftPadding_1) - l_rightPadding_0;
    if l_screenWidth_1 < 600 then
        return v34;
    else
        return 300;
    end;
end;
v21.init = function(v35)
    v35.moreButtonRef = v2.createRef();
    v35.deselectMoreButton = function()
        v35:setState({
            isMoreButtonSelected = false
        });
    end;
    v35.deselectMoreButton();
    local l_openContextualMenu_0 = v35.props.openContextualMenu;
    v35.onActivated = function()
        local l_appTheme_0 = v35.props.appTheme;
        local l_universeId_0 = v35.props.universeId;
        if not v35.props.isDisabled then
            v35:setState({
                isMoreButtonSelected = true
            });
            l_openContextualMenu_0(l_universeId_0, l_appTheme_0, v35:getMoreMenuPosition(), v35:getMoreMenuWidth(), v35.deselectMoreButton);
            return ;
        else
            return ;
        end;
    end;
end;
v21.render = function(v39)
    return l_withStyle_0(function(v40)
        return v39:renderWithStyle(v40);
    end);
end;
v21.renderWithStyle = function(v41, v42)
    local l_isLoading_0 = v41.props.isLoading;
    local l_isDisabled_0 = v41.props.isDisabled;
    local l_Theme_0 = v42.Theme;
    local v46 = (l_isLoading_0 or l_isDisabled_0) and 0.5 or l_Theme_0.BackgroundDefault.Transparency;
    local _ = nil;
    return v2.createElement(l_ImageSetButton_0, {
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        Size = v15,
        Image = v17,
        ScaleType = Enum.ScaleType.Slice,
        SliceCenter = v18,
        ImageTransparency = v46,
        ImageColor3 = l_Theme_0.BackgroundDefault.Color,
        LayoutOrder = 1,
        ClipsDescendants = false,
        [v2.Event.Activated] = v41.onActivated,
        [v2.Ref] = v41.moreButtonRef
    }, {
        if not l_isLoading_0 then v2.createElement(l_ImageSetLabel_0, {
            Size = v16,
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0.5, 0, 0.5, 0),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            Image = if not v41.state.isMoreButtonSelected then v20 else v19,
            ImageTransparency = l_Theme_0.IconEmphasis.Transparency,
            ImageColor3 = l_Theme_0.IconEmphasis.Color
        }) else v2.createElement(l_ShimmerPanel_0, {
            Size = UDim2.new(1, 0, 1, 0),
            Position = UDim2.new(0, 0, 0, 0),
            shimmerSpeed = 1.5
        })
    });
end;
v21 = v14(v21);
local _ = function(v48, _)
    local v50 = true;
    if v48 ~= v5.NotStarted then
        v50 = v48 == v5.Fetching;
    end;
    return v50;
end;
local function _(v52, v53, v54)
    local v55;
    if v52 == v5.Failed then
        v55 = not v54;
        if v55 then
            goto label0;
        end;
    end;
    v55 = true;
    if v53 ~= v4.GameDetailMore then
        v55 = v53 == v4.GameDetailsPlayWithFriends;
    end;
    ::label0::;
    return v55;
end;
return v3.connect(function(v57, v58)
    local v59 = l_ApiFetchGameDetails_0.GetFetchingStatus(v57, v58.universeId);
    local v60 = v57.Games[v58.universeId];
    local l_OverlayType_0 = v57.CentralOverlay.OverlayType;
    local v62 = {
        screenWidth = v57.ScreenSize.X
    };
    local _ = v57.GameDetails[v58.universeId];
    local v64 = true;
    if v59 ~= v5.NotStarted then
        v64 = v59 == v5.Fetching;
    end;
    v62.isLoading = v64;
    if v59 == v5.Failed then
        v64 = not v60;
        if v64 then
            goto label1;
        end;
    end;
    v64 = true;
    if l_OverlayType_0 ~= v4.GameDetailMore then
        v64 = l_OverlayType_0 == v4.GameDetailsPlayWithFriends;
    end;
    ::label1::;
    v62.isDisabled = v64;
    return v62;
end, function(v65)
    return {
        openContextualMenu = function(v66, v67, v68, v69, v70)
            v65(v7(v66, v67, v68, v69, v70));
        end
    };
end)(v21);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_Modules_0.Common.Roact);
local v4 = require(l_CorePackages_0.UIBlox);
local v5 = require(l_CorePackages_0.Packages.Otter);
local v6 = require(l_CorePackages_0.Cryo);
local v7 = require(l_CorePackages_0.Packages.ApolloClient);
local l_ExternalContentSharingProtocol_0 = require(l_CorePackages_0.Workspace.Packages.ExternalContentSharingProtocol).ExternalContentSharingProtocol;
local l_IXPService_0 = game:GetService("IXPService");
local v10 = require(l_Modules_0.Common.RoactRodux);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v12 = require(l_CorePackages_0.Workspace.Packages.RoactAppExperiment);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v14 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v15 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local v16 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local l_AppGuiService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppGuiService;
local v18 = require(l_Modules_0.LuaApp.Actions.Games.SetGameFavorite);
local v19 = require(l_Modules_0.LuaApp.Thunks.Games.GamePostFavorite);
local v20 = require(l_Modules_0.LuaApp.Actions.SetGameFollow);
local v21 = require(l_Modules_0.LuaApp.Thunks.SendGameFollow);
local v22 = require(l_Modules_0.LuaApp.Actions.Games.SetExperienceNotificationsEnabledCount);
local v23 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v24 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v25 = require(l_Modules_0.LuaApp.Thunks.CloseCentralOverlay);
local v26 = require(l_Modules_0.LuaApp.AppPage);
local v27 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v28 = require(l_Modules_0.LuaApp.Thunks.OpenReportDialog);
local v29 = require(l_Modules_0.LuaApp.Thunks.OpenReportScreen);
local v30 = require(l_Modules_0.LuaApp.Analytics.Events.Games.GameDetailsEvents);
local v31 = require(l_Modules_0.LuaApp.withLocalization);
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local v33 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v34 = require(l_Modules_0.LuaApp.Constants);
local v35 = require(l_Modules_0.LuaApp.DeepLinks.ShareLinks.ShareLinkTypes);
local l_useQuery_0 = v7.useQuery;
local l_gql_0 = v7.gql;
local l_useUserExperiment_0 = v12.useUserExperiment;
local l_CopyExperienceLink_0 = v30.CopyExperienceLink;
local l_Favorite_0 = v30.Favorite;
local l_Follow_0 = v30.Follow;
local l_OpenMore_0 = v30.OpenMore;
local l_ShareExperienceLink_0 = v30.ShareExperienceLink;
local l_ShareGameToChat_0 = v30.ShareGameToChat;
local v45 = require(l_CorePackages_0.Workspace.Packages.SharedFlags);
local v46 = require(l_Modules_0.LuaApp.Http.UrlBuilder);
local v47 = require(l_Modules_0.LuaApp.Flags.FFlagLuaAppFixFavoriteAndFollowOptionsText);
local v48 = require(l_Modules_0.LuaApp.Flags.GetLuaAppGameDetailsMoreShareButtonEnabledV2);
local v49 = require(l_Modules_0.LuaApp.Flags.GetGameDetailsShareButtonAppsflyerRollout);
local l_GetFFlagLuafiedReportEntryPoints_0 = v45.GetFFlagLuafiedReportEntryPoints;
local l_GetFFlagEnableAbuseReport10ft_0 = v45.GetFFlagEnableAbuseReport10ft;
local l_GetFFlagTenFootUiDisableInviteFriends_0 = v45.GetFFlagTenFootUiDisableInviteFriends;
local l_GetFFlagEnableUniversalAppGameInviteUnification_0 = v45.GetFFlagEnableUniversalAppGameInviteUnification;
local l_GetFStringUniversalAppGameInviteMenuLayer_0 = v45.GetFStringUniversalAppGameInviteMenuLayer;
local v55 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppFixNotificationsEnabledLimitReached);
local v56 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppAddNotificationsEnabledAgeGate);
local v57 = require(l_CorePackages_0.Workspace.Packages.GameInvite);
local l_GameInviteModalManager_0 = v57.GameInviteModalManager;
local l_GameInviteAnalyticsManager_0 = v57.GameInviteAnalyticsManager;
local l_GameInviteConstants_0 = v57.GameInviteConstants;
local l_GetNotificationsExperienceDetailsVariant_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetNotificationsExperienceDetailsVariant;
local v62 = game:DefineFastString("ExperienceDetailsCopyLinkExperimentVariant", "enableCopyLinkButton");
local v63 = game:DefineFastString("SocialExperienceDetailsContextualMenuLayer", "Social.ExperienceDetailsContextualMenu");
local l_ContextualMenu_0 = v4.App.Menu.ContextualMenu;
local l_MenuDirection_0 = v4.App.Menu.MenuDirection;
local l_Images_0 = v4.App.ImageSet.Images;
local v67 = v3.PureComponent:extend("GameDetailMoreContextualMenu");
local function v74(v68, v69, v70, v71)
    local _ = nil;
    local v73 = nil;
    if not v69 then
        v69 = DateTime;
    end;
    if not v68 then
        return v46.game.info.appsflyer({
            universeId = v70,
            placeId = v71
        }), v73;
    else
        v73 = tostring(v69.now().UnixTimestampMillis);
        return v46.sharelinks.shortUrl({
            linkId = v68,
            type = v35.ExperienceDetails,
            stamp = v73
        }), v73;
    end;
end;
v67.defaultProps = {
    externalContentSharingProtocol = l_ExternalContentSharingProtocol_0.default,
    onClose = function()
    end
};
v67.init = function(v75)
    v75.isMounted = false;
    v75.getMenuPos = function()
        if v75.props.menuPosition == nil then
            return UDim2.fromOffset(0, 0);
        else
            return v75.props.menuPosition;
        end;
    end;
    v75.getMenuSize = function()
        return UDim2.new(0, 300, 1, 0);
    end;
    v75.getMenuAnchor = function()
        if not (v75.props.menuPosition ~= nil) or v75.props.screenSize == nil then
            return nil;
        elseif not v75.props.menuAnchorPoint then
            return Vector2.new(0, 0);
        else
            return v75.props.menuAnchorPoint;
        end;
    end;
    v75.getLinkPage = function()
        return (v46.game.report({
            placeId = v75.props.rootPlaceId
        }));
    end;
    v75.closeCallback = function()
        if v75.props.onClose then
            v75.props.onClose();
        end;
        v75.props.closeCallback();
    end;
end;
v67.renderContextualMenuContent = function(v76, v77)
    local v78 = {};
    local l_rootPlaceId_0 = v76.props.rootPlaceId;
    local l_eventIngest_0 = v76.props.eventIngest;
    local l_networking_0 = v76.props.networking;
    local l_universeId_0 = v76.props.universeId;
    local l_guiService_0 = v76.props.guiService;
    local v84 = l_Images_0["icons/actions/favoriteOn"];
    local v85 = l_Images_0["icons/actions/favoriteOff"];
    local v86 = v76.props.isFavorite ~= nil and (v76.props.isFavorite or false);
    local v87 = v76.props.isFavorite == nil;
    local v88 = not not v86 and v84 or v85;
    local l_favoriteLabel_0 = v77.favoriteLabel;
    if v47 then
        l_favoriteLabel_0 = not not v86 and v77.favoritedLabel or v77.favoriteLabel;
    end;
    table.insert(v78, {
        icon = v88,
        text = l_favoriteLabel_0,
        stayOnActivated = true,
        onActivated = function()
            if not (not v76.isMounted or v87) and l_rootPlaceId_0 then
                local l_l_networking_0_0 = l_networking_0;
                v76.props.setGameFavorite(l_universeId_0, not v86);
                v76.props.gamePostFavorite(l_l_networking_0_0, l_universeId_0, not v86);
                l_Favorite_0(l_eventIngest_0, "GameDetailMoreContextualMenu", l_rootPlaceId_0, not v86);
                return ;
            else
                return ;
            end;
        end
    });
    if not v76.props.enableNotificationsDiscoverability then
        local v91 = if not v56() then nil else v76.props.isLocalUserUnder13;
        local v92 = v76.props.gameFollowings == nil;
        local v93 = v76.props.gameFollowings ~= nil and (v76.props.gameFollowings.canFollow or false);
        local v94 = v76.props.gameFollowings ~= nil and (v76.props.gameFollowings.isFollowed or false);
        local v95 = l_Images_0["icons/common/notificationOn"];
        local v96 = l_Images_0["icons/common/notificationOff"];
        local l_followLabel_0 = v77.followLabel;
        if v47 then
            l_followLabel_0 = not not v94 and v77.followingLabel or v77.followLabel;
        end;
        if not v91 then
            table.insert(v78, {
                text = l_followLabel_0,
                icon = not not v94 and v95 or v96,
                disabled = v92,
                stayOnActivated = true,
                onActivated = function()
                    if not (not v76.isMounted or v92) and l_rootPlaceId_0 then
                        local l_isFollowed_0 = v76.props.gameFollowings.isFollowed;
                        local l_setCurrentToastMessage_0 = v76.props.setCurrentToastMessage;
                        if not v55() then
                            if v93 or l_isFollowed_0 then
                                v76.props.setGameFollow(l_universeId_0, not l_isFollowed_0);
                                v76.props.sendGameFollow(l_networking_0, l_universeId_0, not l_isFollowed_0, false, nil, nil);
                            else
                                l_setCurrentToastMessage_0({
                                    toastType = v23.GameFollowError,
                                    toastMessage = not v76.props.enableNotificationsRebrand and "Feature.GameFollows.TooltipFollowLimitReached" or "Feature.GameFollows.TooltipNotificationsLimitReached"
                                });
                                return ;
                            end;
                        else
                            local v100 = v76.props.notificationsEnabled.count or 0;
                            local v101 = v76.props.notificationsEnabled.limit or 0;
                            if l_isFollowed_0 then
                                v76.props.setExperienceNotificationsEnabledCount(v100 - 1);
                            elseif v101 <= v100 then
                                l_setCurrentToastMessage_0({
                                    toastType = v23.GameFollowError,
                                    toastMessage = not v76.props.enableNotificationsRebrand and "Feature.GameFollows.TooltipFollowLimitReached" or "Feature.GameFollows.TooltipNotificationsLimitReached"
                                });
                                return ;
                            else
                                v76.props.setExperienceNotificationsEnabledCount(v100 + 1);
                            end;
                            v76.props.setGameFollow(l_universeId_0, not l_isFollowed_0);
                            v76.props.sendGameFollow(l_networking_0, l_universeId_0, not l_isFollowed_0, false, v100, v101);
                        end;
                        l_Follow_0(l_eventIngest_0, "GameDetailMoreContextualMenu", l_rootPlaceId_0, not l_isFollowed_0);
                        return ;
                    else
                        return ;
                    end;
                end
            });
        end;
    end;
    if not v76.props.inviteFriendsDisabled then
        table.insert(v78, {
            text = v77.inviteFriends,
            icon = l_Images_0["icons/actions/friends/friendInvite"],
            onActivated = function()
                if v76.isMounted and l_rootPlaceId_0 then
                    local v102 = false;
                    if l_GetFFlagEnableUniversalAppGameInviteUnification_0() then
                        local v103 = l_GetFStringUniversalAppGameInviteMenuLayer_0();
                        local l_status_0, l_result_0 = pcall(function()
                            return l_IXPService_0:GetUserLayerVariables(v103);
                        end);
                        if l_status_0 then
                            l_IXPService_0:LogUserLayerExposure(v103);
                            v102 = not not l_result_0 and (l_result_0.inAppGameInviteUXRefresh2023 and true or false);
                        end;
                    end;
                    if not v102 then
                        v76.props.navigateDown({
                            name = v26.ShareGameToChat,
                            detail = l_rootPlaceId_0,
                            extraProps = {
                                source = "GameDetailMoreContextualMenu"
                            }
                        });
                        l_ShareGameToChat_0(l_eventIngest_0, "GameDetailMoreContextualMenu", l_rootPlaceId_0);
                    else
                        l_GameInviteAnalyticsManager_0:withButtonName(l_GameInviteAnalyticsManager_0.ButtonName.GameDetailsMoreMenu);
                        l_GameInviteAnalyticsManager_0:inputShareGameEntryPoint(l_rootPlaceId_0, l_universeId_0);
                        l_GameInviteModalManager_0:openModal({
                            trigger = l_GameInviteConstants_0.Triggers.GameDetailsMoreMenu,
                            rootPlaceId = l_rootPlaceId_0,
                            universeId = l_universeId_0
                        });
                    end;
                    v76.closeCallback();
                    return ;
                else
                    return ;
                end;
            end
        });
    end;
    if v76.props.enableCopyLink then
        table.insert(v78, {
            icon = l_Images_0["icons/menu/link"],
            onActivated = function()
                if v76.isMounted and l_rootPlaceId_0 then
                    local v106, v107 = v74(v76.props.shareLinkId, v76.props.dateTimeOverride, l_universeId_0, l_rootPlaceId_0);
                    v76.props.externalContentSharingProtocol:shareUrl({
                        context = "GameDetailsMoreWebURL",
                        url = v106
                    });
                    l_CopyExperienceLink_0(l_eventIngest_0, "GameDetailMoreContextualMenu", l_rootPlaceId_0, {
                        stamp = v107
                    });
                    v76.props.setCurrentToastMessage({
                        toastMessage = "Feature.GameDetails.Toast.LinkCopied",
                        toastType = v23.SuccessConfirmation
                    });
                    v76.closeCallback();
                    return ;
                else
                    return ;
                end;
            end,
            text = v77.copyLink
        });
    end;
    if not (not v76.props.shareButtonEnabled or not v76.props.shouldShowShareButton) then
        table.insert(v78, {
            text = v77.share,
            icon = l_Images_0["icons/actions/share"],
            onActivated = function()
                if v76.isMounted and l_rootPlaceId_0 then
                    if not v76.props.shouldShareToProvider then
                        local v108 = nil;
                        local v109 = nil;
                        if not v76.props.shareToAppsflyer then
                            v108 = v46.game.info.webpage({
                                placeId = l_rootPlaceId_0
                            });
                        else
                            local v110, v111 = v74(v76.props.shareLinkId, v76.props.dateTimeOverride, l_universeId_0, l_rootPlaceId_0);
                            v108 = v110;
                            v109 = v111;
                        end;
                        l_ShareExperienceLink_0(l_eventIngest_0, "GameDetailMoreContextualMenu", l_rootPlaceId_0, {
                            shortShareLinkFailed = not v76.props.shareLinkId,
                            shareToAppsflyer = v76.props.shareToAppsflyer,
                            stamp = v109,
                            linkId = v76.props.shareLinkId
                        });
                        v76.props.externalContentSharingProtocol:shareUrl({
                            url = v108,
                            context = "GameDetailsMoreWebURL"
                        });
                    else
                        v76.props.navigateDown({
                            name = v26.SdkShare,
                            extraProps = {
                                universeId = l_universeId_0,
                                context = "GameDetailsMoreWebURL"
                            }
                        });
                    end;
                    v76.closeCallback();
                    return ;
                else
                    return ;
                end;
            end
        });
    end;
    if not v76.props.reportingDisabled then
        table.insert(v78, {
            text = v77.report,
            icon = l_Images_0["icons/actions/feedback"],
            onActivated = function()
                if v76.isMounted and l_rootPlaceId_0 then
                    if not v76.props.useLuafiedReportFlow then
                        if v76.props.supportsWebViews then
                            v76.props.navigateDown({
                                name = v26.GenericWebPage,
                                detail = v76:getLinkPage(),
                                extraProps = {
                                    title = v77.localizedTextReport
                                }
                            });
                        else
                            v76.props.setToastMessage(v34.WEBVIEWS_UNAVAILABLE_TOAST);
                            return ;
                        end;
                    elseif (not l_GetFFlagEnableAbuseReport10ft_0() or not l_guiService_0) or not l_guiService_0:IsTenFootInterface() then
                        v76.props.reportExperienceDialog({
                            reportEntryPoint = v34.ReportDialogEntryPoints.ExperienceDetails,
                            universeId = l_universeId_0,
                            rootPlaceId = l_rootPlaceId_0
                        });
                    else
                        v76.props.reportExperienceScreen({
                            context = v34.ReportScreen.Contexts.Experience,
                            assetId = tostring(l_rootPlaceId_0),
                            reportAbuseVector = v34.ReportScreen.AbuseVectors.Place,
                            platform = v34.ReportScreen.Platforms.Console
                        });
                    end;
                    v76.closeCallback();
                    return ;
                else
                    return ;
                end;
            end
        });
    end;
    return v78;
end;
v67.renderLandscapeContextualMenu = function(v112, v113)
    return v3.createElement("Frame", {
        BackgroundTransparency = 1,
        Position = v112.getMenuPos(),
        Size = v112.getMenuSize()
    }, {
        ContextMenu = v3.createElement(l_ContextualMenu_0, {
            buttonProps = v112:renderContextualMenuContent(v113),
            open = true,
            horizontalAlignment = Enum.HorizontalAlignment.Left,
            openPositionX = UDim.new(0, 0),
            openPositionY = UDim.new(0, 0),
            closeBackgroundVisible = false,
            screenSize = v112.props.screenSize,
            onDismiss = v112.closeCallback,
            contextMenuWidthOverride = UDim.new(1, 0),
            anchorPointOverride = v112:getMenuAnchor(),
            motorOverrideOptions = {
                motorCallback = v5.instant,
                open = {
                    targetValue = 1
                },
                close = {
                    targetValue = 0
                }
            }
        })
    });
end;
v67.renderPortraitContextualMenu = function(v114, v115)
    local l_screenSize_0 = v114.props.screenSize;
    return v3.createElement("Frame", {
        BackgroundTransparency = 1,
        Position = UDim2.new(if not (v114.props.deviceOrientation == l_DeviceOrientationMode_0.Portrait) then (l_screenSize_0 ~= nil and l_screenSize_0.X > 0) and (v114.props.menuPosition.X.Offset / l_screenSize_0.X) / 2 or 0 else 0, 0, 0, 0),
        Size = UDim2.new(1, 0, 1, 0)
    }, {
        ContextMenu = v3.createElement(l_ContextualMenu_0, {
            buttonProps = v114:renderContextualMenuContent(v115),
            open = true,
            menuDirection = l_MenuDirection_0.Up,
            openPositionY = UDim.new(1, -76),
            closeBackgroundVisible = false,
            screenSize = l_screenSize_0,
            onDismiss = v114.closeCallback
        })
    });
end;
v67.didMount = function(v117)
    v117.isMounted = true;
    local l_currentPage_0 = v117.props.currentPage;
    if l_currentPage_0 ~= v26.GameDetail and l_currentPage_0 ~= v26.ExperienceDetail then
        v117.closeCallback();
        return ;
    else
        l_OpenMore_0(v117.props.eventIngest, "GameDetailMoreContextualMenu", v117.props.rootPlaceId);
        return ;
    end;
end;
v67.willUnmount = function(v119)
    v119.isMounted = false;
end;
v67.render = function(v120)
    return v31({
        favoriteLabel = "Feature.Favorites.Label.Favorite",
        favoritedLabel = "Feature.Favorites.Label.Favorited",
        followLabel = not v120.props.enableNotificationsRebrand and "Feature.GameDetails.Label.Follow" or "Feature.GameFollows.LabelNotifications",
        followingLabel = "Feature.Friends.Label.Following",
        inviteFriends = "Feature.GameDetails.Action.InviteFriends",
        copyLink = "Feature.GameDetails.Action.CopyLink",
        share = "Feature.SocialShare.Action.Share",
        report = "Feature.GameDetails.Action.Report"
    })(function(v121)
        if not (v120.props.deviceOrientation == l_DeviceOrientationMode_0.Portrait) then
            return v120:renderLandscapeContextualMenu(v121);
        else
            return v120:renderPortraitContextualMenu(v121);
        end;
    end);
end;
v67 = l_RoactAppPolicy_0.connect(function(v122, _)
    return {
        shouldShowShareButton = v122.shouldShowGameDetailsShareButton(),
        shouldShareToProvider = v122.shouldShareToAccountProvider(),
        reportingDisabled = v122.getGameReportingDisabled(),
        supportsWebViews = v122.getWebViewSupport(),
        useLuafiedReportFlow = if l_GetFFlagLuafiedReportEntryPoints_0() or l_GetFFlagEnableAbuseReport10ft_0() then v122.getUseLuafiedReportFlow() else nil,
        inviteFriendsDisabled = if not l_GetFFlagTenFootUiDisableInviteFriends_0() then nil else v122.getInviteFriendsDisabled()
    };
end)((v10.connect(function(v124, v125)
    local v126 = v124.GameDetails[v125.universeId];
    local v127 = v124.Games[v125.universeId];
    return {
        rootPlaceId = not not v126 and v126.rootPlaceId or v127 and v127.placeId,
        isFavorite = v124.GameFavorites[v125.universeId],
        gameFollowings = v124.GameFollowings[v125.universeId],
        currentPage = v124.Navigation.currentRoute.routeName,
        shareButtonEnabled = v48(v124.LocalUserId),
        shareToAppsflyer = v49(v124.LocalUserId),
        screenSize = v124.ScreenSize,
        deviceOrientation = v124.DeviceOrientation,
        notificationsEnabled = if not v55() then nil else v124.ExperienceNotificationsEnabled or {},
        isLocalUserUnder13 = if not v56() then nil else v124.IsLocalUserUnder13
    };
end, function(v128)
    return {
        closeCallback = function()
            v128(v25());
        end,
        gamePostFavorite = function(v129, v130, v131)
            return v128(v19(v129, v130, v131));
        end,
        setGameFavorite = function(v132, v133)
            return v128(v18(v132, v133));
        end,
        sendGameFollow = function(v134, v135, v136, v137, v138, v139)
            return v128(v21(v134, v135, v136, v137, v138, v139));
        end,
        setGameFollow = function(v140, v141)
            return v128(v20(v140, v141));
        end,
        setCurrentToastMessage = function(v142)
            return v128(v33(v142));
        end,
        navigateDown = function(v143)
            return v128(v27(v143));
        end,
        setToastMessage = function(v144)
            return v128(v33(v144));
        end,
        reportExperienceDialog = if not l_GetFFlagLuafiedReportEntryPoints_0() then nil else function(v145)
            return v128(v28(v145));
        end,
        reportExperienceScreen = if not l_GetFFlagEnableAbuseReport10ft_0() then nil else function(v146)
            return v128(v29(v146));
        end,
        setExperienceNotificationsEnabledCount = if not v55() then nil else function(v147)
            return v128(v22(v147));
        end
    };
end)(v67)));
if l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then
    v67 = v12.connectUserLayer({
        v24.ExperienceDetailsPageLayer
    }, function(v148, _)
        local v150 = (v148[v24.ExperienceDetailsPageLayer] or {})[l_GetNotificationsExperienceDetailsVariant_0.getNotificationsVariantFieldName] or -1;
        return {
            enableNotificationsDiscoverability = v150 == 2,
            enableNotificationsRebrand = v150 > 0
        };
    end)(v67);
end;
local v151 = l_gql_0("\t\tquery ExperienceDetailsLink($universeId: String $universeId) {\n\t\t\t\tlinkId\n\t\t\t}\n\t\t}\n\t");
local l_v67_0 = v67;
return l_RoactServices_0.connect({
    networking = v14,
    localization = v15,
    eventIngest = v16,
    guiService = if not l_GetFFlagEnableAbuseReport10ft_0() then nil else l_AppGuiService_0
})(function(v153)
    local _ = nil;
    local v155 = nil;
    local v156 = l_useQuery_0(v151, {
        variables = {
            universeId = v153.universeId
        }
    });
    if not (not v156.data or not v156.data.experienceDetailsLinkByUniverseId) then
        v155 = v156.data.experienceDetailsLinkByUniverseId.linkId;
    end;
    return v3.createElement(l_v67_0, (v6.Dictionary.join(v153, {
        enableCopyLink = l_useUserExperiment_0({
            v63
        }, function(v157)
            return (v157[v63] or {})[v62];
        end, true),
        shareLinkId = v155
    })));
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_AppStorageService_0 = game:GetService("AppStorageService");
local v3 = require(l_CorePackages_0.Promise);
local v4 = require(l_CorePackages_0.Packages.React);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v6 = require(l_Modules_0.LuaApp.Constants);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v8 = require(l_Modules_0.LuaApp.Components.GameDetails.GameDetailNotificationsButtonHint);
local v9 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v9.App.ImageSet.Images;
local l_IconButton_0 = v9.App.Button.IconButton;
local l_IconSize_0 = v9.App.ImageSet.Enum.IconSize;
local l_TooltipOrientation_0 = v9.App.Dialog.Enum.TooltipOrientation;
local v14 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppEnableNotificationsEDPTooltip);
local v15 = require(l_Modules_0.LuaApp.Flags.GetFIntNotificationsEDPTooltipTimeLimit);
local v16 = l_Images_0["icons/common/notificationOn"];
local v17 = l_Images_0["icons/common/notificationOff"];
return function(v18)
    local v19 = nil;
    local v20 = nil;
    local v21 = nil;
    local v22 = nil;
    if v14() then
        local function _()
            local l_status_0, l_result_0 = pcall(function()
                return l_AppStorageService_0:GetItem("ShowNotificationsOptInTooltip");
            end);
            if not l_status_0 then
                return false;
            else
                return l_result_0 == "true";
            end;
        end;
        local l_useRef_0 = v4.useRef;
        local l_status_1, l_result_1 = pcall(function()
            return l_AppStorageService_0:GetItem("ShowNotificationsOptInTooltip");
        end);
        l_useRef_0 = l_useRef_0(not not l_status_1 and l_result_1 == "true");
        local v29;
        v29, l_status_1 = v4.useState(l_useRef_0.current);
        v19 = v29;
        v20 = l_status_1;
        v29, l_status_1 = v4.useState(false);
        l_result_1 = function()
            v20(false);
            l_status_1(true);
        end;
        v4.useEffect(function()
            if l_useRef_0.current then
                l_AppStorageService_0:SetItem("ShowNotificationsOptInTooltip", "false");
                l_AppStorageService_0:Flush();
            end;
            v3.delay(v15()):andThen(function()
                v20(false);
                l_status_1(true);
            end);
        end, {});
        local v31 = l_useSelector_0(function(v30)
            return v30.TopBar.statusBarHeight;
        end);
        v22 = v4.useCallback(function(v32)
            if not (not (v32 ~= nil) or not l_useRef_0.current) then
                if v32.AbsolutePosition.Y < v31 + v6.NAV_BAR_SIZE then
                    v20(false);
                    return ;
                elseif not v29 then
                    v20(true);
                end;
            end;
        end, {
            v29
        });
        v21 = v4.useCallback(function()
            v20(false);
            l_status_1(true);
            if v18.toggleFollowExperience then
                v18.toggleFollowExperience();
            end;
        end, {});
    end;
    return v4.createElement("Frame", {
        BackgroundTransparency = 1,
        LayoutOrder = v18.layoutOrder,
        AutomaticSize = if not v14() then Enum.AutomaticSize.Y else Enum.AutomaticSize.XY,
        Size = UDim2.new(1, 0, 0, 0),
        Position = v18.position
    }, {
        IconButton = v4.createElement(l_IconButton_0, {
            icon = if not (v18.gameFollowings and v18.gameFollowings.isFollowed) then v17 else v16,
            iconSize = l_IconSize_0.Medium,
            onActivated = if not v14() then v18.toggleFollowExperience else v21
        }, {
            Tooltip = if not v14() then nil else v4.createElement(v8, {
                onPositionChanged = v22,
                isActive = v19,
                preferredOrientation = l_TooltipOrientation_0.Top
            })
        })
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local _ = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Packages.React);
local l_withTooltip_0 = require(l_CorePackages_0.UIBlox).App.Dialog.TooltipV2.withTooltip;
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
return function(v6)
    return l_withTooltip_0({
        bodyText = l_useLocalization_0({
            TooltipText = "Feature.GameFollows.TooltipNotificationsButtonDescription"
        }).TooltipText,
        textAlignment = Enum.TextXAlignment.Left,
        useLargeDropShadow = false
    }, {
        active = v6.isActive,
        guiTarget = l_CoreGui_0,
        DisplayOrder = 1,
        preferredOrientation = v6.preferredOrientation
    }, function(v7)
        local function v9(v8)
            if v6.onPositionChanged then
                v6.onPositionChanged(v8);
            end;
            v7(v8);
        end;
        return v3.createElement("Frame", {
            Visible = false,
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            [v3.Change.AbsolutePosition] = v9,
            [v3.Change.AbsoluteSize] = v9
        });
    end);
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v5 = require(l_Modules_0.Common.memoize);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_ApiFetchGameDetails_0 = require(l_CorePackages_0.Workspace.Packages.GameDetailRodux).GameDetails.ApiFetchGameDetails;
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local v10 = require(l_Modules_0.LuaApp.Components.FitTextLabel);
local v11 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v13 = require(l_Modules_0.LuaApp.Components.LoadingSkeleton);
local v14 = require(l_Modules_0.LuaApp.Components.Games.GameMediaAccordionView);
local v15 = require(l_Modules_0.LuaApp.Components.GameDetails.GameInfoList);
local v16 = require(l_Modules_0.LuaApp.Components.GameDetails.GameHeader);
local v17 = require(l_Modules_0.LuaApp.Components.GameDetails.GamePlaysAndRatings);
local v18 = require(l_Modules_0.LuaApp.Components.GameDetails.RecommendedGameCarousel);
local v19 = require(l_Modules_0.LuaApp.Components.GameDetails.SwapToSourceButton);
local v20 = require(l_Modules_0.LuaApp.Thunks.Games.FetchGameDetailsPageData);
local v21 = require(l_Modules_0.LuaApp.Thunks.Games.RecommendedGames);
local v22 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v23 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v24 = require(l_Modules_0.LuaApp.Experiment.RoactAppExperiment);
local v25 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v26 = require(l_Modules_0.LuaApp.Components.VirtualEvents.EventsListWrapper);
local v27 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v27.Style.withStyle;
local l_LoadingStateContainer_0 = v27.App.Container.LoadingStateContainer;
local l_RetrievalStatus_0 = v27.App.Loading.Enum.RetrievalStatus;
local l_EmptyState_0 = v27.App.Indicator.EmptyState;
local l_ExpandableTextArea_0 = v27.App.Text.ExpandableTextArea;
local v33 = require(l_Modules_0.LuaApp.Components.ExperienceDetails.ExperienceMediaGallery);
local l_GetFFlagEnableSwapToSourceButton_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEnableSwapToSourceButton;
local v35 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppShowPillContainsStrongLanguage);
local v36 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppShowPillContainsStrongLanguageContent);
local v37 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppShowPillContainsStrongLanguageIXP);
local v38 = require(l_Modules_0.LuaApp.Flags.GetFStringLuaAppShowPillContainsStrongLanguageLayer);
local l_GetFFlagEDPContextRedesign_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEDPContextRedesign;
local v40 = {
    [1] = {
        Size = UDim2.new(0.5, 0, 0, 35)
    },
    [2] = {
        Size = UDim2.new(0.25, 0, 0, 24)
    },
    [3] = {
        Size = UDim2.new(1, 0, 0, 200)
    },
    [4] = {
        Size = UDim2.new(1, 0, 0, 24)
    },
    [5] = {
        Size = UDim2.new(0.6, 0, 0, 24)
    }
};
local function _(v41)
    if v41 < 600 then
        return 20;
    else
        return 40;
    end;
end;
local _ = function(v43)
    if v43 == nil then
        return false;
    else
        for _, v45 in pairs(v43) do
            if not (not (v45.name == "strong-language") or not v45.contains) then
                return true;
            end;
        end;
        return false;
    end;
end;
local v47 = v2.PureComponent:extend("GameDetailsCard");
v47.init = function(v48)
    v22.isType(v48.props.universeId, "string", "GameDetailsCard.init.universeId");
    v48.fetchGameDetailsPageData = function()
        return v48.props.fetchGameDetailsPageData(v48.props.networking, v48.props.universeId);
    end;
    v48.headerFrameRef = v2.createRef();
    if l_GetFFlagEnableSwapToSourceButton_0() then
        v48.isMounted = false;
        v48.state = {
            showSource = false
        };
        v48.onSwapToSource = function()
            if v48.isMounted then
                v48:setState({
                    showSource = not v48.state.showSource
                });
            end;
        end;
    end;
    v48.onListLayoutAbsoluteContentSizeChanged = function(v49)
        if v48.headerFrameRef.current then
            v48.headerFrameRef.current.Size = UDim2.new(1, 0, 0, v49.AbsoluteContentSize.Y);
        end;
    end;
end;
v47.renderOnLoading = function(_, v51)
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        Padding = v2.createElement("UIPadding", {
            PaddingTop = UDim.new(0, 0),
            PaddingLeft = UDim.new(0, v51),
            PaddingRight = UDim.new(0, v51)
        }),
        Skeleton = v2.createElement(v13, {
            Size = UDim2.new(1, 0, 1, 0),
            createLayout = function()
                return v2.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, 15)
                });
            end,
            panels = v40
        })
    });
end;
v47.renderOnLoaded = function(v52, v53, v54)
    local l_universeId_0 = v52.props.universeId;
    local l_gameDetail_0 = v52.props.gameDetail;
    local l_gameInfo_0 = v52.props.gameInfo;
    local v58 = not not l_gameDetail_0 and l_gameDetail_0.rootPlaceId or l_gameInfo_0 and l_gameInfo_0.placeId;
    local v59 = v52.props.showRecommendedGames and v52.props.enableRecommendedGames;
    local v60 = l_gameDetail_0 and v52.props.enableSocial;
    local v61 = l_gameDetail_0 and v52.props.enableGameInfoList;
    local l_enableGamePlaysAndRatings_0 = v52.props.enableGamePlaysAndRatings;
    local v63 = nil;
    local v64 = nil;
    local v65 = v52.props.showGamePassPreview and v52.props.enableGamePassPreview;
    local l_showGameDetailsLayoutChanges_0 = v52.props.showGameDetailsLayoutChanges;
    local v67 = nil;
    local l_l_gameDetail_0_0 = l_gameDetail_0;
    if l_l_gameDetail_0_0 then
        l_l_gameDetail_0_0 = false;
        if l_gameDetail_0.description ~= nil then
            l_l_gameDetail_0_0 = l_gameDetail_0.description ~= "";
        end;
    end;
    local l_showGlobalCounters_0 = v52.props.showGlobalCounters;
    local l_ageRecommendations_0 = v52.props.ageRecommendations;
    local v71 = nil;
    local v72 = nil;
    if l_ageRecommendations_0 then
        local l_summary_0 = l_ageRecommendations_0.summary;
        v71 = if not not l_summary_0 and l_summary_0.ageRecommendation then l_summary_0.ageRecommendation.displayName else nil;
        if not v36() then
            v72 = nil;
        else
            local l_descriptorUsages_0 = v52.props.ageRecommendations.descriptorUsages;
            if l_descriptorUsages_0 == nil then
                v72 = false;
            else
                for _, v76 in pairs(l_descriptorUsages_0) do
                    if not (not (v76.name == "strong-language") or not v76.contains) then
                        v72 = true;
                        goto label0 --[[  true, false  ]];
                    end;
                end;
                v72 = false;
            end;
        end;
    end;
    ::label0::;
    local v77 = if not v37() then nil else v52.props.isShowContainsStrongLanguageWarningEnabled;
    local v78 = if not v35() then nil else v52.props.containsStrongLanguage or v72;
    if l_GetFFlagEnableSwapToSourceButton_0() then
        local l_l_gameDetail_0_1 = l_gameDetail_0;
        if l_l_gameDetail_0_1 then
            l_l_gameDetail_0_1 = false;
            if l_gameDetail_0.sourceDescription ~= nil then
                l_l_gameDetail_0_1 = l_gameDetail_0.sourceDescription ~= "";
            end;
        end;
        local l_l_gameDetail_0_2 = l_gameDetail_0;
        if l_l_gameDetail_0_2 then
            l_l_gameDetail_0_2 = false;
            if l_gameDetail_0.sourceName ~= nil then
                l_l_gameDetail_0_2 = l_gameDetail_0.sourceName ~= "";
            end;
        end;
        v63 = v52.props.enableSwapToSource and (l_l_gameDetail_0_2 or l_l_gameDetail_0_1);
        v64 = v52.state.showSource;
        v67 = l_gameDetail_0 and (v64 and l_gameDetail_0.sourceDescription or l_gameDetail_0.description);
    end;
    return l_withStyle_0(function(v81)
        return v2.createElement("Frame", {
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, 0, 0, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            AutomaticSize = Enum.AutomaticSize.Y
        }, {
            ListLayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 24)
            }),
            PagePadding = v2.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, v54),
                PaddingRight = UDim.new(0, v54),
                PaddingTop = if not not l_GetFFlagEDPContextRedesign_0() and v52.props.topPaddingBinding then v52.props.topPaddingBinding:map(function(v82)
                    return UDim.new(0, v82);
                end) else UDim.new(0, 0),
                PaddingBottom = UDim.new(0, 20)
            }),
            HeaderFrame = v2.createElement("Frame", {
                LayoutOrder = 1,
                Position = UDim2.new(0, 0, 0, 0),
                Size = UDim2.new(1, 0, 0, 0),
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                [v2.Ref] = v52.headerFrameRef,
                [v2.Change.AbsoluteSize] = if not l_GetFFlagEDPContextRedesign_0() then nil else v52.props.onHeaderFrameSizeChanged,
                AutomaticSize = Enum.AutomaticSize.None
            }, {
                ListLayout = v2.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, not l_GetFFlagEDPContextRedesign_0() and 12 or 20),
                    [v2.Change.AbsoluteContentSize] = v52.onListLayoutAbsoluteContentSizeChanged
                }),
                MediaGalleryFrame = if not l_GetFFlagEDPContextRedesign_0() then nil else v2.createElement("Frame", {
                    LayoutOrder = 1,
                    Position = UDim2.new(0, 0, 0, 0),
                    Size = UDim2.new(1, v54 * 2, 0, 0),
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    AutomaticSize = Enum.AutomaticSize.Y
                }, {
                    MediaGallery = v2.createElement(v33, {
                        LayoutOrder = 1,
                        universeId = l_universeId_0,
                        deviceType = "Phone"
                    })
                }),
                Header = v2.createElement(v16, {
                    LayoutOrder = not l_GetFFlagEDPContextRedesign_0() and 1 or 2,
                    universeId = l_universeId_0,
                    withNewThemeProvider = true,
                    showSource = v64,
                    ageSummary = v71,
                    isShowContainsStrongLanguageWarningEnabled = if not v37() then nil else v77,
                    containsStrongLanguage = if not v35() then nil else v78,
                    showVisits = l_showGameDetailsLayoutChanges_0
                }),
                ThumbnailAccordion = if not l_GetFFlagEDPContextRedesign_0() then v2.createElement(v14, {
                    LayoutOrder = 2,
                    universeId = l_universeId_0,
                    placeId = v58,
                    width = v53 - 2 * v54,
                    withNewThemeProvider = true
                }) else nil
            }),
            Description = if not not l_showGameDetailsLayoutChanges_0 and l_l_gameDetail_0_0 then v2.createElement(l_ExpandableTextArea_0, {
                Text = if not l_GetFFlagEnableSwapToSourceButton_0() then l_gameDetail_0 and l_gameDetail_0.description else v67,
                compactNumberOfLines = 3,
                padding = Vector2.new(0, 0),
                LayoutOrder = 3
            }) else l_l_gameDetail_0_0 and v2.createElement(v10, {
                LayoutOrder = 3,
                Size = UDim2.new(1, 0, 0, 0),
                Text = if not l_GetFFlagEnableSwapToSourceButton_0() then l_gameDetail_0 and l_gameDetail_0.description else v67,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextWrapped = true,
                BackgroundTransparency = 1,
                Font = v81.Font.Body.Font,
                TextSize = v81.Font.BaseSize * v81.Font.Body.RelativeSize,
                TextColor3 = v81.Theme.TextDefault.Color,
                TextTransparency = v81.Theme.TextDefault.Transparency
            }),
            SwapToSourceButton = (l_GetFFlagEnableSwapToSourceButton_0() and v63) and v2.createElement(v19, {
                layoutOrder = 4,
                universeId = l_universeId_0,
                showSource = v64,
                padding = 30,
                onSwapToSource = v52.onSwapToSource,
                font = v81.Font.Body.Font,
                textColor = v81.Theme.TextDefault.Color,
                textSize = v81.Font.BaseSize * v81.Font.Body.RelativeSize
            }),
            PlaysAndRatings = l_enableGamePlaysAndRatings_0 and v2.createElement(v17, {
                LayoutOrder = if not l_showGameDetailsLayoutChanges_0 then l_GetFFlagEnableSwapToSourceButton_0() and 5 or 4 else l_GetFFlagEnableSwapToSourceButton_0() and 6 or 5,
                universeId = l_universeId_0,
                containerWidth = v53 - 2 * v54,
                rowPadding = 20,
                withNewThemeProvider = true,
                showGlobalCounters = l_showGlobalCounters_0,
                hideVisits = l_showGameDetailsLayoutChanges_0
            }),
            InfoList = v61 and v2.createElement(v15, {
                LayoutOrder = if not l_showGameDetailsLayoutChanges_0 then l_GetFFlagEnableSwapToSourceButton_0() and 6 or 5 else l_GetFFlagEnableSwapToSourceButton_0() and 5 or 4,
                universeId = l_universeId_0,
                leftPadding = v54,
                rightPadding = v54,
                withNewThemeProvider = true,
                showSocial = v60,
                ageRecommendations = l_ageRecommendations_0,
                width = v53,
                enableGamePassPreview = v65
            }),
            EventsList = v2.createElement(v26, {
                layoutOrder = not l_GetFFlagEnableSwapToSourceButton_0() and 7 or 8,
                universeId = l_universeId_0,
                referralSource = "expDetailsPage"
            }),
            RecommendedGames = v59 and v2.createElement("Frame", {
                LayoutOrder = not l_GetFFlagEnableSwapToSourceButton_0() and 8 or 9,
                Size = UDim2.new(1, v54 * 2, 0, 0),
                BorderSizePixel = 0,
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundTransparency = 1
            }, {
                Layout = v2.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical
                }),
                Padding = v2.createElement("UIPadding", {
                    PaddingBottom = UDim.new(0, v54),
                    PaddingLeft = UDim.new(0, v54),
                    PaddingRight = UDim.new(0, v54)
                }),
                Carousel = v2.createElement(v18, {
                    universeId = l_universeId_0,
                    withNewThemeProvider = true,
                    gameDetailsViewWidth = v53,
                    onPeekViewClosed = v52.props.onPeekViewClosed
                })
            })
        });
    end);
end;
v47.renderOnFailed = function(v83, v84, v85, v86)
    if not v83.props.gameInfo then
        return v2.createElement(l_EmptyState_0, {
            onActivated = v83.fetchGameDetailsPageData,
            text = v84.failedMessage
        });
    else
        return v83:renderOnLoaded(v85, v86);
    end;
end;
v47.getImageSize = function(_, v88, v89, v90, v91)
    local v92 = v89 * 1.8;
    local v93 = v91 / v90;
    local v94 = math.max(v92, v88 * v93);
    return Vector2.new(v94 / v93, v94);
end;
v47.render = function(v95)
    local l_screenSize_0 = v95.props.screenSize;
    local l_globalGuiInset_0 = v95.props.globalGuiInset;
    local l_gameDetailsPageDataStatus_0 = v95.props.gameDetailsPageDataStatus;
    local v99 = l_getSafeAreaSize_0(l_screenSize_0, l_globalGuiInset_0);
    local v100 = math.min(v99.X.Offset, 640);
    local l_Offset_0 = v99.Y.Offset;
    local v102 = v100 < 600 and 20 or 40;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        Position = UDim2.new(0, 0, 0, 0),
        BackgroundTransparency = 1,
        ClipsDescendants = true
    }, {
        GameDetails = v2.createElement("Frame", {
            Position = UDim2.new(0, 0, 0, 0),
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, 0, 0, 0),
            BackgroundTransparency = 1
        }, {
            Background = v2.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, l_Offset_0),
                Position = UDim2.new(0, 0, 0, 0),
                BackgroundTransparency = 1,
                ZIndex = 1
            }),
            LoadingState = l_withLocalization_0({
                failedMessage = "Feature.EmptyStatePage.Message.NoInternet"
            })(function(v103)
                return v2.createElement("Frame", {
                    Size = UDim2.fromScale(1, 0),
                    AutomaticSize = Enum.AutomaticSize.Y,
                    Position = UDim2.new(0, 0, 0, 0),
                    ZIndex = 2,
                    BackgroundTransparency = 1
                }, {
                    LoadingStateContainer = v2.createElement(l_LoadingStateContainer_0, {
                        dataStatus = l_RetrievalStatus_0.fromRawValue(l_gameDetailsPageDataStatus_0),
                        renderOnFailed = function()
                            return v95:renderOnFailed(v103, v100, v102);
                        end,
                        renderOnLoading = function()
                            return v95:renderOnLoading(v102);
                        end,
                        renderOnLoaded = function()
                            return v95:renderOnLoaded(v100, v102);
                        end
                    })
                });
            end)
        })
    });
end;
v47.didMount = function(v104)
    if l_GetFFlagEnableSwapToSourceButton_0() then
        v104.isMounted = true;
    end;
    v104.fetchGameDetailsPageData();
end;
v47.willUnmount = function(v105)
    if l_GetFFlagEnableSwapToSourceButton_0() then
        v105.isMounted = false;
    end;
    local l_eventIngest_0 = v105.props.eventIngest;
    local l_universeId_1 = v105.props.universeId;
    local v108 = not not v105.props.gameDetail and v105.props.gameDetail.rootPlaceId or nil;
    local v109 = v105.props.source or "None";
    local v110 = v105.props.index or -1;
    if (l_eventIngest_0 ~= nil and l_universeId_1 ~= nil) and v108 ~= nil then
        l_eventIngest_0:setRBXEventStream("GameDetailsCard", "viewClose", {
            universeId = l_universeId_1,
            rootPlaceId = v108,
            source = v109,
            index = v110
        });
    end;
end;
local v113 = v5(function(v111, v112)
    if v111 == v11.Done and (not (v112 ~= nil) or #v112 == 0) then
        return false;
    else
        return true;
    end;
end);
return (v24.connectUserLayer({
    v25.ExperienceDetailsPageLayer,
    v38()
}, function(v114, _)
    local v116 = if not v37() then nil else (v114[v38()] or {}).IsShowContainsStrongLanguageWarningEnabled;
    local v117 = v114[v25.ExperienceDetailsPageLayer] or {};
    return {
        showGamePassPreview = v117.showGamePassPreview,
        showGameDetailsLayoutChanges = v117.showGameDetailsLayoutChanges,
        isShowContainsStrongLanguageWarningEnabled = if not v37() then nil else v116
    };
end)((l_RoactAppPolicy_0.connect(function(v118, _)
    return {
        enableRecommendedGames = v118.getRecommendedGames(),
        enableSocial = v118.getSocialLinks(),
        enableGameInfoList = v118.getGameInfoList(),
        enableGamePlaysAndRatings = v118.getGamePlaysAndRatings(),
        enableSwapToSource = v118.getSwapToSourceButton(),
        showGlobalCounters = v118.getShowGlobalCounters(),
        enableGamePassPreview = v118.getShowPassesOnExperienceDetails()
    };
end)((l_RoactServices_0.connect({
    networking = v7,
    eventIngest = v23
})((v3.connect(function(v120, v121)
    local v122 = l_ApiFetchGameDetails_0.GetFetchingStatus(v120, v121.universeId);
    return {
        topBarHeight = 0,
        gameDetail = v120.GameDetails[v121.universeId],
        gameDetailsPageDataStatus = v122,
        gameInfo = v120.Games[v121.universeId],
        screenSize = v120.ScreenSize,
        globalGuiInset = v120.GlobalGuiInset,
        showLoadingBackground = v122 ~= v11.Done,
        showRecommendedGames = v113(v21.GetFetchingStatus(v120, v121.universeId), v120.RecommendedGameEntries[v121.universeId]),
        ageRecommendations = v120.AgeRecommendations[v121.universeId],
        isShowContainsStrongLanguageWarningEnabled = if not v37() then nil else v121.isShowContainsStrongLanguageWarningEnabled,
        containsStrongLanguage = if not v35() then nil else v120.AssetTextFilterSettings[v121.universeId]
    };
end, function(v123)
    return {
        fetchGameDetailsPageData = function(v124, v125)
            return v123(v20(v124, v125));
        end
    };
end)(v47))))))));