local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.SocialLibraries);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.React);
local l_memo_0 = v4.memo;
local v6 = require(l_Parent_0.UIBlox);
local l_Images_0 = v6.App.ImageSet.Images;
local l_ImageSetLabel_0 = v6.Core.ImageSet.ImageSetLabel;
local l_useStyle_0 = v6.Core.Style.useStyle;
local v10 = require(script.Parent.Logger);
local l_presenceSortComparator_0 = v2.Utils.presenceSortComparator;
local l_SortedList_0 = v2.Components.SortedList;
local v13 = if not v2.Flags.getFFlagDeprecatedSocialLibrariesCells() then v2.Components.Cells.UserCell else require(l_script_FirstAncestor_0.Components.Cells.UserCell);
local v15 = {
    entries = {},
    entryHeight = 64,
    onEntryActivated = function(_)
        v10:warning("onEntryActivated was not passed to ParticipantList");
    end,
    shouldUseExpandedCell = false,
    sortComparator = l_presenceSortComparator_0,
    LayoutOrder = 0
};
ParticipantList = function(v16)
    local v17 = v3.Dictionary.join(v15, v16);
    local v18 = l_useStyle_0();
    local function v22(v19, v20)
        local _ = nil;
        return v4.createElement(v13, {
            boldTitle = true,
            showDivider = not not v17.shouldUseExpandedCell or not v20,
            subTitleText = if v19.presenceText == "Common.Presence.Label.Online" then v17.onlinePresenceText else if v19.presenceText == "Common.Presence.Label.Offline" then v17.offlinePresenceText else v19.presenceText,
            style = v18,
            user = v19,
            childWidth = v17.childWidth,
            onActivated = function()
                v17.onEntryActivated(v19);
            end,
            shouldUseExpandedCell = v17.shouldUseExpandedCell
        }, v19.children);
    end;
    local v23 = {};
    for _, v25 in pairs(v17.entries) do
        local v26 = {};
        if not v25.isLocalUser then
            v26.children = {
                dots = v4.createElement("Frame", {
                    Size = UDim2.new(0, 64, 1, 0),
                    BackgroundTransparency = 1
                }, {
                    Dots = v4.createElement(l_ImageSetLabel_0, {
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        BackgroundTransparency = 1,
                        Image = l_Images_0["icons/common/more"],
                        ImageColor3 = v18.Theme.IconEmphasis.Color,
                        ImageTransparency = v18.Theme.IconEmphasis.Transparency,
                        Position = UDim2.fromScale(0.5, 0.5),
                        ScaleType = Enum.ScaleType.Slice,
                        Size = UDim2.new(0, 36, 0, 36)
                    })
                })
            };
        end;
        table.insert(v23, v3.Dictionary.join(v26, v25));
    end;
    return v4.createElement(l_SortedList_0, {
        entries = v23,
        entryHeight = v17.entryHeight,
        renderEntry = v22,
        sortComparator = v17.sortComparator,
        LayoutOrder = v17.LayoutOrder
    });
end;
return l_memo_0(ParticipantList);


local v0 = require(script:FindFirstAncestor("AppChat").Logger):new(script:GetFullName() .. ":RemoveUserDialogScreen");
v0:setContext({
    screen = "RemoveUserDialogScreen"
});
return v0;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local _ = require(l_script_FirstAncestor_0.types);
local v3 = require(l_script_FirstAncestor_0.SocialLibraries);
local v4 = require(l_Parent_0.Cryo);
local v5 = require(l_Parent_0.React);
local l_Warning_0 = v3.Components.AlertViews.Warning;
local v7 = {
    titleText = "Placeholder title",
    bodyText = "Placeholder body",
    cancelText = "TempCancel",
    confirmText = "TempConfirm",
    failureTitleText = "FailureTitle",
    failureBodyText = "FailureBody",
    failureButtonText = "FailureButton",
    soakAreaColor3 = Color3.fromRGB(25, 25, 25),
    soakAreaTransparency = 0.8,
    width = UDim.new(0.8, 0),
    displayFailed = false,
    onActivated = nil,
    onModalClose = nil
};
RemoveUserDialog = function(v8)
    return v5.createElement(l_Warning_0, (v4.Dictionary.join(v7, v8)));
end;
return RemoveUserDialog;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Users.populateUserWithState);
local _ = require(l_script_FirstAncestor_0.types);
local v4 = require(l_Parent_0.AppChatNetworking);
local v5 = require(l_Parent_0.Cryo);
local v6 = require(l_Parent_0.React);
local l_dependencyArray_0 = require(l_Parent_0.RoactUtils).Hooks.dependencyArray;
local l_memo_0 = v6.memo;
local l_useCallback_0 = v6.useCallback;
local l_useDispatch_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useDispatch;
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
local l_useState_0 = v6.useState;
local v14 = require(l_script_FirstAncestor_0.Http.NetworkingChat);
local v15 = require(l_script_FirstAncestor_0.Flags.isAppChatChannelsAPIEnabled);
local v16 = require(script.Parent.RemoveUserDialogLayout);
local v17 = {
    conversationId = nil,
    participantId = nil,
    onModalClose = function()
    end,
    titleKey = "Feature.Chat.Action.RemoveUser",
    messageKey = "Feature.Chat.Message.RemoveUser",
    cancelTitleKey = "Feature.Chat.Action.Cancel",
    confirmationTitleKey = "Feature.Chat.Action.Remove",
    failureTitleKey = "Feature.Chat.Heading.FailedToRemoveUser",
    failureBodyKey = "Feature.Chat.Message.FailedToRemoveUser",
    failureButtonKey = "Feature.Chat.Action.Confirm"
};
RemoveUserDialogContainer = function(v18)
    local v19 = v5.Dictionary.join(v17, v18);
    local v20, v21 = l_useState_0(true);
    local v22, v23 = l_useState_0(false);
    local v24, v25 = l_useState_0(false);
    local v26 = l_useDispatch_0();
    local v29 = l_useCallback_0(function(v27, v28)
        if not v15() then
            return v26(v14.RemoveFromConversation.API(v27, v28));
        else
            return v26(v4.rodux.RemoveUserFromConversation.API(v28, v27));
        end;
    end, l_dependencyArray_0(v26));
    local v31 = l_useSelector_0(function(v30)
        return {
            conversationTitle = (v30.ChatAppReducer.Conversations[v19.conversationId] or {
                title = nil
            }).title,
            targetUser = v2(v30, v30.Users[v19.participantId])
        };
    end);
    return v6.createElement(v16, v5.Dictionary.join(v19, l_useLocalization_0({
        titleText = v19.titleKey,
        bodyText = {
            v19.messageKey;
            USERNAME = v31.targetUser.displayName
        },
        cancelText = v19.cancelTitleKey,
        confirmText = v19.confirmationTitleKey,
        failureTitleText = "Feature.Chat.Heading.FailedToRemoveUser",
        failureBodyText = {
            v19.failureBodyKey;
            USERNAME = v31.targetUser.displayName,
            CONVERSATION_TITLE = v31.conversationTitle
        },
        failureButtonText = "Feature.Chat.Action.Confirm"
    }), v31, {
        onActivated = l_useCallback_0(function()
            v23(true);
            v21(false);
            v29(v19.participantId, v19.conversationId):andThen(function()
                v19.onModalClose();
            end):catch(function()
                v23(false);
                v21(true);
                v25(true);
            end);
            return true;
        end, l_dependencyArray_0(v19.participantId, v19.conversationId)),
        displayFailed = v24,
        isModalVisible = v20,
        isLoading = v22
    }));
end;
return l_memo_0(RemoveUserDialogContainer);


local v0 = require(script:FindFirstAncestor("AppChat").Parent.Roact);
local v1 = require(script.Parent.RemoveUserDialogContainer);
local v2 = require(script.Parent.Logger);
local v3 = v0.PureComponent:extend("RemoveUserDialog");
v3.defaultProps = {
    navigation = nil
};
v3.init = function(v4)
    v4.onRemoveUserDialogClose = function()
        v4.props.navigation.goBack();
    end;
end;
v3.render = function(v5)
    local l_navigation_0 = v5.props.navigation;
    assert(type(l_navigation_0) ~= "nil", "RemoveUserDialog should be wrapped with Roact Navigation");
    local v7 = l_navigation_0.getParam("conversationId", nil);
    local v8 = l_navigation_0.getParam("participantId", nil);
    if not (v7 ~= nil) or v8 == nil then
        v2:warning("ConversationId and participantId are required to open {screen}");
        return nil;
    else
        return v0.createElement(v1, {
            conversationId = v7,
            participantId = v8,
            onModalClose = v5.onRemoveUserDialogClose
        });
    end;
end;
v3.didMount = function(_)
    v2:info("{screen} mounted");
end;
return v3;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_RoactFitComponents_0 = require(l_Parent_0.LuaSocialLibrariesDeps).RoactFitComponents;
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.React);
local l_memo_0 = v4.memo;
local v6 = {
    Text = "Default Title",
    LayoutOrder = 0,
    marginTop = 8,
    marginBottom = 14,
    style = require(l_script_FirstAncestor_0.SocialLibraries).Components.TestStyle
};
SectionHeader = function(v7)
    local v8 = v3.Dictionary.join(v6, v7);
    local l_style_0 = v8.style;
    local l_Theme_0 = l_style_0.Theme;
    local l_Font_0 = l_style_0.Font;
    return v4.createElement(l_RoactFitComponents_0.FitFrameVertical, {
        BackgroundTransparency = 1,
        LayoutOrder = v8.LayoutOrder,
        width = UDim.new(1, 0),
        margin = {
            top = v8.marginTop,
            left = 12,
            right = 0,
            bottom = v8.marginBottom
        }
    }, {
        SectionHeader = v4.createElement(l_RoactFitComponents_0.FitTextLabel, {
            width = l_RoactFitComponents_0.FitTextLabel.Width.FitToText,
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Text = v8.Text,
            TextColor3 = l_Theme_0.TextDefault.Color,
            TextSize = l_Font_0.CaptionHeader.RelativeSize * l_Font_0.BaseSize,
            Font = l_Font_0.CaptionHeader.Font,
            TextXAlignment = Enum.TextXAlignment.Left,
            AnchorPoint = Vector2.new(0, 1)
        })
    });
end;
return l_memo_0(SectionHeader);


local v0 = require(script:FindFirstAncestor("AppChat").Users.populateUserWithState);
local v1 = require(script.Parent.Parent.Logger);
return function(v2, v3, v4)
    local l_Users_0 = v2.Users;
    local v6 = {};
    for v7, v8 in pairs(v3) do
        local v9 = l_Users_0[v8];
        local v10 = if not v4 then nil else v4[v7];
        if not v9 then
            v1:warning("user is required in selectChatUserEntryModelList");
        else
            v6[v9.id] = v0(v2, v9, v10);
        end;
    end;
    return v6;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local _ = require(l_script_FirstAncestor_0.types);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.React);
local v5 = require(l_Parent_0.UIBlox);
local l_useStyle_0 = v5.Core.Style.useStyle;
local l_IconButton_0 = v5.App.Button.IconButton;
local l_IconSize_0 = v5.App.ImageSet.Enum.IconSize;
local v9 = require(l_script_FirstAncestor_0.Components.Cells.BaseCell);
local v10 = {
    bodyText = "Placeholder body",
    iconImage = nil,
    iconSize = l_IconSize_0.Small,
    iconCellWidth = 30,
    cellHeight = 28,
    onIconActivated = function()
    end
};
return function(v11)
    local v12 = v3.Dictionary.join(v10, v11);
    local v13 = v12.style or l_useStyle_0();
    local l_Theme_0 = v13.Theme;
    local l_Font_0 = v13.Font;
    return v4.createElement("Frame", {
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1,
        LayoutOrder = v12.layoutOrder,
        Size = UDim2.fromScale(1, 0)
    }, {
        ConversationTypeRow = v4.createElement(v9, {
            Size = UDim2.new(1, 0, 0, v12.cellHeight),
            BackgroundColor3 = l_Theme_0.BackgroundDefault.Color,
            BackgroundTransparency = l_Theme_0.BackgroundDefault.Transparency,
            showDivider = false,
            dividerColor3 = l_Theme_0.Divider.Color,
            dividerTransparency = l_Theme_0.Divider.Transparency,
            isDisabled = true
        }, {
            UIListLayout = v4.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Center
            }),
            UIPadding = v4.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, v13.Tokens.Global.Size_150)
            }),
            TextFrame = v4.createElement("Frame", {
                AnchorPoint = Vector2.new(0, 0.5),
                Position = UDim2.fromScale(0, 0.5),
                AutomaticSize = Enum.AutomaticSize.X,
                Size = UDim2.new(0, 0, 1, 0),
                BackgroundTransparency = 1,
                LayoutOrder = 1
            }, {
                Text = v4.createElement("TextLabel", {
                    AutomaticSize = Enum.AutomaticSize.X,
                    Size = UDim2.new(0, 0, 1, 0),
                    Text = v12.bodyText,
                    TextSize = l_Font_0.Header2.RelativeSize * l_Font_0.BaseSize,
                    Font = l_Font_0.Header2.Font,
                    TextColor3 = l_Theme_0.TextEmphasis.Color,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    BackgroundTransparency = 1,
                    LayoutOrder = 1
                })
            }),
            IconFrame = v4.createElement("Frame", {
                AnchorPoint = Vector2.new(1, 0.5),
                Position = UDim2.fromScale(1, 0.5),
                Size = UDim2.fromOffset(v12.iconCellWidth, v12.iconCellWidth),
                BackgroundTransparency = 1,
                LayoutOrder = 2
            }, {
                InfoIcon = v4.createElement(l_IconButton_0, {
                    position = UDim2.fromScale(0.5, 0.5),
                    anchorPoint = Vector2.new(0.5, 0.5),
                    icon = v12.iconImage,
                    iconColor3 = l_Theme_0.IconDefault.Color,
                    iconTransparency = l_Theme_0.IconDefault.Transparency,
                    iconSize = v12.iconSize,
                    backgroundTransparency = 1,
                    size = UDim2.fromOffset(v12.iconCellWidth, v12.iconCellWidth),
                    onActivated = v12.onIconActivated
                })
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local _ = require(l_script_FirstAncestor_0.types);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.React);
local l_useStyle_0 = require(l_Parent_0.UIBlox).Core.Style.useStyle;
local v6 = require(l_script_FirstAncestor_0.Components.Cells.IconWithTextCell);
local v7 = {
    bodyText = "Placeholder body",
    iconImage = nil,
    cellHeight = 64,
    onActivated = function()
    end
};
return function(v8)
    local v9 = v3.Dictionary.join(v7, v8);
    return v4.createElement("Frame", {
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1,
        LayoutOrder = v9.layoutOrder,
        Size = UDim2.fromScale(1, 0)
    }, {
        CreateUnfilteredChatRow = v4.createElement(v6, {
            LayoutOrder = v9.layoutOrder,
            onActivated = v9.onActivated,
            primaryIcon = v9.iconImage,
            showDivider = false,
            Size = UDim2.new(1, 0, 0, v9.cellHeight),
            style = v9.style or l_useStyle_0(),
            Text = v9.bodyText,
            iconCellWidth = 72
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.EnumScreens);
local v3 = require(l_Parent_0.Roact);
local v4 = require(script.Parent.CreateUnfilteredChatDialogContainer);
local v5 = require(script.Parent.Logger);
local v6 = v3.PureComponent:extend("CreateUnfilteredChatDialogScreen");
v6.defaultProps = {
    navigation = nil
};
v6.init = function(v7)
    v7.onCreatePrivateConversationDialogClose = function()
        v7.props.navigation.goBack();
    end;
    v7.navigateToConversation = function(v8)
        v7.props.navigation.navigate(v2.ChatConversation, {
            conversationId = v8
        });
    end;
end;
v6.render = function(v9)
    local l_navigation_0 = v9.props.navigation;
    assert(type(l_navigation_0) ~= "nil", "CreateUnfilteredChatDialogScreen should be wrapped with Roact Navigation");
    local v11 = l_navigation_0.getParam("conversationId", nil);
    if v11 == nil then
        v5:warning("ConversationId is required to open {screen}");
        return nil;
    else
        return v3.createElement(v4, {
            conversationId = v11,
            onModalClose = v9.onCreatePrivateConversationDialogClose,
            navigateToConversation = v9.navigateToConversation
        });
    end;
end;
v6.didMount = function(_)
    v5:info("{screen} mounted");
end;
return v6;


local v0 = require(script:FindFirstAncestor("AppChat").Logger):new(script:GetFullName() .. ":SetConversationPrivateDialogScreen");
v0:setContext({
    screen = "SetConversationPrivateDialogScreen"
});
return v0;


return {
    logger = require(script.Logger),
    screenComponent = require(script.ChatDetailsScreen)
};


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local v1 = require(l_Parent_0.Roact);
local l_Text_0 = require(l_Parent_0.AppCommonLib).Text;
local l_AppFonts_0 = require(l_Parent_0.Style).AppFonts;
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local v5 = v1.PureComponent:extend("ChatDisabledIndicator");
v5.defaultProps = {
    LayoutOrder = 1,
    chatEnabled = false,
    chatDisabledText = "TRANSLATED To chat with your friends, turn on chat in your Privacy Settings.",
    privacyButtonText = "TRANSLATED Privacy Settings",
    navigateToPrivacy = function()
    end
};
v5.render = function(v6)
    return l_withStyle_0(function(v7)
        local v8 = v7.Font.SubHeader1.RelativeSize * v7.Font.BaseSize;
        return v1.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.new(1, 0, 1, 0),
            LayoutOrder = v6.props.LayoutOrder
        }, {
            IndicatorInner = v1.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, 160),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0.5, 0.5)
            }, {
                UIList = v1.createElement("UIListLayout", {
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center
                }),
                Imagelabel = v1.createElement("ImageLabel", {
                    BackgroundTransparency = 1,
                    Size = UDim2.new(0, 72, 0, 72),
                    LayoutOrder = 1,
                    Image = "rbxasset://textures/ui/LuaChat/icons/ic-friends.png"
                }),
                DisabledMessage = v1.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    LayoutOrder = 2,
                    Font = l_AppFonts_0.default:getDefault(),
                    TextColor3 = v7.Theme.TextDefault.Color,
                    TextTransparency = v7.Theme.TextDefault.Transparency,
                    TextSize = v7.Font.SubHeader1.RelativeSize * v7.Font.BaseSize,
                    Size = UDim2.new(0.8, 0, 0.5, 0),
                    Text = v6.props.chatDisabledText,
                    TextWrapped = true
                }),
                PrivacySettings = not v6.props.chatEnabled and v1.createElement("ImageButton", {
                    AutoButtonColor = false,
                    Size = UDim2.new(0, l_Text_0.GetTextWidth(v6.props.privacyButtonText, l_AppFonts_0.default:getDefault(), v8) + 6, 0, 36),
                    BackgroundTransparency = 1,
                    LayoutOrder = 3,
                    BorderSizePixel = 0,
                    ScaleType = "Slice",
                    SliceCenter = Rect.new(3, 3, 4, 4),
                    Image = "rbxasset://textures/ui/LuaChat/9-slice/input-default.png",
                    ImageColor3 = Color3.fromRGB(0, 176, 111),
                    [v1.Event.Activated] = v6.props.navigateToPrivacy
                }, {
                    Textlabel = v1.createElement("TextLabel", {
                        Size = UDim2.new(1, 0, 1, 0),
                        BackgroundTransparency = 1,
                        Font = l_AppFonts_0.default:getDefault(),
                        TextSize = v8,
                        TextColor3 = Color3.fromRGB(255, 255, 255),
                        Text = v6.props.privacyButtonText,
                        TextXAlignment = Enum.TextXAlignment.Center,
                        TextYAlignment = Enum.TextYAlignment.Center
                    })
                })
            })
        });
    end);
end;
return v5;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.AppCommonLib);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.React);
local v5 = require(l_Parent_0.RoactRodux);
local v6 = require(l_Parent_0.UIBlox);
local v7 = require(l_Parent_0.FriendsLanding);
local l_RoactPaginator_0 = require(l_script_FirstAncestor_0.SocialLibraries).RoactPaginator;
local l_compose_0 = require(l_script_FirstAncestor_0.SocialLibraries).RoduxTools.compose;
local v10 = require(script.Parent.ConversationGroupsEntry);
local v11 = require(script.Parent.ConversationListWithTopBar);
local v12 = require(script.Parent.ChatLoading.ChatLoadingContainer);
local v13 = require(script.Parent.EmptyConversationList);
local v14 = require(script.Parent.mapDispatchToProps);
local v15 = require(l_script_FirstAncestor_0.Hooks.useIsChatEnabled);
local v16 = require(l_script_FirstAncestor_0.Hooks.useGetConversations);
local v17 = require(l_script_FirstAncestor_0.Hooks.useIsAppLoaded);
local v18 = require(l_script_FirstAncestor_0.Hooks.useAreConversationsFetching);
local v19 = require(l_script_FirstAncestor_0.Hooks.useIsOldestConversationFetched);
local v20 = require(l_script_FirstAncestor_0.Hooks.useHasConversations);
local l_useLocalUserId_0 = require(l_Parent_0.RobloxAppHooks).useLocalUserId;
local l_useEffectOnMount_0 = require(l_Parent_0.RoactUtils).Hooks.useEffectOnMount;
local v23 = require(l_script_FirstAncestor_0.Hooks.useChatIsVisible);
local v24 = require(l_Parent_0.UserProfiles);
local v25 = require(l_script_FirstAncestor_0.Conversations.getConversationTitle);
local v26 = require(l_script_FirstAncestor_0.Conversations.getAllParticipants);
local l_useCallback_0 = v4.useCallback;
local l_useState_0 = v4.useState;
local l_dependencyArray_0 = require(l_Parent_0.RoactUtils).Hooks.dependencyArray;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
local v31 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
local v32 = require(l_Parent_0.AppChatNetworking);
local v33 = require(l_script_FirstAncestor_0.Http.RoduxNetworking);
local l_IsVRAppBuild_0 = v2.IsVRAppBuild;
local v35 = require(l_script_FirstAncestor_0.Analytics.EventNames);
local v36 = require(l_script_FirstAncestor_0.Analytics.Enums.EmptyStateType);
local v37 = require(l_script_FirstAncestor_0.Analytics.useAnalytics);
local v38 = require(l_script_FirstAncestor_0.Flags.getFFlagChatTabHideGroupsLinkOnVR);
local v39 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewAppChatLoadingIndicator);
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
local v41 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableAppChatPaddingConsistency);
local l_HorizontalPageMargin_0 = v6.App.Container.HorizontalPageMargin;
local l_useStyle_0 = v6.Core.Style.useStyle;
local l_NoFriendsView_0 = v7.Components.NoFriendsView;
local v45 = game:DefineFastString("ChatTabAddFriendsHeaderKey", "Feature.Friends.Feature.Friends.Heading.AddFriends");
local v46 = game:DefineFastString("ChatTabAddFriendsLabelKey", "Feature.Friends.Text.NoFriends");
local v47 = game:DefineFastString("ChatTabAddFriendsButtonKey", "Feature.Friends.Feature.Friends.Heading.AddFriends");
local v48 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
local v49 = game:DefineFastFlag("AppChatAnalyticsAppChatVisible", false);
local v50 = {
    topBarHeight = 0,
    isShowingFilterBox = false
};
local function _(v51, v52, v53)
    local v54 = false;
    local v56 = v3.List.map(v51.otherParticipants, function(v55)
        if v52[tostring(v55)] == nil then
            v54 = true;
        end;
        return v52[tostring(v55)];
    end);
    if not v54 or not v51.isDefaultTitle then
        return v25(v51, v56, v53);
    else
        return "";
    end;
end;
ChatLandingContainer = function(v58)
    local v59 = v3.Dictionary.join(v50, v58);
    local v60 = v15();
    local v61 = v17();
    local v62 = v18();
    local v63 = v20();
    local v64 = v19();
    local v65 = l_useLocalUserId_0();
    local v66 = l_useStyle_0();
    local v67 = v16();
    local v68 = v4.useRef({});
    local v69 = v4.useMemo(function()
        return v26(v67);
    end, {
        v67
    });
    local v70 = v24.Hooks.useUserProfilesFetch({
        userIds = v69,
        query = v24.Queries.userProfilesCombinedNameAndUsernameByUserIds
    });
    local v71 = v24.Hooks.useUserProfilesFetch({
        userIds = {
            (tostring(v65))
        },
        query = v24.Queries.userProfilesCombinedNameAndUsernameByUserIds
    });
    local v81 = v4.useMemo(function()
        local l_current_0 = v68.current;
        if v70.data then
            v3.List.map(v70.data.userProfiles, function(v73)
                l_current_0[v73.id] = v73;
            end);
        end;
        return v3.List.map(v67, function(v74)
            local l_l_current_0_0 = l_current_0;
            local v76 = not v71.data and "" or v24.Selectors.getCombinedNameFromId(v71.data, v65);
            local v77 = false;
            local v79 = v3.List.map(v74.otherParticipants, function(v78)
                if l_l_current_0_0[tostring(v78)] == nil then
                    v77 = true;
                end;
                return l_l_current_0_0[tostring(v78)];
            end);
            local v80;
            if not v77 or not v74.isDefaultTitle then
                v80 = v25(v74, v79, v76);
                --[[ close >= 4 ]]
            else
                v80 = "";
                --[[ close >= 4 ]]
            end;
            return v3.Dictionary.join(v74, {
                title = v80
            });
        end);
    end, {
        v67,
        v69,
        v70.data
    });
    local v82 = v37();
    l_useEffectOnMount_0(function()
        if v82 then
            v82.fireAnalyticsEvent(v35.ChatLandingScreenRendered, {
                isChatEnabled = v60
            });
        end;
    end);
    local v83 = nil;
    local v84 = nil;
    local v85 = nil;
    local v86 = nil;
    local v87 = nil;
    local v88 = nil;
    if v48() then
        local v89, v90 = l_useState_0({
            phone_verify = false,
            fully_eligible_ftux = false
        });
        v85 = v89;
        v86 = v90;
        v89 = l_useSelector_0(l_useCallback_0(function(v91)
            return v31(v91, "ChatAppReducer.UnfilteredThreads.ftuxModalVariant");
        end, {}));
        v90 = false;
        if v89 == "phone_verify" then
            v90 = not v85.phone_verify;
        end;
        v83 = v90;
        v90 = false;
        if v89 == "fully_eligible_ftux" then
            v90 = not v85.fully_eligible_ftux;
        end;
        v84 = v90;
        local l_v89_0 = v89 --[[ copy: 22 -> 28 ]];
        v87 = l_useCallback_0(function()
            if l_v89_0 then
                v86(function(v93)
                    return v3.Dictionary.join(v93, {
                        [l_v89_0] = true
                    });
                end);
                return ;
            else
                return ;
            end;
        end, l_dependencyArray_0(v86, v89));
        v88 = l_useSelector_0(l_useCallback_0(function(v94)
            local v95 = true;
            if v32.rodux.GetUnfilteredThreadEligibility.getStatus(v94) ~= v33.Enum.NetworkStatus.Fetching then
                v95 = v32.rodux.GetUnfilteredThreadsFtuxModal.getStatus(v94, v32.Constants.UnfilteredThreadsModalSequence) == v33.Enum.NetworkStatus.Fetching;
            end;
            return v95;
        end, {}));
    end;
    local v96 = v3.isEmpty(v81);
    local v97 = ((not v61 or v96 and v62) or v96 and v63) or v96 and v88;
    local v98 = nil;
    local v99 = false;
    if not v60 or not v97 then
        if v60 and ((not v96 or not v61) or v62) then
            local v100 = ("conversationListWithTopBar%*"):format(v59.filterText);
            v99 = true;
            v98 = v4.createElement(v11, v3.Dictionary.join(v59, {
                filterText = not not v59.isShowingFilterBox and v59.filterText or nil,
                key = v100,
                itemList = v81,
                appLoaded = v61,
                localUserId = v65,
                conversationsIsFetching = v62,
                oldestConversationIsFetched = v64,
                entryHeight = 64,
                shouldShowPhoneVerificationUpsell = v83,
                shouldShowUnfilteredAccessFtux = v84,
                dismissUnfilteredThreadsFtux = v87
            }));
        elseif not l_default_0.isEnabled() or not l_default_0:getShowAddFriendsOnChatTabNilState() then
            v98 = v4.createElement(v13, {
                chatEnabled = v60,
                navigateToPrivacy = v59.navigateToPrivacy,
                fireRenderEvent = if not l_default_0.isEnabled() then nil else function()
                    if v82 then
                        v82.fireAnalyticsEvent(v35.ChatEmptyStateScreenRendered, {
                            emptyStateType = v36.EmptyConversationList
                        });
                    end;
                end
            });
        else
            v98 = v4.createElement("Frame", {
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundColor3 = v66.Theme.BackgroundDefault.Color,
                BackgroundTransparency = v66.Theme.BackgroundDefault.Transparency,
                BorderSizePixel = 0
            }, {
                NoFriendsView = v4.createElement(l_NoFriendsView_0, {
                    pageRenderReport = function()
                        if v82 then
                            v82.fireAnalyticsEvent(v35.ChatEmptyStateScreenRendered, {
                                emptyStateType = v36.NoFriendsView
                            });
                        end;
                    end,
                    openAddFriendsPage = function()
                        if v82 then
                            v82.fireAnalyticsEvent(v35.ChatAddFriendsBtnClicked);
                        end;
                        v59.navigateToAddFriends();
                    end,
                    noFriendsHeaderKey = v45,
                    noFriendsTextLabelKey = v46,
                    addFriendsBtnLabelKey = v47
                })
            });
            v99 = true;
        end;
    else
        v98 = v4.createElement(v12, {
            topBarHeight = v59.topBarHeight,
            pageHeaderText = v59.pageHeaderText,
            cellHeight = not v39() and 72 or 64,
            cellWidth = 375
        });
        if l_default_0.isEnabled() then
            v99 = true;
        end;
    end;
    if not ((not l_default_0.isEnabled() or not v38()) or not l_IsVRAppBuild_0()) then
        v99 = true;
    end;
    local v101 = nil;
    v101 = if not (not not l_default_0.isEnabled() and l_default_0:getConnectTabLeadsToChatTab()) or v99 then v98 else v4.createElement(v4.Fragment, nil, {
        groupsLink = v4.createElement(v10, {
            entryHeight = 64
        }),
        chatFrame = v4.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, -v59.topBarHeight - 64),
            Position = UDim2.new(0, 0, 0, 64),
            BackgroundTransparency = 1,
            BorderSizePixel = 0
        }, {
            chatContainer = v98
        })
    });
    local v102 = if not v49 then nil else v23();
    v4.useEffect(function()
        if not (not v102 or not v82) then
            v82.fireAnalyticsEvent(v35.AppChatVisible, {
                isChatEnabled = v60,
                chatLandingListCount = #v81,
                isChatLoading = v97
            });
        end;
    end, l_dependencyArray_0(v102, v97));
    if not v41() then
        return v101;
    else
        return v4.createElement(l_HorizontalPageMargin_0, {
            backgroundColor3 = v66.Theme.BackgroundDefault.Color
        }, {
            chatContainerWithGroupsLink = v101
        });
    end;
end;
return l_compose_0(v5.connect(nil, v14), l_RoactPaginator_0.connect(function()
    return {
        pageSize = 30
    };
end))(ChatLandingContainer);


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.EnumScreens);
local v3 = require(l_script_FirstAncestor_0.TopBarContext);
local v4 = require(l_Parent_0.ArgCheck);
local v5 = require(l_Parent_0.Roact);
local l_withLocalization_0 = require(l_Parent_0.Localization).withLocalization;
local v7 = require(l_Parent_0.UIBlox);
local l_IconButton_0 = v7.App.Button.IconButton;
local l_Images_0 = v7.App.ImageSet.Images;
local l_Badge_0 = v7.App.Indicator.Badge;
local l_BadgeVariant_0 = v7.App.Indicator.Enum.BadgeVariant;
local v12 = require(script.Parent.SearchTopBar);
local v13 = require(script.Parent.ChatLandingContainer);
local v14 = require(script.Parent.Logger);
local v15 = require(l_script_FirstAncestor_0.Analytics.EventNames);
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
local v17 = require(l_script_FirstAncestor_0.Flags.isAppChatChannelsAPIEnabled);
local v18 = require(l_script_FirstAncestor_0.LegacyAnalytics.withRoactChatAnalytics);
local v19 = v5.PureComponent:extend("ChatLandingScreen");
v19.defaultProps = {
    navigation = nil
};
local function v24()
    return v5.createElement(v3.Consumer, {
        render = function(v20)
            local v21 = v20.getScreenTopBar(v2.ChatLanding);
            v4.isType(v21, "table", "screenTopBar");
            return l_withLocalization_0({
                searchPlaceholderText = "Feature.Chat.Label.SearchWord",
                cancelText = "Feature.Chat.Action.Cancel"
            })(function(v22)
                return v5.createElement("Frame", {
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 1
                }, {
                    filterBox = v5.createElement(v12, {
                        initialInputText = v21.filterText,
                        cancelText = v22.cancelText,
                        searchPlaceholderText = v22.searchPlaceholderText,
                        captureFocusOnMount = v21.shouldAutoFocusCenter,
                        onSelectCallback = v21.closeInputBar or function()
                        end,
                        resetOnMount = function()
                            v20.setScreenTopBar(v2.ChatLanding, {
                                shouldAutoFocusCenter = false
                            });
                        end,
                        cancelCallback = function()
                            v20.setScreenTopBar(v2.ChatLanding, {
                                shouldRenderCenter = false,
                                filterText = ""
                            });
                        end,
                        textChangedCallback = function(v23)
                            v20.setScreenTopBar(v2.ChatLanding, {
                                filterText = v23
                            });
                        end
                    })
                });
            end);
        end
    });
end;
v19.navigationOptions = function(v25)
    local l_navigation_0 = v25.navigation;
    local v27 = l_navigation_0.getScreenProps("navigateToRootStack", nil);
    return {
        headerText = {
            raw = "CommonUI.Features.Label.Chat",
            shouldLocalize = true
        },
        backButtonEnabled = not not v27 or false,
        tabBarVisible = not v27 or nil,
        isRoot = true,
        renderCenter = v24,
        shouldBoldHeader = (not not l_default_0.isEnabled() and l_default_0:getConnectTabLeadsToChatTab()) and true or nil,
        renderRight = function()
            return v18(function(v28)
                return v5.createElement(v3.Consumer, {
                    render = function(v29)
                        local v30 = v29.getScreenTopBar(v2.ChatLanding);
                        v4.isType(v30, "table", "screenTopBar");
                        local v31 = l_navigation_0.getScreenProps("notificationCount", 0);
                        local v32 = l_navigation_0.getScreenProps("topBarShowSearch", false);
                        local v33 = l_navigation_0.getScreenProps("topBarShowCreateChatGroup", false);
                        local v34 = l_navigation_0.getScreenProps("topBarShowNotifications", false);
                        if not v30.shouldRenderCenter then
                            local l_createFragment_0 = v5.createFragment;
                            local v36 = {
                                filter = v32 and v5.createElement(l_IconButton_0, {
                                    size = UDim2.fromOffset(0, 0),
                                    icon = l_Images_0["icons/common/search"],
                                    layoutOrder = 1,
                                    onActivated = function()
                                        v29.setScreenTopBar(v2.ChatLanding, {
                                            shouldRenderCenter = true,
                                            shouldAutoFocusCenter = true
                                        });
                                        if v28 then
                                            v28.fireAnalyticsEvent(v15.ChatLandingSearchBtnClicked);
                                        end;
                                    end
                                }),
                                createNewChat = v33 and v5.createElement(l_IconButton_0, {
                                    size = UDim2.fromOffset(0, 0),
                                    icon = l_Images_0["icons/actions/compose"],
                                    layoutOrder = 2,
                                    onActivated = function()
                                        l_navigation_0.navigate(v2.CreateNewChat);
                                        if v28 then
                                            v28.fireAnalyticsEvent(v15.ChatLandingComposeBtnClicked);
                                        end;
                                    end
                                })
                            };
                            local l_v34_0 = v34;
                            if l_v34_0 then
                                l_v34_0 = v5.createElement;
                                local l_l_IconButton_0_0 = l_IconButton_0;
                                local v40 = {
                                    size = UDim2.fromOffset(0, 0),
                                    icon = l_Images_0["icons/common/notificationOn"],
                                    layoutOrder = 3,
                                    onActivated = function()
                                        local v39 = l_navigation_0.getScreenProps("navigateToLuaAppPages", {})[v2.Notifications];
                                        if not v39 then
                                            v14:warning("Notifications page was not set in navigateToLuaAppPages screenProps");
                                        else
                                            v14:info("Navigate To Notifications from {screen}");
                                            v39();
                                        end;
                                        if v28 then
                                            v28.fireAnalyticsEvent(v15.ChatLandingNotifBtnClicked);
                                        end;
                                    end
                                };
                                local v41 = {};
                                local v42 = false;
                                if v31 > 0 then
                                    v42 = v5.createElement(l_Badge_0, {
                                        position = UDim2.new(0.5, 0, 0.5, 0),
                                        anchorPoint = Vector2.new(0, 1),
                                        value = v31,
                                        badgeVariant = l_BadgeVariant_0.Alert
                                    });
                                end;
                                v41.notificationBadge = v42;
                                l_v34_0 = l_v34_0(l_l_IconButton_0_0, v40, v41);
                            end;
                            v36.notifications = l_v34_0;
                            return l_createFragment_0(v36);
                        else
                            return nil;
                        end;
                    end
                });
            end);
        end
    };
end;
v19.init = function(v43)
    v43.navigateToConversation = function(v44)
        v14:info("Navigate To Conversation: {} from {screen}", v44);
        v43.props.navigation.navigate(v2.ChatConversation, {
            conversationId = v44
        });
        v43.resetScreenTopBar();
    end;
    v43.navigateToCreateChat = function()
        v14:info("Navigate To CreateNewChat from {screen}");
        v43.props.navigation.push(v2.CreateNewChat);
    end;
    v43.navigateToToast = function(v45)
        v14:info("Navigate To Toast from {screen}");
        v43.props.navigation.navigate(v2.RoactChatToast, v45);
    end;
    v43.navigateToPrivacy = function()
        local v46 = v43.props.navigation.getScreenProps("navigateToLuaAppPages", {})[v2.PrivacySettings];
        if not v46 then
            v14:warning("PrivacySettings page was not set in navigateToLuaAppPages screenProps");
            return ;
        else
            v14:info("Navigate To PrivacySettings from {screen}");
            v46();
            return ;
        end;
    end;
    v43.setScreenTopBar = function(v47)
        local v48 = v43.props.navigation.getScreenProps("setScreenTopBar", nil);
        v4.isNotNil(v48, "setScreenTopBar in screenProps");
        v48(v2.ChatLanding, v47);
    end;
    v43.resetScreenTopBar = function()
        local v49 = v4.isNotNil(v43.props.navigation.getScreenProps("getScreenTopBar", nil), "getScreenTopBar in screenProps")(v2.ChatLanding);
        if not (not (v49.filterText == "") or not v49.shouldRenderCenter) then
            v43.setScreenTopBar({
                shouldRenderCenter = false
            });
        end;
    end;
end;
v19.render = function(v50)
    v14:info("{screen} render");
    local v51 = v4.isNotNil(v50.props.navigation, "navigation in ChatLandingScreen");
    local v52 = not not v51 and v51.getParam("key", "") or "";
    return v5.createElement(v3.Consumer, {
        render = function(v53)
            local v54 = v53.getScreenTopBar(v2.ChatLanding);
            v4.isType(v54, "table", "screenTopBar");
            return v5.createElement(v13, {
                isShowingFilterBox = v54.shouldRenderCenter,
                filterText = v54.filterText,
                topBarHeight = v51.getScreenProps("topBarHeight", 0),
                pageHeaderText = "CommonUI.Features.Label.Chat",
                navigateToAddFriends = if not l_default_0.isEnabled() then nil else v50.props.navigation.getScreenProps("navigateToAddFriends", {}),
                navigateToConversation = v50.navigateToConversation,
                navigateToCreateChat = v50.navigateToCreateChat,
                navigateToPrivacy = v50.navigateToPrivacy,
                navigateToToast = v50.navigateToToast,
                key = if not v17() then nil else "ChatLanding" .. v52
            });
        end
    });
end;
v19.didMount = function(v55)
    v14:info("{screen} mounted");
    v55.setScreenTopBar({
        shouldRenderCenter = false,
        filterText = ""
    });
end;
return v19;


local v0 = require(script:FindFirstAncestor("AppChat").Flags.getFFlagChatLandingScreenWithSwitchNavigatorFix);
local _ = nil;
if not v0() then
    return (require(script.Parent.ChatLandingScreenWithSwitchNavigatorOld));
else
    return (require(script.Parent.ChatLandingScreenWithSwitchNavigatorNew));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.ArgCheck);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.Roact);
local v5 = require(l_Parent_0.UIBlox);
local v6 = require(l_script_FirstAncestor_0.EnumScreens);
local v7 = require(l_script_FirstAncestor_0.TopBarContext);
local v8 = require(l_script_FirstAncestor_0.createChatTopBar);
local v9 = require(l_script_FirstAncestor_0.Navigators.Wide.conversationSwitchNavigator);
local v10 = require(script.Parent.ChatLandingScreen);
local v11 = require(script.Parent.ChatLandingContainer);
local v12 = require(script.Parent.Logger);
local l_withStyle_0 = v5.Style.withStyle;
local v14 = v4.PureComponent:extend("ChatLandingScreenWithSwitchNavigator");
v14.router = v9.router;
v14.defaultProps = {
    navigation = nil
};
v14.init = function(v15)
    v15.navigateToConversation = function(v16)
        v12:info("Navigate To Conversation: {} from {screen}", v16);
        v15.props.navigation.navigate(v6.ChatConversation, {
            conversationId = v16
        });
    end;
    v15.navigateToCreateChat = function()
        v12:info("Navigate To CreateNewChat from {screen}");
        v15.props.navigation.navigate(v6.CreateNewChat);
    end;
    v15.navigateToToast = function(v17)
        v12:info("Navigate To Toast from {screen}");
        v15.props.navigation.navigate(v6.RoactChatToast, v17);
    end;
    v15.navigateToNotifications = function()
        local v18 = v15.props.navigation.getScreenProps("navigateToLuaAppPages", {})[v6.Notifications];
        if not v18 then
            v12:warning("Notifications page was not set in navigateToLuaAppPages screenProps");
            return ;
        else
            v12:info("Navigate To Notifications from {screen}");
            v18();
            return ;
        end;
    end;
    v15.navigateToPrivacy = function()
        local v19 = v15.props.navigation.getScreenProps("navigateToLuaAppPages", {})[v6.PrivacySettings];
        if not v19 then
            v12:warning("PrivacySettings page was not set in navigateToLuaAppPages screenProps");
            return ;
        else
            v12:info("Navigate To PrivacySettings from {screen}");
            v19();
            return ;
        end;
    end;
    v15.setScreenTopBar = function(v20)
        local v21 = v15.props.navigation.getScreenProps("setScreenTopBar", nil);
        v2.isNotNil(v21, "setScreenTopBar in screenProps");
        v21(v6.ChatLanding, v20);
    end;
    local v22, v23 = v4.createBinding(0);
    v15.getLeftContainerWidth = v22;
    v15.setLeftContainerWidth = v23;
end;
v14.render = function(v24)
    v12:info("{screen} render");
    local v25 = v2.isNotNil(v24.props.navigation, "navigation in ChatLandingScreenWithSwitchNavigator");
    local v27 = v24.getLeftContainerWidth:map(function(v26)
        return UDim2.new(1, -(v26 + 1), 1, 0);
    end);
    return l_withStyle_0(function(v28)
        return v4.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v28.Theme.BackgroundDefault.Color,
            BackgroundTransparency = v28.Theme.BackgroundDefault.Transparency,
            BorderSizePixel = 0
        }, {
            containerLayout = v4.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 1)
            }),
            LeftContainer = v4.createElement(v7.Consumer, {
                render = function(v29)
                    local v30 = v29.getScreenTopBar(v6.ChatLanding);
                    v2.isType(v30, "table", "screenTopBar");
                    return v4.createElement("Frame", {
                        Size = UDim2.new(0.4, 0, 1, 0),
                        Position = UDim2.new(0, 0, 0, 0),
                        BackgroundTransparency = 1,
                        BorderSizePixel = 0,
                        [v4.Change.AbsoluteSize] = function(v31)
                            v24.setLeftContainerWidth(v31.AbsoluteSize.X);
                        end
                    }, {
                        layout = v4.createElement("UIListLayout", {
                            SortOrder = Enum.SortOrder.LayoutOrder
                        }),
                        sizeConstraint = v4.createElement("UISizeConstraint", {
                            MinSize = Vector2.new(320, 0),
                            MaxSize = Vector2.new(640, math.huge)
                        }),
                        leftTopBar = v8(v3.Dictionary.join(v30, {
                            navigation = v25
                        }, v10.navigationOptions({
                            screenProps = nil,
                            navigationOptions = nil,
                            navigation = v25
                        }))),
                        content = v4.createElement("Frame", {
                            BorderSizePixel = 0,
                            Size = UDim2.new(1, 0, 1, -v25.getScreenProps("topBarHeight", 0)),
                            LayoutOrder = 2
                        }, {
                            ChatLanding = v4.createElement(v11, {
                                isShowingFilterBox = v30.shouldRenderCenter,
                                filterText = v30.filterText,
                                navigateToConversation = v24.navigateToConversation,
                                navigateToCreateChat = v24.navigateToCreateChat,
                                navigateToPrivacy = v24.navigateToPrivacy,
                                navigateToToast = v24.navigateToToast
                            })
                        })
                    });
                end
            }),
            Border = v4.createElement("Frame", {
                BackgroundColor3 = v28.Theme.Divider.Color,
                BackgroundTransparency = v28.Theme.Divider.Transparency,
                BorderSizePixel = 0,
                Size = UDim2.new(0, 1, 1, 0),
                LayoutOrder = 2
            }),
            RightContainer = v4.createElement("Frame", {
                Size = v27,
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                LayoutOrder = 3
            }, {
                Content = v4.createElement(v9, {
                    navigation = v25
                })
            })
        });
    end);
end;
v14.didMount = function(v32)
    v12:info("{screen} mounted");
    v32.setScreenTopBar({
        shouldRenderCenter = false,
        filterText = ""
    });
end;
return v14;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.ArgCheck);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.Roact);
local v5 = require(l_Parent_0.UIBlox);
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
local v7 = require(l_script_FirstAncestor_0.EnumScreens);
local v8 = require(l_script_FirstAncestor_0.TopBarContext);
local v9 = require(l_script_FirstAncestor_0.createChatTopBar);
local v10 = require(l_script_FirstAncestor_0.Navigators.Wide.conversationSwitchNavigator);
local v11 = require(script.Parent.ChatLandingScreen);
local v12 = require(script.Parent.ChatLandingContainer);
local v13 = require(script.Parent.Logger);
local l_withStyle_0 = v5.Style.withStyle;
local v15 = require(l_script_FirstAncestor_0.Flags.isAppChatChannelsAPIEnabled);
local v16 = v4.PureComponent:extend("ChatLandingScreenWithSwitchNavigator");
v16.router = v10.router;
v16.defaultProps = {
    navigation = nil
};
v16.init = function(v17)
    v17.navigateToConversation = function(v18)
        v13:info("Navigate To Conversation: {} from {screen}", v18);
        v17.props.navigation.navigate(v7.ChatConversation, {
            conversationId = v18
        });
    end;
    v17.navigateToCreateChat = function()
        v13:info("Navigate To CreateNewChat from {screen}");
        v17.props.navigation.navigate(v7.CreateNewChat);
    end;
    v17.navigateToToast = function(v19)
        v13:info("Navigate To Toast from {screen}");
        v17.props.navigation.navigate(v7.RoactChatToast, v19);
    end;
    v17.navigateToNotifications = function()
        local v20 = v17.props.navigation.getScreenProps("navigateToLuaAppPages", {})[v7.Notifications];
        if not v20 then
            v13:warning("Notifications page was not set in navigateToLuaAppPages screenProps");
            return ;
        else
            v13:info("Navigate To Notifications from {screen}");
            v20();
            return ;
        end;
    end;
    v17.navigateToPrivacy = function()
        local v21 = v17.props.navigation.getScreenProps("navigateToLuaAppPages", {})[v7.PrivacySettings];
        if not v21 then
            v13:warning("PrivacySettings page was not set in navigateToLuaAppPages screenProps");
            return ;
        else
            v13:info("Navigate To PrivacySettings from {screen}");
            v21();
            return ;
        end;
    end;
    v17.setScreenTopBar = function(v22)
        local v23 = v17.props.navigation.getScreenProps("setScreenTopBar", nil);
        v2.isNotNil(v23, "setScreenTopBar in screenProps");
        v23(v7.ChatLanding, v22);
    end;
end;
v16.render = function(v24)
    v13:info("{screen} render");
    local v25 = v2.isNotNil(v24.props.navigation, "navigation in ChatLandingScreenWithSwitchNavigator");
    local v26 = not not v25 and v25.getParam("key", "") or "";
    return l_withStyle_0(function(v27)
        return v4.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v27.Theme.BackgroundDefault.Color,
            BackgroundTransparency = v27.Theme.BackgroundDefault.Transparency,
            BorderSizePixel = 0
        }, {
            LeftContainer = v4.createElement(v8.Consumer, {
                render = function(v28)
                    local v29 = v28.getScreenTopBar(v7.ChatLanding);
                    v2.isType(v29, "table", "screenTopBar");
                    return v4.createElement("Frame", {
                        Size = UDim2.new(0.37, 0, 1, 0),
                        Position = UDim2.new(0, 0, 0, 0),
                        BackgroundTransparency = 1,
                        BorderSizePixel = 0
                    }, {
                        layout = v4.createElement("UIListLayout", {
                            SortOrder = Enum.SortOrder.LayoutOrder
                        }),
                        leftTopBar = v9(v3.Dictionary.join(v29, {
                            navigation = v25
                        }, v11.navigationOptions({
                            screenProps = nil,
                            navigationOptions = nil,
                            navigation = v25
                        }), if not not l_default_0.isEnabled() and l_default_0:getConnectTabLeadsToChatTab() then {
                            backButtonEnabled = false,
                            shouldBoldHeader = true
                        } else {})),
                        content = v4.createElement("Frame", {
                            BorderSizePixel = 0,
                            Size = UDim2.new(1, 0, 1, -v25.getScreenProps("topBarHeight", 0)),
                            LayoutOrder = 2
                        }, {
                            ChatLanding = v4.createElement(v12, {
                                isShowingFilterBox = v29.shouldRenderCenter,
                                filterText = v29.filterText,
                                navigateToConversation = v24.navigateToConversation,
                                navigateToCreateChat = v24.navigateToCreateChat,
                                navigateToPrivacy = v24.navigateToPrivacy,
                                navigateToToast = v24.navigateToToast,
                                navigateToAddFriends = if not l_default_0.isEnabled() then nil else v24.props.navigation.getScreenProps("navigateToAddFriends", {}),
                                key = if not v15() then nil else "ChatLanding" .. v26
                            })
                        })
                    });
                end
            }),
            Border = v4.createElement("Frame", {
                BackgroundColor3 = v27.Theme.Divider.Color,
                BackgroundTransparency = v27.Theme.Divider.Transparency,
                BorderSizePixel = 0,
                Position = UDim2.new(0.37, 0, 0, 0),
                Size = UDim2.new(0, 1, 1, 0)
            }),
            RightContainer = v4.createElement("Frame", {
                Size = UDim2.new(0.63, -1, 1, 0),
                Position = UDim2.new(0.37, 1, 0, 0),
                BackgroundTransparency = 1,
                BorderSizePixel = 0
            }, {
                Content = v4.createElement(v10, {
                    navigation = v25
                })
            })
        });
    end);
end;
v16.didMount = function(v30)
    v13:info("{screen} mounted");
    v30.setScreenTopBar({
        shouldRenderCenter = false,
        filterText = ""
    });
end;
return v16;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local v4 = require(script.Parent.ChatLoadingIndicator);
local v5 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewAppChatLoadingIndicator);
local v6 = v2.PureComponent:extend("ChatLoadingContainer");
v6.defaultProps = {
    topBarHeight = 0,
    cellHeight = not v5() and 72 or 64,
    cellWidth = 375
};
v6.render = function(v7)
    return l_withStyle_0(function(v8)
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v8.Theme.BackgroundDefault.Color,
            BackgroundTransparency = v8.Theme.BackgroundDefault.Transparency,
            BorderSizePixel = 0
        }, {
            UIListLayout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                FillDirection = Enum.FillDirection.Vertical
            }),
            ChatLoadingFrame = v2.createElement("Frame", {
                Size = UDim2.new(1, 0, 1, -v7.props.topBarHeight),
                BackgroundTransparency = 1,
                LayoutOrder = 2
            }, {
                ChatLoadingIndicator = v2.createElement(v4, {
                    cellHeight = v7.props.cellHeight,
                    cellWidth = v7.props.cellWidth
                })
            })
        });
    end);
end;
return v6;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local v4 = require(script.Parent.LoadingAvatar);
local v5 = require(script.Parent.TextPlaceholders);
local v6 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewAppChatLoadingIndicator);
local v7 = v2.PureComponent:extend("ChatLoadingIndicator");
v7.defaultProps = {
    cellHeight = if not v6() then nil else 64,
    avatarCellWidth = 60
};
v7.init = function(v8)
    v8.singleConversationPlaceholder = function(v9, v10)
        return l_withStyle_0(function(v11)
            return v2.createElement("Frame", {
                LayoutOrder = v9,
                Size = UDim2.new(1, 0, 0, v8.props.cellHeight),
                BackgroundTransparency = v11.Theme.BackgroundDefault.Transparency,
                BackgroundColor3 = v11.Theme.BackgroundDefault.Color,
                BorderSizePixel = 0
            }, {
                UIList = v2.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical
                }),
                Padding = v2.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, not v6() and 20 or 0),
                    PaddingTop = UDim.new(0, 4)
                }),
                Content = v2.createElement("Frame", {
                    LayoutOrder = 1,
                    Size = UDim2.new(1, 0, 1, -1),
                    BackgroundTransparency = 1
                }, {
                    UIList = v2.createElement("UIListLayout", {
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        FillDirection = Enum.FillDirection.Horizontal
                    }),
                    avatar = v2.createElement(v4, {
                        avatarImage = v8.props.avatarImage,
                        cellWidth = if not v6() then nil else v8.props.avatarCellWidth,
                        cellHeight = if not v6() then nil else v8.props.cellHeight,
                        LayoutOrder = 1
                    }),
                    textPlaceholders = v2.createElement(v5, {
                        avatarCellWidth = if not v6() then nil else v8.props.avatarCellWidth,
                        LayoutOrder = 2
                    })
                }),
                bottomLineContainer = not v10 and v2.createElement("Frame", {
                    LayoutOrder = 2,
                    Size = UDim2.new(1, 0, 0, 1),
                    BackgroundTransparency = 1,
                    ZIndex = 2,
                    ClipsDescendants = true
                }, {
                    Padding = v2.createElement("UIPadding", {
                        PaddingLeft = UDim.new(0, not v6() and 6 or v8.props.avatarCellWidth)
                    }),
                    bottomLine = v2.createElement("Frame", {
                        BackgroundColor3 = v11.Theme.Divider.Color,
                        Transparency = v11.Theme.Divider.Transparency,
                        Size = UDim2.new(1, 0, 1, 0),
                        BorderSizePixel = 0
                    })
                })
            });
        end);
    end;
    v8.allConversationPlaceholdersList = function()
        local v12 = {
            UIList = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical
            })
        };
        table.insert(v12, v8.singleConversationPlaceholder(1, false));
        table.insert(v12, v8.singleConversationPlaceholder(2, false));
        table.insert(v12, v8.singleConversationPlaceholder(3, true));
        return v12;
    end;
end;
v7.render = function(v13)
    return l_withStyle_0(function(v14)
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v14.Theme.BackgroundDefault.Color,
            BackgroundTransparency = v14.Theme.BackgroundDefault.Transparency,
            BorderSizePixel = 0
        }, v13.allConversationPlaceholdersList());
    end);
end;
return v7;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local v4 = require(l_Parent_0.UIBlox);
local l_ShimmerPanel_0 = v4.App.Loading.ShimmerPanel;
local l_ImageSetLabel_0 = v4.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v4.App.ImageSet.Images;
local v8 = v2.PureComponent:extend("LoadingAvatar");
local v9 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewAppChatLoadingIndicator);
v8.defaultProps = {
    avatarImage = if not v9() then l_Images_0["component_assets/user_60_mask"] else l_Images_0["component_assets/circle_49_mask"],
    cellHeight = 64,
    avatarSize = 36,
    LayoutOrder = 0
};
v8.render = function(v10)
    local v11 = v10.props.cellHeight / 2 - v10.props.avatarSize / 2;
    return l_withStyle_0(function(v12)
        return v2.createElement("Frame", {
            Size = if not v9() then UDim2.new(0, 68, 0, 68) else UDim2.new(0, v10.props.cellHeight, 0, v10.props.cellHeight),
            BackgroundTransparency = 1,
            LayoutOrder = v10.props.LayoutOrder,
            BorderSizePixel = 0
        }, {
            avatarShimmer = v2.createElement(l_ShimmerPanel_0, {
                Size = if not v9() then UDim2.new(1, -2, 1, -2) else UDim2.fromOffset(v10.props.avatarSize, v10.props.avatarSize),
                Position = if not v9() then UDim2.new(0, 1, 0, 1) else UDim2.fromOffset(v11, v11),
                cornerRadius = if not v9() then nil else UDim.new(0, v10.props.cellHeight)
            }),
            avatarMask = v2.createElement(l_ImageSetLabel_0, {
                Size = if not v9() then UDim2.new(1, 0, 1, 0) else UDim2.fromOffset(v10.props.avatarSize, v10.props.avatarSize),
                Position = if not v9() then nil else UDim2.fromOffset(v11, v11),
                Image = v10.props.avatarImage,
                BackgroundTransparency = 1,
                ImageColor3 = v12.Theme.BackgroundDefault.Color
            })
        });
    end);
end;
return v8;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local l_ShimmerPanel_0 = require(l_Parent_0.UIBlox).App.Loading.ShimmerPanel;
local v5 = v2.PureComponent:extend("TextPlaceholders");
local v6 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewAppChatLoadingIndicator);
v5.defaultProps = {
    LayoutOrder = 0,
    avatarSize = 60,
    avatarCellWidth = 60
};
v5.render = function(v7)
    return l_withStyle_0(function(_)
        return v2.createElement("Frame", {
            Size = UDim2.new(1, if not v6() then -v7.props.avatarSize else -v7.props.avatarCellWidth, 1, 0),
            BackgroundTransparency = 1,
            LayoutOrder = v7.props.LayoutOrder
        }, {
            Padding = v2.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 12),
                PaddingLeft = UDim.new(0, not v6() and 9 or 0)
            }),
            UIList = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical
            }),
            topRectangle = v2.createElement(l_ShimmerPanel_0, {
                LayoutOrder = 1,
                Size = UDim2.new(0, 94, 0, 12)
            }),
            spacer = v2.createElement("Frame", {
                LayoutOrder = 2,
                Size = UDim2.new(1, 0, 0, 7),
                BackgroundTransparency = 1
            }),
            bottomRectangle = v2.createElement(l_ShimmerPanel_0, {
                LayoutOrder = 3,
                Size = UDim2.new(0, 169, 0, 12)
            })
        });
    end);
end;
return v5;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
if not require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI)() then
    local v2 = require(l_Parent_0.Roact);
    local v3 = require(l_Parent_0.UIBlox);
    local l_Text_0 = require(l_Parent_0.AppCommonLib).Text;
    local v5 = require(l_Parent_0.Cryo);
    local l_memoize_0 = require(l_Parent_0.AppCommonLib).memoize;
    local v7 = require(script.Parent.Utils.getBoldTextTheme);
    local l_ConversationCell_0 = require(l_script_FirstAncestor_0.Components.Cells).ConversationCell;
    local v9 = require(script.Parent.ConversationTimestamp);
    local v10 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableAppChatPaddingConsistency);
    local v11 = game:DefineFastFlag("DebugEnableAppChatConversationIdPreview", false);
    local v12 = v2.PureComponent:extend("ConversationEntry");
    v12.defaultProps = {
        entryHeight = 64,
        conversation = nil,
        onActivated = nil,
        boldTitle = true
    };
    v12.init = function(v13)
        v13.getTextWidth = l_memoize_0(function(v14, v15, v16)
            return l_Text_0.GetTextWidth(v14, v15, v16);
        end);
    end;
    v12.render = function(v17)
        return v3.Style.withStyle(function(v18)
            local l_props_0 = v17.props;
            local l_conversation_0 = l_props_0.conversation;
            local v21 = not not l_conversation_0.hasUnreadMessages and v7(v18) or v18;
            local v22 = l_props_0[v2.Children] or {};
            local l_Body_0 = v21.Font.Body;
            local v24 = v21.Font.BaseSize * l_Body_0.RelativeSize;
            local v25 = v17.props.conversation.shortRelativeTime or "";
            local v26 = v17.getTextWidth(v25, l_Body_0.Font, v24);
            return v2.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, l_props_0.entryHeight),
                BackgroundTransparency = 1
            }, {
                cell = v2.createElement(l_ConversationCell_0, {
                    Size = UDim2.new(1, 0, 0, v17.props.entryHeight),
                    conversation = l_props_0.conversation,
                    childWidth = v26 + 24,
                    subTitleText = if not v11 then l_props_0.conversation.lastMessageContent else l_props_0.conversation.id,
                    onActivated = l_props_0.onActivated,
                    style = v21,
                    boldTitle = l_conversation_0.hasUnreadMessages,
                    hideLeftPadding = v10()
                }, v5.Dictionary.join(v22, {
                    timeStamp = v2.createElement(v9, {
                        currentStyle = v21,
                        paddingX = 12,
                        paddingY = 14,
                        text = v25,
                        textSize = v24,
                        textWidth = v26
                    })
                }))
            });
        end);
    end;
    return v12;
else
    return require(script.Parent.ConversationEntry2);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.RoactUtils);
local v3 = require(l_Parent_0.React);
local l_dependencyArray_0 = v2.Hooks.dependencyArray;
local l_memo_0 = v3.memo;
local l_useMemo_0 = v3.useMemo;
local v7 = require(l_script_FirstAncestor_0.Hooks.useIsUserPending);
local l_useStyle_0 = require(l_Parent_0.UIBlox).Core.Style.useStyle;
local l_Text_0 = require(l_Parent_0.AppCommonLib).Text;
local v10 = require(l_Parent_0.Cryo);
local v11 = require(script.Parent.Utils.getBoldTextTheme);
local l_ConversationCell_0 = require(l_script_FirstAncestor_0.Components.Cells).ConversationCell;
local v13 = require(script.Parent.ConversationTimestamp);
local v14 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableAppChatPaddingConsistency);
local v15 = game:DefineFastFlag("DebugEnableAppChatConversationIdPreview", false);
local _ = require(l_script_FirstAncestor_0.types);
local v17 = {
    entryHeight = 64,
    boldTitle = true
};
return l_memo_0(function(v18)
    local v19 = v10.Dictionary.join(v17, v18);
    local v20 = l_useStyle_0();
    local l_conversation_0 = v19.conversation;
    local v22 = l_conversation_0.hasUnreadMessages and not v7(l_conversation_0);
    local v23 = if not v22 then v20 else v11(v20);
    local l_Body_0 = v23.Font.Body;
    local v25 = v23.Font.BaseSize * l_Body_0.RelativeSize;
    local v26 = v19.conversation.shortRelativeTime or "";
    local v27 = l_useMemo_0(function()
        return l_Text_0.GetTextWidth(v26, l_Body_0.Font, v25);
    end, l_dependencyArray_0(v26, l_Body_0.Font, v25));
    return v3.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, v19.entryHeight),
        BackgroundTransparency = 1
    }, {
        cell = v3.createElement(l_ConversationCell_0, {
            Size = UDim2.new(1, 0, 0, v19.entryHeight),
            conversation = v19.conversation,
            childWidth = v27 + 24,
            subTitleText = if not v15 then v19.conversation.lastMessageContent else v19.conversation.id,
            onActivated = v19.onActivated,
            style = v23,
            boldTitle = v22,
            hideLeftPadding = v14()
        }, v10.Dictionary.join(v19.children or {}, {
            timeStamp = v3.createElement(v13, {
                currentStyle = v23,
                paddingX = 12,
                paddingY = 14,
                text = v26,
                textSize = v25,
                textWidth = v27
            })
        }))
    });
end);


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.UIBlox);
local v4 = require(l_script_FirstAncestor_0.LuaAppNavigationContext);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local l_useStyle_0 = v3.Core.Style.useStyle;
local v7 = require(script.Parent.Utils.getBoldTextTheme);
local v8 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableAppChatPaddingConsistency);
local l_Images_0 = v3.App.ImageSet.Images;
local l_ImageSetLabel_0 = v3.Core.ImageSet.ImageSetLabel;
local l_IconSize_0 = v3.App.Constant.IconSize;
local v12 = l_Images_0["icons/navigation/pushRight"];
local v13 = l_Images_0["icons/menu/groups"];
ConversationGroupsEntry = function(v14)
    local v15 = l_useStyle_0();
    local v16 = v2.useContext(v4);
    local v17 = v7(v15);
    local v18 = l_useLocalization_0({
        groupsText = "Feature.SocialTab.Label.Groups",
        createAndExploreGroupsText = "Feature.SocialTab.Label.CreateAndExploreGroups"
    });
    local l_groupsText_0 = v18.groupsText;
    local l_Font_0 = v17.Font.Header2.Font;
    local l_Transparency_0 = v17.Theme.TextEmphasis.Transparency;
    local l_Color_0 = v17.Theme.TextEmphasis.Color;
    local v23 = v17.Font.Header2.RelativeSize * v17.Font.BaseSize;
    local l_createAndExploreGroupsText_0 = v18.createAndExploreGroupsText;
    local l_Font_1 = v15.Font.CaptionBody.Font;
    local l_Transparency_1 = v15.Theme.TextDefault.Transparency;
    local l_Color_1 = v15.Theme.TextDefault.Color;
    local v28 = v15.Font.CaptionBody.RelativeSize * v15.Font.BaseSize;
    local v29 = l_IconSize_0.Regular + 12;
    local v30 = not v8() and 60 or 60 - (60 - l_IconSize_0.Regular) / 2;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, v14.entryHeight),
        BackgroundColor3 = v15.Theme.BackgroundDefault.Color,
        BackgroundTransparency = v15.Theme.BackgroundDefault.Transprency,
        BorderSizePixel = 0
    }, {
        overlay = v2.createElement("ImageButton", {
            AutoButtonColor = false,
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            [v2.Event.Activated] = v16.navigateToGroups
        }),
        leftAlign = v2.createElement("Frame", {
            Size = UDim2.new(1, -v29, 1, 0),
            BackgroundTransparency = 1
        }, {
            layout = v2.createElement("UIListLayout", {
                VerticalAlignment = Enum.VerticalAlignment.Center,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            iconHolder = v2.createElement("Frame", {
                Size = UDim2.new(0, v30, 1, 0),
                BackgroundTransparency = 1,
                LayoutOrder = 0
            }, {
                layout = v2.createElement("UIListLayout", {
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    HorizontalAlignment = if not v8() then Enum.HorizontalAlignment.Center else Enum.HorizontalAlignment.Left
                }),
                icon = v2.createElement(l_ImageSetLabel_0, {
                    BackgroundColor3 = v17.Theme.BackgroundUIDefault.Color,
                    BackgroundTransparency = v17.Theme.BackgroundUIDefault.Transparency,
                    BorderSizePixel = 0,
                    Size = UDim2.new(0, l_IconSize_0.Regular, 0, l_IconSize_0.Regular),
                    ScaleType = Enum.ScaleType.Stretch,
                    Image = v13,
                    ImageColor3 = v15.Theme.IconEmphasis.Color,
                    ImageTransparency = v15.Theme.IconEmphasis.Transparency
                }, {
                    corner = v2.createElement("UICorner", {
                        CornerRadius = UDim.new(0, 8)
                    })
                })
            }),
            conversationInfo = v2.createElement("Frame", {
                Size = UDim2.new(1, -60, 1, 0),
                BackgroundTransparency = 1,
                LayoutOrder = 1
            }, {
                layout = v2.createElement("UIListLayout", {
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    FillDirection = Enum.FillDirection.Vertical,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, 2)
                }),
                title = v2.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    Size = UDim2.new(1, 0, 0, v23),
                    TextSize = v23,
                    TextColor3 = l_Color_0,
                    TextTransparency = l_Transparency_0,
                    Font = l_Font_0,
                    Text = l_groupsText_0 or "",
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    LayoutOrder = 1
                }),
                subTitle = v2.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    Size = UDim2.new(1, 0, 0, v28),
                    TextSize = v28,
                    TextColor3 = l_Color_1,
                    TextTransparency = l_Transparency_1,
                    Font = l_Font_1,
                    Text = l_createAndExploreGroupsText_0,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    LayoutOrder = 2
                })
            })
        }),
        rightAlign = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1
        }, {
            layout = v2.createElement("UIListLayout", {
                VerticalAlignment = Enum.VerticalAlignment.Center,
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            padding = v2.createElement("UIPadding", {
                PaddingRight = UDim.new(0, 12)
            }),
            icon = v2.createElement(l_ImageSetLabel_0, {
                LayoutOrder = 0,
                BackgroundTransparency = 1,
                Size = UDim2.new(0, l_IconSize_0.Regular, 0, l_IconSize_0.Regular),
                ScaleType = Enum.ScaleType.Stretch,
                Image = v12,
                ImageColor3 = v15.Theme.IconEmphasis.Color,
                ImageTransparency = v15.Theme.IconEmphasis.Transparency
            })
        }),
        divider = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1
        }, {
            layout = v2.createElement("UIListLayout", {
                VerticalAlignment = Enum.VerticalAlignment.Bottom,
                HorizontalAlignment = Enum.HorizontalAlignment.Right
            }),
            divider = v2.createElement("Frame", {
                BackgroundTransparency = v15.Theme.Divider.Transparency,
                BackgroundColor3 = v15.Theme.Divider.Color,
                BorderSizePixel = 0,
                Size = UDim2.new(1, -v30, 0, 1)
            })
        })
    });
end;
return ConversationGroupsEntry;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local v4 = require(script.Parent.ConversationEntry);
local l_BidirectionalFlatList_0 = require(l_Parent_0.VirtualizedList).BidirectionalFlatList;
local v6 = require(l_Parent_0.Promise);
local v7 = require(l_Parent_0.Cryo);
local l_IsVRAppBuild_0 = require(l_Parent_0.AppCommonLib).IsVRAppBuild;
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
local v10 = require(script.Parent.ConversationGroupsEntry);
local v11 = require(script.Parent.UnfilteredThreads.PhoneVerificationUpsellContainer);
local v12 = require(script.Parent.UnfilteredThreads.UnfilteredAccessContainer);
local v13 = require(l_script_FirstAncestor_0.Flags.getFFlagChatTabHideGroupsLinkOnVR);
local v14 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
local v15 = require(l_script_FirstAncestor_0.Flags.getFFlagAppChatLastConversationHiddenFix);
local v16 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewChatTabGroupsLinkDisappearingFix);
local v17 = v2.PureComponent:extend("ConversationList");
v17.defaultProps = {
    focusIndex = 1,
    focusLock = {},
    itemList = {},
    loadNext = nil,
    loadPrevious = nil,
    onActivated = nil,
    isDebugEnabled = false,
    Size = UDim2.fromScale(1, 1),
    LayoutOrder = 1,
    onScrollUpdate = function()
    end,
    entryHeight = 64,
    shouldShowPhoneVerificationUpsell = false,
    shouldShowUnfilteredAccessFtux = false,
    dismissUnfilteredThreadsFtux = function()
    end
};
v17.init = function(v18)
    v17.ENTRY_HEIGHT = not l_default_0.isEnabled() and 64 or v18.props.entryHeight;
    v18.onScrollUpdate = function(v19)
        v18.currentAnchor = math.floor(v19.CanvasPosition.Y / 64);
        v18.props.onScrollUpdate(v19);
    end;
    v18.focusLock = v18.props.focusLock;
    v18.identifier = function(v20)
        if v20 then
            return v20.id .. tostring(v20.unixTime);
        else
            return nil;
        end;
    end;
    v18.renderItem = function(v21, _)
        local l_item_0 = v21.item;
        if not v14() or not l_item_0.isPhoneVerificationUpsell then
            if not v14() or not l_item_0.isUnfilteredAccessFtux then
                if not l_default_0.isEnabled() or not l_item_0.isGroupLink then
                    return v2.createElement(v4, {
                        boldTitle = false,
                        entryHeight = v18.ENTRY_HEIGHT,
                        conversation = l_item_0,
                        onActivated = v18.props.onActivated,
                        key = "ConversationEntry" .. tostring(l_item_0.id)
                    }, v18.props.isDebugEnabled and {
                        debugCell = v2.createElement("StringValue", {
                            Value = tostring(l_item_0.id)
                        })
                    });
                else
                    return v2.createElement(v10, {
                        entryHeight = v18.ENTRY_HEIGHT,
                        navigateToGroups = function()
                        end,
                        key = "ConversationGroupsEntry"
                    });
                end;
            else
                return v2.createElement(v12, {
                    dismissUpsell = v18.props.dismissUnfilteredThreadsFtux
                });
            end;
        else
            return v2.createElement(v11, {
                dismissUpsell = v18.props.dismissUnfilteredThreadsFtux
            });
        end;
    end;
    v18.ref = v2.createRef();
end;
v17.willUpdate = function(v24, v25, _)
    if (v25.filterText and v25.filterText ~= "") and v25.filterText ~= v24.props.filterText then
        v24.focusLock = v25.filterText;
        return ;
    else
        if (not (not v25.itemList[1] or not v24.props.itemList[1]) and v25.itemList[1].id ~= v24.props.itemList[1].id) and v24.currentAnchor == 1 then
            v24.focusLock = {};
        end;
        return ;
    end;
end;
v17.render = function(v27)
    local l_itemList_0 = v27.props.itemList;
    local v29 = true;
    if v27.props.filterText ~= "" then
        v29 = v27.props.filterText == nil;
    end;
    local v30 = not v13() and true or not l_IsVRAppBuild_0();
    if not (((not l_default_0.isEnabled() or not l_default_0:getConnectTabLeadsToChatTab()) or not if not v16() then v27.props.filterText == "" else v29) or not v30) then
        l_itemList_0 = v7.List.join({
            {
                id = "ConversationGroupsEntry",
                isGroupLink = true
            }
        }, l_itemList_0);
    end;
    local v31 = v27.props.shouldShowPhoneVerificationUpsell or v27.props.shouldShowUnfilteredAccessFtux;
    if not ((not v14() or not v31) or not v29) then
        l_itemList_0 = v7.List.join({
            {
                id = "UnfilteredThreadsFtux",
                isPhoneVerificationUpsell = v27.props.shouldShowPhoneVerificationUpsell,
                isUnfilteredAccessFtux = v27.props.shouldShowUnfilteredAccessFtux
            }
        }, l_itemList_0);
    end;
    local function v37(v32)
        return v2.createElement(l_BidirectionalFlatList_0, {
            data = l_itemList_0,
            renderItem = v27.renderItem,
            getItemLayout = function(_, v34)
                return {
                    length = v27.ENTRY_HEIGHT,
                    offset = v27.ENTRY_HEIGHT * (v34 - 1),
                    index = v34
                };
            end,
            Size = if not v14() then v27.props.Size else nil,
            style = {
                BackgroundColor3 = v32.Theme.BackgroundDefault.Color,
                BackgroundTransparency = v32.Theme.BackgroundDefault.Transparency,
                ScrollBarThickness = 0,
                BorderSizePixel = if not l_default_0.isEnabled() then nil else 0
            },
            contentContainerStyle = {
                BackgroundColor3 = v32.Theme.BackgroundDefault.Color,
                BackgroundTransparency = v32.Theme.BackgroundDefault.Transparency,
                BorderSizePixel = if not l_default_0.isEnabled() then nil else 0
            },
            windowSize = 2,
            initialNumToRender = 15,
            onScroll = v27.onScrollUpdate,
            onEndReached = function()
                v27.props.loadNext();
                return v6.resolve();
            end,
            onStartReached = function()
                if v27.props.loadPrevious then
                    v27.props.loadPrevious();
                end;
                return v6.resolve();
            end,
            AutomaticCanvasSize = if not v15() then Enum.AutomaticSize.X else Enum.AutomaticSize.XY,
            CanvasSize = if not v15() then UDim2.new(0, 0, 0, #l_itemList_0 * v27.ENTRY_HEIGHT) else UDim2.fromScale(0, 0),
            onEndReachedThreshold = v27.ENTRY_HEIGHT * 4,
            onStartReachedThreshold = v27.ENTRY_HEIGHT * 4,
            compareItemData = function(v35, v36)
                return v35.id == v36.id;
            end,
            [v2.Ref] = v27.ref,
            autoscrollToTopThreshold = 33,
            enableAutoscrollToTop = true
        });
    end;
    return l_withStyle_0(function(v38)
        if #l_itemList_0 == 0 then
            return v2.createElement("Frame", {
                Size = v27.props.Size,
                BackgroundColor3 = v38.Theme.BackgroundDefault.Color,
                BackgroundTransparency = v38.Theme.BackgroundDefault.Transparency,
                BorderSizePixel = 0,
                LayoutOrder = v27.props.LayoutOrder
            });
        else
            return v37(v38);
        end;
    end);
end;
return v17;


local v0 = require(script:FindFirstAncestor("AppChat").Parent.Roact);
local v1 = v0.PureComponent:extend("ConversationTimestamp");
v1.defaultProps = {
    text = "TEST",
    textSize = 24,
    textWidth = 32,
    paddingX = 0,
    paddingY = 0,
    currentStyle = nil
};
v1.render = function(v2)
    local l_textSize_0 = v2.props.textSize;
    local l_textWidth_0 = v2.props.textWidth;
    local l_currentStyle_0 = v2.props.currentStyle;
    return v0.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        layout = v0.createElement("UIListLayout", {
            HorizontalAlignment = Enum.HorizontalAlignment.Right,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }),
        padding = v0.createElement("UIPadding", {
            PaddingTop = UDim.new(0, v2.props.paddingY),
            PaddingRight = UDim.new(0, v2.props.paddingX)
        }),
        timestamp = v0.createElement("TextLabel", {
            TextXAlignment = Enum.TextXAlignment.Right,
            TextYAlignment = Enum.TextYAlignment.Top,
            BackgroundTransparency = 1,
            Size = UDim2.new(0, l_textWidth_0, 0, l_textSize_0),
            Text = v2.props.text,
            TextSize = l_textSize_0,
            Font = l_currentStyle_0.Font.Body.Font,
            TextColor3 = l_currentStyle_0.Theme.TextDefault.Color,
            TextTransparency = l_currentStyle_0.Theme.TextDefault.Transparency
        })
    });
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Parent.Promise);
local v2 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
local v3 = require(l_script_FirstAncestor_0.Conversations.Thunks.DEPRECATED_getLocalUserConversations);
return function(v4, v5, v6)
    return function(v7)
        if not (not v6 or not v6.DEPRECATED_getLocalUserConversations) then
            v3 = v6.DEPRECATED_getLocalUserConversations;
        end;
        if not v2(v7:getState(), "ChatAppReducer.ConversationsAsync.oldestConversationIsFetched") then
            return v7:dispatch(v3(v4, v5));
        else
            return v1.resolve();
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
local v2 = require(l_script_FirstAncestor_0.Conversations.populateConversationWithState);
local function v5(v3, v4)
    if not v3.unixTime or not v4.unixTime then
        if v3.unixTime or v4.unixTime then
            return (v3.unixTime or v4.unixTime) == v3.unixTime;
        else
            return string.lower(v3.title) < string.lower(v4.title);
        end;
    else
        return v4.unixTime < v3.unixTime;
    end;
end;
local v6 = nil;
local v7 = nil;
return function(v8)
    local v9 = v1(v8, "ChatAppReducer.Conversations");
    if v9 then
        local v10 = v1(v8, "ChatAppReducer.ConversationsAsync.latestMessagesIsFetching");
        if not (v9 == v6) then
            if not v10 or not v7 then
                local v11 = {};
                for _, v13 in pairs(v9) do
                    table.insert(v11, (v2(v8, v13)));
                end;
                table.sort(v11, v5);
                v6 = v9;
                v7 = v11;
                return v11;
            else
                return v7;
            end;
        else
            return v7;
        end;
    else
        return {};
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local v1 = require(l_Parent_0.Roact);
local l_withStyle_0 = require(l_Parent_0.UIBlox).Style.withStyle;
local l_withLocalization_0 = require(l_Parent_0.Localization).withLocalization;
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
local v5 = require(script.Parent.ChatDisabledIndicator);
local v6 = v1.PureComponent:extend("EmptyConversationList");
v6.defaultProps = {
    chatEnabled = false,
    navigateToPrivacy = function()
    end,
    makeFriendsToChatKey = "Feature.Chat.Message.MakeFriendsToChat",
    privacyButtonKey = "Feature.Chat.Label.PrivacySettings",
    turnOnChatKey = "Feature.Chat.Message.TurnOnChat"
};
v6.didMount = function(v7)
    if not (not l_default_0.isEnabled() or not v7.props.fireRenderEvent) then
        v7.props.fireRenderEvent();
    end;
end;
v6.render = function(v8)
    return l_withLocalization_0({
        privacyButtonText = v8.props.privacyButtonKey,
        chatDisabledText = not not v8.props.chatEnabled and v8.props.makeFriendsToChatKey or v8.props.turnOnChatKey
    })(function(v9)
        return l_withStyle_0(function(v10)
            return v1.createElement("Frame", {
                BackgroundColor3 = v10.Theme.BackgroundDefault.Color,
                BackgroundTransparency = v10.Theme.BackgroundDefault.Transparency,
                BorderSizePixel = 0,
                Size = UDim2.new(1, 0, 1, 0)
            }, {
                ChatDisabledIndicator = v1.createElement(v5, {
                    chatEnabled = v8.props.chatEnabled,
                    navigateToPrivacy = v8.props.navigateToPrivacy,
                    chatDisabledText = v9.chatDisabledText,
                    privacyButtonText = v9.privacyButtonText
                })
            });
        end);
    end);
end;
return v6;


local v0 = require(script:FindFirstAncestor("AppChat").Parent.Cryo);
return {
    init = function()
        local function v2(v1)
            return {
                id = v1,
                title = string.format("default dog chat no. %d", v1),
                thumbnails = {
                    "rbxassetid://2610133241"
                },
                presenceImage = "",
                messages = {
                    keys = {
                        "messageId"
                    },
                    values = {
                        messageId = {
                            content = "a message placeholder \240\159\142\183\240\159\144\155"
                        }
                    }
                },
                shortRelativeTime = "now+" .. v1,
                alias = "(alias)"
            };
        end;
        local v3 = {};
        for v4 = 0, 200 do
            table.insert(v3, (v2(v4)));
        end;
        return {
            getItemList = function()
                return v3;
            end,
            loadNext = function(v5)
                return v0.List.join(v5, {
                    (v2(v5[#v5].id + 1))
                });
            end,
            loadPrevious = function(v6)
                return v0.List.join({
                    (v2(v6[1].id - 1))
                }, v6);
            end
        };
    end
};


local v0 = require(script:FindFirstAncestor("AppChat").Logger):new("RoactChat.ChatLanding");
v0:setContext({
    screen = "ChatLanding"
});
return v0;