local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local l_Players_0 = game:GetService("Players");
local v4 = require(l_Parent_1.Localization);
local v5 = require(l_Parent_1.LuaSocialLibrariesDeps);
local v6 = require(l_Parent_1.React);
local v7 = require(l_Parent_1.ReactOtter);
local v8 = require(l_Parent_1.RoactUtils);
local v9 = require(l_Parent_1.UIBlox);
local l_Images_0 = v9.App.ImageSet.Images;
local l_ImageSetButton_0 = v9.Core.ImageSet.ImageSetButton;
local l_StyledTextLabel_0 = v9.App.Text.StyledTextLabel;
local v13 = require(l_Parent_0.Constants);
local v14 = require(l_Parent_0.App.Networking);
local l_NetworkingGames_0 = v14.NetworkingGames;
local l_RoduxGames_0 = v14.RoduxGames;
local l_getDeepValue_0 = v5.SocialLibraries.config({}).Dictionary.getDeepValue;
local v18 = require(l_Parent_0.Utils.getScreenshotHud);
local l_useAnimatedBinding_0 = v7.useAnimatedBinding;
local v20 = require(l_Parent_0.Hooks.useBindCaptureShortcut);
local l_useDispatch_0 = v8.Hooks.RoactRodux.useDispatch;
local l_useEffect_0 = v6.useEffect;
local l_useEffectOnMount_0 = v8.Hooks.useEffectOnMount;
local l_useLocalization_0 = v4.Hooks.useLocalization;
local l_useSelector_0 = v8.Hooks.RoactRodux.useSelector;
local v26 = require(l_Parent_0.Hooks.useShowFlashOverlay);
local l_useStyle_0 = v9.Core.Style.useStyle;
local l_instant_0 = v7.instant;
local l_spring_0 = v7.spring;
local v30 = game:DefineFastFlag("ScreenshotsOverlayLocalizedUsername", false);
local v31 = require(l_Parent_0.Flags.FFlagRemoveCaptureWatermark);
local v32 = game:DefineFastFlag("UseScreenshotHudOverlaySettings", false);
local v33 = require(l_Parent_0.Flags.FFlagUseUpdatedScreenshotWatermarkLayouts);
return function(v34)
    local v35 = l_useDispatch_0();
    local v36 = l_useStyle_0();
    local l_Font_0 = v36.Font;
    local l_Theme_0 = v36.Theme;
    local v39 = if not v34.gameId then tostring(game.GameId) else v34.gameId;
    local v40 = nil;
    local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
    if l_LocalPlayer_0 then
        v40 = l_LocalPlayer_0.Name;
    end;
    local v42 = v18();
    local v43 = not v42 or v42.ExperienceNameOverlayEnabled;
    local v44 = if not v42 then nil else v42.OverlayFont;
    l_useEffectOnMount_0(function()
        v35(l_NetworkingGames_0.GetExperiencesDetails.API({
            v39
        })):catch(function()
        end);
    end);
    v20();
    local v46 = l_useSelector_0(function(v45)
        return v45.Screenshots.IsOverlayActive;
    end);
    local v48 = l_useSelector_0(function(v47)
        return l_getDeepValue_0(v47, "Games.byGameId." .. v39 .. ".creator.creatorName");
    end);
    local v50 = l_useSelector_0(function(v49)
        return l_getDeepValue_0(v49, "Games.byGameId." .. v39 .. ".creator.creatorType");
    end);
    local v52 = l_useSelector_0(function(v51)
        return l_getDeepValue_0(v51, "Games.byGameId." .. v39 .. ".name");
    end);
    local v53 = l_useLocalization_0({
        groupNameByline = {
            "Feature.Captures.Label.GroupNameByline";
            groupName = v48
        },
        localUsername = {
            "Feature.Captures.Label.LocalUsername";
            username = v40
        },
        usernameByline = {
            "Feature.Captures.Label.UsernameByline";
            username = v48
        }
    });
    local l_usernameByline_0 = v53.usernameByline;
    if v50 == l_RoduxGames_0.Enums.CreatorType.Group then
        l_usernameByline_0 = v53.groupNameByline;
    end;
    local v55, v56 = v26();
    local v57, v58 = l_useAnimatedBinding_0(1);
    local v59 = if not v33 then v40 else v52;
    local v60 = if not v30 then "@" .. v40 else v53.localUsername;
    l_useEffect_0(function()
        if v55 then
            v56();
            v58((l_instant_0(0)));
            task.defer(task.defer, v58, l_spring_0(1));
        end;
    end, {
        v55
    });
    return v6.createElement("Frame", {
        Active = false,
        BackgroundColor3 = Color3.new(0, 0, 0),
        BackgroundTransparency = not v55 and 1 or v57,
        Position = UDim2.fromOffset(0, -l_GuiService_0.TopbarInset.Height),
        Size = UDim2.new(1, 0, 1, l_GuiService_0.TopbarInset.Height),
        Visible = v46,
        ZIndex = v13.ZIndex.Entrypoint
    }, if not v31 then {
        GameMetadataContainer = if v33 then nil else v6.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(24, 24),
            Visible = if not v32 then not v55 else v43 and not v55
        }, {
            UIListLayout = v6.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            GameTitleTextLabel = if not v52 then nil else v6.createElement(l_StyledTextLabel_0, {
                colorStyle = l_Theme_0.TextEmphasis,
                fontStyle = if not not v32 and v44 then {
                    Font = v44,
                    RelativeMinSize = l_Font_0.Header1.RelativeMinSize,
                    RelativeSize = l_Font_0.Header1.RelativeSize
                } else l_Font_0.Header1,
                layoutOrder = 1,
                text = v52,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Left
            }),
            CreatorTextLabel = if not v48 then nil else v6.createElement(l_StyledTextLabel_0, {
                colorStyle = l_Theme_0.TextEmphasis,
                fontStyle = if not not v32 and v44 then {
                    Font = v44,
                    RelativeMinSize = l_Font_0.Header2.RelativeMinSize,
                    RelativeSize = l_Font_0.Header2.RelativeSize
                } else l_Font_0.Header2,
                layoutOrder = 2,
                text = l_usernameByline_0,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Left
            })
        }),
        RobloxLogoAndExperienceNameContainer = v6.createElement("Frame", {
            AnchorPoint = Vector2.new(1, 1),
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1,
            Position = UDim2.new(1, -24, 1, -24),
            Visible = not v55
        }, {
            UIListLayout = v6.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            RobloxLetterform = v6.createElement(l_ImageSetButton_0, {
                BackgroundTransparency = 1,
                Image = l_Images_0["icons/logo/letterform"],
                ImageColor3 = l_Theme_0.TextEmphasis.Color,
                LayoutOrder = 1,
                Size = UDim2.fromOffset(138, 24)
            }),
            ExperienceNameLabel = if not v59 then nil else v6.createElement(l_StyledTextLabel_0, {
                colorStyle = l_Theme_0.TextEmphasis,
                fontStyle = if not not v32 and v44 then {
                    Font = v44,
                    RelativeMinSize = l_Font_0.Header2.RelativeMinSize,
                    RelativeSize = l_Font_0.Header2.RelativeSize
                } else l_Font_0.Header2,
                layoutOrder = 2,
                text = if not v33 then v60 else v59,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Right
            })
        })
    } else {});
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_UserGameSettings_0 = UserSettings():GetService("UserGameSettings");
local l_UserInputService_0 = game:GetService("UserInputService");
local _ = require(l_Parent_1.AppCommonLib);
local v5 = require(l_Parent_1.React);
local v6 = require(l_Parent_1.RoactUtils);
local v7 = require(l_Parent_1.RobloxAppHooks);
local l_useDispatch_0 = v6.Hooks.RoactRodux.useDispatch;
local l_useScreenSize_0 = v7.useScreenSize;
local l_useSelector_0 = v6.Hooks.RoactRodux.useSelector;
local l_useSignal_0 = v6.Hooks.useSignal;
local v12 = require(l_Parent_0.Components.CarouselItem);
local v13 = require(l_Parent_0.Components.CarouselNavArrow);
local v14 = require(l_Parent_0.Thunks.CarouselScrolled);
local v15 = require(l_Parent_0.Constants);
local v16 = require(l_Parent_0.Analytics.EventNames);
local v17 = require(l_Parent_0.Utils.getClosestItemToCenter);
local _ = require(l_Parent_0.Types);
local v19 = require(l_Parent_0.Analytics.useAnalytics);
local v20 = require(l_Parent_0.Hooks.useCarouselController);
local l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 = require(l_Parent_1.SharedFlags).FFlagCapturesCarouselCTABarUIUpdateEnabled;
local function _(v22, v23, v24)
    local l_v23_0 = v23;
    local v26 = math.floor(l_v23_0 * v22);
    if v24 < v26 then
        v26 = v24;
        l_v23_0 = math.floor(v26 / v22);
    end;
    return Vector2.new(math.floor(v26), (math.floor(l_v23_0)));
end;
local function _(v28, v29)
    local l_X_0 = (v29 - v28).X;
    if l_X_0 % 2 == 0 then
        local v31 = l_X_0 / 2;
        return v31, v31;
    else
        local v32 = math.floor(l_X_0 / 2);
        return v32 + 1, v32;
    end;
end;
local function _()
    local l_l_UserInputService_0_Platform_0 = l_UserInputService_0:GetPlatform();
    local v35 = true;
    if l_l_UserInputService_0_Platform_0 ~= Enum.Platform.IOS then
        v35 = l_l_UserInputService_0_Platform_0 == Enum.Platform.Android;
    end;
    return (v35 and l_UserInputService_0.TouchEnabled) and not l_UserGameSettings_0.ReducedMotion;
end;
return function(v37)
    local v38 = v19();
    local v39 = l_useDispatch_0();
    local v40 = l_useScreenSize_0();
    local v42 = l_useSelector_0(function(v41)
        return v41.Screenshots.Captures;
    end);
    local v44 = l_useSelector_0(function(v43)
        return v43.Screenshots.Carousel.SelectedCaptureIndex;
    end);
    local v45, v46 = v5.useState(v44);
    local v47 = v40.X / v40.Y;
    local v48 = math.clamp(math.floor(v40.X * (not (v47 > 1) and 0.075 or 0.15)), 50, 200);
    local v49 = math.floor(v48 * 0.2);
    local l_maxHeight_0 = v37.maxHeight;
    local v51 = v40.X - v48 * 2;
    local v52;
    if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then
        local l_l_maxHeight_0_0 = l_maxHeight_0;
        local v54 = math.floor(l_l_maxHeight_0_0 * v47);
        if v51 < v54 then
            v54 = v51;
            l_l_maxHeight_0_0 = math.floor(v54 / v47);
        end;
        v52 = Vector2.new(math.floor(v54), (math.floor(l_l_maxHeight_0_0)));
    else
        v52 = Vector2.new(math.floor(v51), (math.floor(l_maxHeight_0)));
    end;
    local v55 = v52.X * #v42;
    local l_X_1 = (v40 - v52).X;
    local v57, v58;
    if l_X_1 % 2 == 0 then
        local v59 = l_X_1 / 2;
        v57 = v59;
        v58 = v59;
    else
        local v60 = math.floor(l_X_1 / 2);
        v57 = v60 + 1;
        v58 = v60;
    end;
    l_X_1 = v20(v52, v44, (v5.useCallback(function(v61)
        if not (v61 >= 1) or #v42 < v61 then
            return ;
        else
            v38.fireEvent(v16.CapturesCarouselScrolled, {
                direction = v61 < v44 and v15.CarouselDirection.Left or v15.CarouselDirection.Right
            });
            v39(v14(v61));
            return ;
        end;
    end, {
        v42,
        v44
    })));
    local l_carouselRef_0 = l_X_1.carouselRef;
    local l_carouselInputBegan_0 = l_X_1.carouselInputBegan;
    local l_carouselInputEnded_0 = l_X_1.carouselInputEnded;
    local l_deleteSelectedItem_0 = l_X_1.deleteSelectedItem;
    local l_selectedItemFadeOutBinding_0 = l_X_1.selectedItemFadeOutBinding;
    local l_postDeletionItemBinding_0 = l_X_1.postDeletionItemBinding;
    local l_selectedItemRef_0 = l_X_1.selectedItemRef;
    l_useSignal_0(v37.deleteItemSignal, (v5.useCallback(function(v69)
        l_deleteSelectedItem_0(v69);
    end, {
        l_deleteSelectedItem_0
    })));
    local v72 = v5.useCallback(function(v70)
        local v71 = v17(v52, v70);
        if v71 ~= v45 then
            v46(v71);
        end;
    end, {
        v52,
        v45,
        v46
    });
    local v76 = v5.useCallback(function(v73, v74)
        if not (v45 + 3 >= v74) or v74 < v45 - 3 then
            return nil;
        else
            local v75 = true;
            if v74 ~= v45 - 1 then
                v75 = false;
                if v45 == 1 then
                    v75 = v74 == 2;
                end;
            end;
            return v5.createElement(v12, {
                capture = v73,
                fadeOutBinding = if v74 == v44 then l_selectedItemFadeOutBinding_0 else nil,
                transitionBinding = if v74 == v44 then l_selectedItemFadeOutBinding_0 else if v75 then l_postDeletionItemBinding_0 else nil,
                imagePadding = v49,
                itemIndex = v74,
                itemSize = v52,
                unfocusedSizeMultiplier = 0.8
            });
        end;
    end, {
        v52,
        v45,
        v49,
        l_postDeletionItemBinding_0,
        v44,
        l_selectedItemFadeOutBinding_0
    });
    local v80 = v5.useMemo(function()
        local v77 = {
            Layout = v5.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Center
            })
        };
        for v78, v79 in v42, nil, nil do
            v77[v79.contentId] = v5.createElement("Frame", {
                BackgroundTransparency = 1,
                LayoutOrder = v78,
                Size = UDim2.fromOffset(v52.X, v52.Y),
                ref = if v78 == v44 then l_selectedItemRef_0 else nil
            }, {
                Item = v76(v79, v78)
            });
        end;
        return v77;
    end, {
        v42,
        v52,
        v76,
        v44
    });
    local v81 = math.floor(v52.Y * 0.8);
    local v82 = v45 > 1;
    local v83 = v45 < #v42;
    local v84 = v82 or v83;
    local l_createElement_0 = v5.createElement;
    local v86 = "Frame";
    local v87 = {
        BackgroundTransparency = 1,
        LayoutOrder = v37.LayoutOrder,
        Size = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then UDim2.new(1, 0, 0, v52.Y) else UDim2.new(1, 0, 0, v37.maxHeight),
        ZIndex = v37.ZIndex
    };
    local v88 = {};
    local l_createElement_1 = v5.createElement;
    local v90 = "ScrollingFrame";
    local v91 = {
        BackgroundTransparency = 1,
        CanvasSize = UDim2.new(0, v55, 1, 0),
        ClipsDescendants = false,
        Position = UDim2.fromOffset(v57, 0),
        ScrollBarThickness = 0,
        ScrollingDirection = Enum.ScrollingDirection.X
    };
    local l_v84_0 = v84;
    if l_v84_0 then
        local l_l_UserInputService_0_Platform_1 = l_UserInputService_0:GetPlatform();
        local v94 = true;
        if l_l_UserInputService_0_Platform_1 ~= Enum.Platform.IOS then
            v94 = l_l_UserInputService_0_Platform_1 == Enum.Platform.Android;
        end;
        l_v84_0 = (v94 and l_UserInputService_0.TouchEnabled) and not l_UserGameSettings_0.ReducedMotion;
    end;
    v91.ScrollingEnabled = l_v84_0;
    v91.Size = UDim2.fromOffset(v52.X, v52.Y);
    v91[v5.Change.CanvasPosition] = v72;
    v91[v5.Event.InputBegan] = l_carouselInputBegan_0;
    v91[v5.Event.InputEnded] = l_carouselInputEnded_0;
    v91.ref = l_carouselRef_0;
    v88.AnimatedCarousel = l_createElement_1(v90, v91, v80);
    v88.LeftArrow = v82 and v5.createElement(v13, {
        direction = v15.CarouselDirection.Left,
        isDisabled = v37.isDisabled,
        Size = UDim2.fromOffset(v57 - v49, v81),
        ZIndex = 2
    });
    v88.RightArrow = v83 and v5.createElement(v13, {
        direction = v15.CarouselDirection.Right,
        isDisabled = v37.isDisabled,
        Size = UDim2.fromOffset(v58 - v49, v81),
        ZIndex = 2
    });
    return l_createElement_0(v86, v87, v88);
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_UserInputService_0 = game:GetService("UserInputService");
local l_default_0 = require(l_Parent_1.PermissionsProtocol).PermissionsProtocol.default;
local v4 = require(l_Parent_1.React);
local v5 = require(l_Parent_1.RoactUtils);
local v6 = require(l_Parent_1.UIBlox);
local l_IconButton_0 = v6.App.Button.IconButton;
local l_Images_0 = v6.App.ImageSet.Images;
local l_useStyle_0 = v6.Core.Style.useStyle;
local v10 = require(l_Parent_0.Analytics.useAnalytics);
local l_useDispatch_0 = v5.Hooks.RoactRodux.useDispatch;
local l_useRef_0 = v4.useRef;
local l_useSelector_0 = v5.Hooks.RoactRodux.useSelector;
local v14 = require(l_Parent_0.Actions.DeleteWarningModalOpened);
local v15 = require(l_Parent_0.Analytics.EventNames);
local v16 = require(l_Parent_0.Thunks.SaveCaptureToExternalStorage);
local v17 = require(l_Parent_0.App.ScreenshotsPolicy);
local v18 = require(l_Parent_0.Thunks.ShareCapture);
local _ = require(l_Parent_0.Types);
local v20 = require(l_Parent_0.Utils.getIsDeleteWarningModalOptedOut);
local v21 = require(l_Parent_0.Utils.getSaveToStoragePermission);
local v22 = require(l_Parent_0.Flags.FFlagCaptureStorageBulkManagementEnabled);
local l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 = require(l_Parent_1.SharedFlags).FFlagCapturesCarouselCTABarUIUpdateEnabled;
local v24 = require(l_Parent_0.Flags.FFlagCapturesCarouselPostButtonEnabled);
local v25 = require(l_Parent_0.Flags.FFlagScreenshotsSaveToDeviceToast);
local v26 = UDim.new(0.12, 0);
local v27 = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then UDim2.fromOffset(44, 44) else UDim2.fromOffset(36, 36);
local v28 = UDim.new(0, 8);
return (v17.connect(function(v29)
    return {
        enableShareCaptureCTA = v29.enableShareCaptureCTA()
    };
end)(function(v30)
    local v31 = v10();
    local v32 = l_useDispatch_0();
    local v33 = l_useStyle_0();
    local v34 = l_useRef_0(0);
    local v36 = l_useSelector_0(function(v35)
        return v35.Screenshots.Captures[v35.Screenshots.Carousel.SelectedCaptureIndex];
    end);
    local v37 = v4.useCallback(function()
        if not v30.isDisabled then
            if DateTime.now().UnixTimestampMillis - v34.current < 500 then
                return true;
            else
                return false;
            end;
        else
            return true;
        end;
    end, {
        v30.isDisabled
    });
    local v38 = v4.useCallback(function()
        v34.current = DateTime.now().UnixTimestampMillis;
    end, {});
    return v4.createElement("Frame", {
        AutomaticSize = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then Enum.AutomaticSize.X else Enum.AutomaticSize.None,
        BackgroundColor3 = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then v33.Theme.UIEmphasis.Color else v33.Theme.BackgroundContrast.Color,
        BackgroundTransparency = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then v33.Theme.UIEmphasis.Transparency else v33.Theme.BackgroundContrast.Transparency,
        BorderSizePixel = 0,
        LayoutOrder = v30.LayoutOrder,
        Size = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then UDim2.fromOffset(0, v30.height) else UDim2.new(1, 0, 0, v30.height),
        ZIndex = v30.ZIndex
    }, {
        UICorner = v4.createElement("UICorner", {
            CornerRadius = v28
        }),
        UIPadding = v4.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, 12),
            PaddingRight = UDim.new(0, 12)
        }),
        Layout = v4.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then UDim.new(0, 30) else v26,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Center
        }),
        SaveButton = v4.createElement(l_IconButton_0, {
            backgroundColor = v33.Theme.BackgroundUIContrast,
            icon = l_Images_0["icons/actions/download_medium"],
            layoutOrder = 1,
            onActivated = v4.useCallback(function()
                if not v37() then
                    if not v22 then
                        l_default_0:hasPermissions({
                            l_default_0.Permissions.WRITE_MEDIA_STORAGE
                        }):andThen(function(v39)
                            local v40 = v39.status == l_default_0.Status.AUTHORIZED;
                            if not (l_UserInputService_0:GetPlatform() == Enum.Platform.Android) or v40 then
                                if not v25 or v40 then
                                    v32(v16(v36));
                                    return ;
                                else
                                    l_default_0:requestPermissions({
                                        l_default_0.Permissions.WRITE_MEDIA_STORAGE
                                    }):andThen(function(v41)
                                        if v41.status == l_default_0.Status.AUTHORIZED then
                                            v32(v16(v36));
                                        end;
                                    end):catch(function()
                                    end);
                                    return ;
                                end;
                            elseif v30.openPermissionModal then
                                assert(v30.openPermissionModal ~= nil, "props.openPermissionModal is not nil");
                                v30.openPermissionModal();
                                return ;
                            else
                                return ;
                            end;
                        end):catch(function()
                            if l_UserInputService_0:GetPlatform() ~= Enum.Platform.Android then
                                return ;
                            elseif v30.openPermissionModal then
                                assert(v30.openPermissionModal ~= nil, "props.openPermissionModal is not nil");
                                v30.openPermissionModal();
                                return ;
                            else
                                return ;
                            end;
                        end);
                    else
                        v21(v36, v30.openPermissionModal, v32);
                    end;
                    v38();
                    v31.fireEvent(v15.CapturesCarouselSaveToExternalStorageActivated);
                    return ;
                else
                    return ;
                end;
            end, {
                v36,
                v37,
                v38,
                v30.openPermissionModal
            }),
            showBackground = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and true or false,
            size = v27
        }),
        PostButton = v24 and v4.createElement(l_IconButton_0, {
            backgroundColor = v33.Theme.BackgroundUIContrast,
            icon = l_Images_0["icons/actions/edit/add"],
            layoutOrder = 2,
            onActivated = v4.useCallback(function()
                if not v37() then
                    v38();
                    v31.fireEvent(v15.CapturesCarouselPostActivated);
                    return ;
                else
                    return ;
                end;
            end, {
                v36,
                v30.isDisabled,
                v37,
                v38
            }),
            showBackground = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and true or false,
            size = v27
        }),
        ShareButton = v30.enableShareCaptureCTA and v4.createElement(l_IconButton_0, {
            backgroundColor = v33.Theme.BackgroundUIContrast,
            icon = l_Images_0["icons/actions/share"],
            layoutOrder = 3,
            onActivated = v4.useCallback(function()
                if not v37() then
                    v38();
                    v31.fireEvent(v15.CapturesCarouselShareActivated);
                    v32(v18(v36));
                    return ;
                else
                    return ;
                end;
            end, {
                v36,
                v30.isDisabled,
                v37,
                v38
            }),
            showBackground = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and true or false,
            size = v27
        }),
        DeleteButton = v4.createElement(l_IconButton_0, {
            icon = l_Images_0["icons/actions/edit/delete"],
            layoutOrder = 4,
            onActivated = v4.useCallback(function()
                if not v37() then
                    v38();
                    v31.fireEvent(v15.CapturesDeleteActivatedInCarousel);
                    if not v20() then
                        v32(v14());
                        return ;
                    else
                        assert(v30.deleteItem ~= nil, "props.deleteItem should not be nil");
                        v30.deleteItem();
                        return ;
                    end;
                else
                    return ;
                end;
            end, {
                v36,
                v30.deleteItem,
                v30.isDisabled,
                v37,
                v38
            }),
            showBackground = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and true or false,
            size = v27
        })
    });
end));


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.AppCommonLib);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RobloxAppHooks);
local v5 = require(l_Parent_1.UIBlox);
local l_UserGameSettings_0 = UserSettings():GetService("UserGameSettings");
local l_memoize_0 = v2.memoize;
local l_useScreenSize_0 = v4.useScreenSize;
local l_useStyle_0 = v5.Core.Style.useStyle;
local v10 = require(l_Parent_0.Enums.CaptureType);
local v11 = require(l_Parent_0.Utils.getCaptureSize);
local _ = require(l_Parent_0.Types);
local l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 = require(l_Parent_1.SharedFlags).FFlagCapturesCarouselCTABarUIUpdateEnabled;
local v24 = l_memoize_0(function(v14, v15, v16)
    local v17 = v14.X / v14.Y;
    local v18 = v15.X / v15.Y;
    if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then
        if math.abs(v17 - v18) < 0.35 then
            return v15;
        else
            local v19 = v17 < 1;
            local v20 = v18 < 1;
            if not (not v19 or v20) then
                local l_Y_0 = v16.Y;
                return Vector2.new(math.floor(l_Y_0 * v17), l_Y_0);
            end;
        end;
    end;
    local l_X_0 = v15.X;
    local v23 = math.floor(l_X_0 / v17);
    if l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and v15.Y < v23 then
        v23 = v15.Y;
        l_X_0 = math.floor(v23 * v17);
    end;
    return Vector2.new(l_X_0, v23);
end);
local function _(v25)
    return UDim2.fromScale(v25, v25);
end;
local function v28(v27)
    if not l_UserGameSettings_0.ReducedMotion then
        return 1;
    else
        return v27;
    end;
end;
local function v30(v29)
    if not l_UserGameSettings_0.ReducedMotion then
        return (UDim2.fromScale(v29, v29));
    else
        return (UDim2.fromScale(1, 1));
    end;
end;
return function(v31)
    local v32 = l_useStyle_0();
    local l_itemSize_0 = v31.itemSize;
    local v34, v35 = v3.useBinding(0);
    local v36, v37 = v3.useState(Vector2.new(0, 0));
    local v38 = l_useScreenSize_0();
    local l_imagePadding_0 = v31.imagePadding;
    local l_itemIndex_0 = v31.itemIndex;
    local v42 = v3.useCallback(function(v41)
        v35(v41.AbsolutePosition.X);
    end, {
        v35
    });
    v3.useEffect(function()
        if v31.capture.type == v10.Video then
            return ;
        else
            task.spawn(function()
                local v43 = v11(v31.capture.contentId);
                if not v43 then
                    v37(l_itemSize_0);
                    return ;
                else
                    v37(v43);
                    return ;
                end;
            end);
            return ;
        end;
    end, {
        l_itemSize_0,
        v31.capture
    });
    local v46 = v3.useCallback(function(v44)
        local l_Resolution_0 = v44.Resolution;
        v37(Vector2.new(l_Resolution_0.X, l_Resolution_0.Y));
    end, {});
    local v52 = v3.useCallback(function(v47)
        local v48 = l_itemSize_0.X / 2;
        local v49 = v38.X / 2;
        local v50 = v47 + v48;
        local v51 = math.abs(v49 - v50);
        return math.sign(v49 - v50), (math.min(1, (v51 < 25 and 0 or v51 - 25) / (l_itemSize_0.X - 25)));
    end, {
        l_itemSize_0,
        l_itemIndex_0,
        v38
    });
    local v58 = v3.useCallback(function(v53)
        local _, v55 = v52(v53);
        local v56 = v24(v36, l_itemSize_0, v38);
        if v55 == 0 then
            return UDim2.fromOffset(v56.X, v56.Y);
        else
            local v57 = 1 - v55 * (1 - v31.unfocusedSizeMultiplier);
            return UDim2.fromOffset(math.floor(v56.X * v57), (math.floor(v56.Y * v57)));
        end;
    end, {
        v36,
        l_itemSize_0,
        v38,
        v31.unfocusedSizeMultiplier,
        v52
    });
    local v62 = v3.useCallback(function(v59)
        local v60, v61 = v52(v59);
        if v61 == 0 then
            return UDim2.fromScale(0.5, 0.5);
        else
            return UDim2.new(0.5, (((l_itemSize_0.X / 2 - l_imagePadding_0) - v58(v59).X.Offset / 2) * v61) * v60, 0.5, 0);
        end;
    end, {
        v36,
        l_imagePadding_0,
        l_itemSize_0,
        v38,
        v52,
        v58
    });
    local l_Transparency_0 = v32.Theme.Overlay.Transparency;
    local v67 = v3.useCallback(function(v64)
        local _, v66 = v52(v64);
        return 1 - (1 - l_Transparency_0) * v66;
    end, {
        l_Transparency_0,
        v52
    });
    return v3.createElement("Frame", {
        AnchorPoint = Vector2.new(0.5, 0.5),
        BackgroundTransparency = 1,
        Position = UDim2.fromScale(0.5, 0.5),
        Size = UDim2.fromScale(1, 1),
        [v3.Change.AbsolutePosition] = v42
    }, {
        CaptureContainer = v3.createElement("Frame", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            Position = v34:map(v62),
            Size = v34:map(v58)
        }, {
            CaptureImage = if v31.capture.type == v10.Screenshot then v3.createElement("ImageLabel", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Image = v31.capture.contentId,
                Position = UDim2.fromScale(0.5, 0.5),
                ScaleType = Enum.ScaleType.Crop,
                Size = if not v31.fadeOutBinding then UDim2.fromScale(1, 1) else v31.fadeOutBinding:map(v30),
                Visible = v36 ~= Vector2.new(0, 0),
                ZIndex = 1
            }) else nil,
            CaptureVideo = if v31.capture.type == v10.Video then v3.createElement("VideoFrame", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Playing = v34:map(function(v68)
                    local _, v70 = v52(v68);
                    return v70 < 0.5;
                end),
                Position = UDim2.fromScale(0.5, 0.5),
                Looped = true,
                Size = if not v31.fadeOutBinding then UDim2.fromScale(1, 1) else v31.fadeOutBinding:map(v30),
                Video = v31.capture.contentId,
                Volume = 0,
                ZIndex = 1,
                [v3.Event.Loaded] = v46
            }) else nil,
            Overlay = v3.createElement("Frame", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundColor3 = v32.Theme.Overlay.Color,
                BackgroundTransparency = v3.joinBindings({
                    absoluteXPosition = v34,
                    fadeOutBinding = v31.fadeOutBinding
                }):map((v3.useCallback(function(v71)
                    local l_absoluteXPosition_0 = v71.absoluteXPosition;
                    local l_fadeOutBinding_0 = v71.fadeOutBinding;
                    if not l_UserGameSettings_0.ReducedMotion or not l_fadeOutBinding_0 then
                        if not l_fadeOutBinding_0 then
                            return v67(l_absoluteXPosition_0);
                        else
                            return (math.min(v67(l_absoluteXPosition_0), l_fadeOutBinding_0));
                        end;
                    else
                        return 1;
                    end;
                end, {
                    v67
                }))),
                BorderSizePixel = 0,
                Position = UDim2.fromScale(0.5, 0.5),
                Size = if not v31.fadeOutBinding then UDim2.fromScale(1, 1) else v31.fadeOutBinding:map(v30),
                ZIndex = 2
            }),
            TransitionOverlay = v3.createElement("Frame", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundColor3 = v32.Theme.BackgroundContrast.Color,
                BackgroundTransparency = not v31.transitionBinding and 1 or v31.transitionBinding:map(v28),
                BorderSizePixel = 0,
                Position = UDim2.fromScale(0.5, 0.5),
                Size = UDim2.fromScale(1, 1),
                ZIndex = 3
            })
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_RunService_0 = game:GetService("RunService");
local l_UserInputService_0 = game:GetService("UserInputService");
local v4 = require(l_Parent_1.React);
local v5 = require(l_Parent_1.RoactUtils);
local v6 = require(l_Parent_1.SocialCommon);
local v7 = require(l_Parent_1.UIBlox);
local l_Images_0 = v7.App.ImageSet.Images;
local l_ImageSetLabel_0 = v7.Core.ImageSet.ImageSetLabel;
local l_InputUtilities_0 = v6.Utils.InputUtilities;
local l_useDispatch_0 = v5.Hooks.RoactRodux.useDispatch;
local l_useExternalEvent_0 = v7.Core.Hooks.useExternalEvent;
local l_useStyle_0 = v7.Core.Style.useStyle;
local v14 = require(l_Parent_0.Thunks.CarouselNavigated);
local v15 = require(l_Parent_0.Constants);
local v16 = require(l_Parent_0.Analytics.EventNames);
local v17 = require(l_Parent_0.Analytics.useAnalytics);
local v18 = l_Images_0["icons/actions/cycleLeft"];
local v19 = l_Images_0["icons/actions/cycleRight"];
return function(v20)
    local v21 = v17();
    local v22 = l_useDispatch_0();
    local v23 = l_useStyle_0();
    local v24 = v4.useRef(nil);
    local v25 = v20.direction == v15.CarouselDirection.Left;
    local v26 = if not v25 then Vector2.new(1, 0.5) else Vector2.new(0, 0.5);
    local v27 = if not v25 then v19 else v18;
    local v28 = if not v25 then UDim2.fromScale(1, 0.5) else UDim2.fromScale(0, 0.5);
    v4.useEffect(function()
        return function()
            if v24.current then
                v24.current:Disconnect();
                v24.current = nil;
            end;
        end;
    end, {});
    v4.useEffect(function()
        if not (not v20.isDisabled or not v24.current) then
            v24.current:Disconnect();
            v24.current = nil;
        end;
    end, {
        v20.isDisabled
    });
    local v34 = v4.useCallback(function(_, v30)
        if not v20.isDisabled then
            if v30.UserInputState ~= Enum.UserInputState.Begin then
                return ;
            elseif l_InputUtilities_0.isActivationInput(v30) then
                if v24.current then
                    v24.current:Disconnect();
                    v24.current = nil;
                end;
                v21.fireEvent(v16.CapturesCarouselNavigated, {
                    direction = v20.direction
                });
                v22(v14(v20.direction));
                local v31 = tick();
                local l_v31_0 = v31;
                v24.current = l_RunService_0.RenderStepped:Connect(function(_)
                    if math.max(0.5 / (tick() - l_v31_0), 0.15) < tick() - v31 then
                        v21.fireEvent(v16.CapturesCarouselNavigated, {
                            direction = v20.direction
                        });
                        v22(v14(v20.direction));
                        v31 = tick();
                    end;
                end);
                return ;
            else
                return ;
            end;
        else
            return ;
        end;
    end, {
        v20.isDisabled
    });
    local v37 = v4.useCallback(function(_, v36)
        if not (not l_InputUtilities_0.isActivationInput(v36) or not v24.current) then
            v24.current:Disconnect();
            v24.current = nil;
        end;
    end, {});
    l_useExternalEvent_0(l_UserInputService_0.InputEnded, function(v38)
        if not (not l_InputUtilities_0.isActivationInput(v38) or not v24.current) then
            v24.current:Disconnect();
            v24.current = nil;
        end;
    end);
    return v4.createElement("TextButton", {
        AnchorPoint = v26,
        BackgroundTransparency = 1,
        Position = v28,
        Size = v20.Size,
        Text = "",
        ZIndex = v20.ZIndex,
        Visible = not v20.isDisabled,
        [v4.Event.InputBegan] = v34,
        [v4.Event.InputEnded] = v37
    }, {
        Arrow = v4.createElement(l_ImageSetLabel_0, {
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            Image = v27,
            ImageColor3 = v23.Theme.IconEmphasis.Color,
            ImageTransparency = v23.Theme.IconEmphasis.Transparency,
            Position = UDim2.fromScale(0.5, 0.5),
            Size = UDim2.fromOffset(36, 36)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_ContextActionService_0 = game:GetService("ContextActionService");
local l_GuiService_0 = game:GetService("GuiService");
local l_LocalizationService_0 = game:GetService("LocalizationService");
local v5 = require(l_Parent_1.AppCommonLib);
local v6 = require(l_Parent_1.React);
local v7 = require(l_Parent_1.RoactUtils);
local v8 = require(l_Parent_1.RobloxAppHooks);
local v9 = require(l_Parent_1.UIBlox);
local l_Images_0 = v9.App.ImageSet.Images;
local l_ImageSetButton_0 = v9.Core.ImageSet.ImageSetButton;
local v12 = require(l_Parent_0.Enums.ShotsToastType);
local l_Signal_0 = v5.Signal;
local v14 = require(l_Parent_0.Components.ToastContainer);
local v15 = require(l_Parent_0.Actions.ToastTriggered);
local l_useStyle_0 = v9.Core.Style.useStyle;
local l_useCallback_0 = v6.useCallback;
local l_useEffect_0 = v6.useEffect;
local l_useDispatch_0 = v7.Hooks.RoactRodux.useDispatch;
local l_useRef_0 = v6.useRef;
local l_useScreenSize_0 = v8.useScreenSize;
local l_useSelector_0 = v7.Hooks.RoactRodux.useSelector;
local l_useState_0 = v6.useState;
local v24 = require(l_Parent_0.Components.CapturesCarousel);
local v25 = require(l_Parent_0.Actions.CarouselClosed);
local v26 = require(l_Parent_0.Components.CarouselCTAContainer);
local v27 = require(l_Parent_0.Constants);
local v28 = require(l_Parent_0.Thunks.DeleteCapture);
local v29 = require(l_Parent_0.Components.DeleteWarningModal);
local v30 = require(l_Parent_0.Analytics.EventNames);
local v31 = require(l_Parent_0.Experimentation.getIsFeatureVisibleToDesktopUser);
local v32 = require(l_Parent_0.Utils.getTimestampFromCapture);
local v33 = require(l_Parent_0.Components.PermissionModal);
local _ = require(l_Parent_0.Types);
local v35 = require(l_Parent_0.Analytics.useAnalytics);
local l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 = require(l_Parent_1.SharedFlags).FFlagCapturesCarouselCTABarUIUpdateEnabled;
local v37 = require(l_Parent_0.Flags.FFlagDecomposeDesktopCapturesEligibilityCheck);
local v38 = UDim2.fromOffset(32, 32);
local v39 = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and 60 or 40;
local v40 = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and 16 or 8;
local v41 = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and 28 or 8;
local v42 = not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 and 14 or 32;
local function v47(v43)
    local v44 = v32(v43);
    if v44 then
        assert(typeof(v44) == "number", "Expected timestamp to be a number");
        local v45 = DateTime.fromUnixTimestampMillis(v44);
        local l_RobloxLocaleId_0 = l_LocalizationService_0.RobloxLocaleId;
        return (("%* %*"):format(v45:FormatLocalTime("L", l_RobloxLocaleId_0), (v45:FormatLocalTime("LT", l_RobloxLocaleId_0))));
    else
        return "";
    end;
end;
return function(_)
    local v49 = v35();
    local v50 = l_useDispatch_0();
    local v51 = l_useStyle_0();
    local v53 = l_useSelector_0(function(v52)
        return v52.Screenshots.Captures;
    end);
    local v55 = l_useSelector_0(function(v54)
        return v54.Screenshots.Carousel.IsOpen;
    end);
    local v57 = l_useSelector_0(function(v56)
        return v56.Screenshots.Carousel.SelectedCaptureIndex;
    end);
    local v58 = l_useRef_0(l_Signal_0.new());
    local v59, v60 = l_useState_0(false);
    local v61, v62 = l_useState_0(false);
    local v63 = l_useScreenSize_0();
    l_useEffect_0(function()
        v50(v15(v12.None));
    end, {
        v55
    });
    local v64 = l_useCallback_0(function()
        v60(false);
        v49.fireEvent(v30.CapturesCarouselClosed);
        v50(v25());
    end, {});
    local v65 = l_useCallback_0(function()
        v60(false);
        v49.fireEvent(v30.CapturesCarouselClosedByKeyboard);
        v50(v25());
    end, {});
    local v66 = l_useCallback_0(function()
        v62(true);
    end, {});
    local v67 = l_useCallback_0(function()
        v62(false);
    end, {});
    local v69 = l_useCallback_0(function()
        v60(true);
        local v68 = v53[v57];
        v58.current:fire(function()
            v50(v28(v68));
            v60(false);
        end);
    end, {
        v53,
        v57
    });
    l_useEffect_0(function()
        if v31() or v37 then
            if v55 then
                l_ContextActionService_0:BindCoreAction("CapturesCarouselCloseShortcutAction", function(_, v71)
                    if v71 == Enum.UserInputState.End then
                        v65();
                    end;
                end, false, Enum.KeyCode.Escape);
                return function()
                    l_ContextActionService_0:UnbindCoreAction("CapturesCarouselCloseShortcutAction");
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    end, {
        v55,
        v65
    });
    if v55 then
        local v72 = (((v63.Y - v42) - v39) - v41) - v40 * 4;
        if l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then
            v72 = ((((v63.Y - v42) - v39) - v41) - 16) - v40 * 2;
        end;
        local v73 = v47(v53[v57]);
        return v6.createElement("Frame", {
            Active = true,
            BackgroundColor3 = v51.Theme.BackgroundContrast.Color,
            BackgroundTransparency = v51.Theme.BackgroundContrast.Transparency,
            BorderSizePixel = 0,
            Position = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then UDim2.fromOffset(0, -l_GuiService_0.TopbarInset.Height) else UDim2.fromOffset(0, 0),
            Size = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then UDim2.new(1, 0, 1, l_GuiService_0.TopbarInset.Height) else UDim2.fromScale(1, 1)
        }, {
            CarouselContainer = v6.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.fromScale(1, 1)
            }, {
                UIListLayout = v6.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    Padding = UDim.new(0, v40),
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    VerticalAlignment = Enum.VerticalAlignment.Center
                }),
                Padding = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then nil else v6.createElement("UIPadding", {
                    PaddingBottom = UDim.new(0, 16),
                    PaddingTop = UDim.new(0, v41)
                }),
                TopPadding = if l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then nil else v6.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, v41)
                }),
                TitleFrame = v6.createElement("Frame", {
                    BackgroundTransparency = 1,
                    LayoutOrder = 1,
                    Size = UDim2.new(1, 0, 0, v42),
                    ZIndex = 2
                }, {
                    CloseButton = v6.createElement(l_ImageSetButton_0, {
                        AnchorPoint = Vector2.new(0, 0.5),
                        BackgroundTransparency = 1,
                        Image = if not l_FFlagCapturesCarouselCTABarUIUpdateEnabled_0 then l_Images_0["icons/controls/close-ingame"] else l_Images_0["icons/navigation/close"],
                        ImageColor3 = v51.Theme.IconEmphasis.Color,
                        ImageTransparency = v51.Theme.IconEmphasis.Transparency,
                        Position = UDim2.new(0, 42, 0.5, 0),
                        Size = v38,
                        [v6.Event.Activated] = v64
                    }),
                    DropShadow = v6.createElement("TextLabel", {
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        AutomaticSize = Enum.AutomaticSize.X,
                        BackgroundTransparency = 1,
                        Font = v51.Font.Header2.Font,
                        LayoutOrder = 1,
                        Position = UDim2.new(0.5, 0, 0.5, 2),
                        Size = UDim2.fromScale(0, 1),
                        Text = v73,
                        TextColor3 = v51.Theme.DropShadow.Color,
                        TextSize = v51.Font.BaseSize * v51.Font.Header2.RelativeSize,
                        TextTransparency = v51.Theme.DropShadow.Transparency,
                        TextXAlignment = Enum.TextXAlignment.Center,
                        TextYAlignment = Enum.TextYAlignment.Center,
                        ZIndex = 1
                    }, {
                        UIStroke = v6.createElement("UIStroke", {
                            ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual,
                            Color = v51.Theme.DropShadow.Color,
                            LineJoinMode = Enum.LineJoinMode.Round,
                            Thickness = 1,
                            Transparency = v51.Theme.DropShadow.Transparency
                        })
                    }),
                    Title = v6.createElement("TextLabel", {
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        AutomaticSize = Enum.AutomaticSize.X,
                        BackgroundTransparency = 1,
                        Font = v51.Font.Header2.Font,
                        LayoutOrder = 1,
                        Position = UDim2.fromScale(0.5, 0.5),
                        Size = UDim2.fromScale(0, 1),
                        Text = v73,
                        TextColor3 = v51.Theme.TextEmphasis.Color,
                        TextSize = v51.Font.BaseSize * v51.Font.Header2.RelativeSize,
                        TextXAlignment = Enum.TextXAlignment.Center,
                        TextYAlignment = Enum.TextYAlignment.Center,
                        ZIndex = 2
                    })
                }),
                CapturesCarousel = v6.createElement(v24, {
                    deleteItemSignal = v58.current,
                    isDisabled = v59,
                    LayoutOrder = 2,
                    maxHeight = v72,
                    ZIndex = 1
                }),
                CTAContainer = v6.createElement(v26, {
                    deleteItem = v69,
                    height = v39,
                    isDisabled = v59,
                    LayoutOrder = 3,
                    openPermissionModal = v66,
                    ZIndex = 2
                })
            }),
            DeleteWarningModal = v6.createElement(v29, {
                deleteItem = v69,
                zIndex = 3
            }),
            PermissionModal = v6.createElement(v33, {
                closeModal = v67,
                visible = v61,
                zIndex = 3
            }),
            ToastsFrame = v6.createElement("Frame", {
                Active = false,
                BackgroundTransparency = 1,
                Size = UDim2.fromScale(1, 1),
                ZIndex = v27.ZIndex.Toasts
            }, {
                ToastContainer = v6.createElement(v14)
            })
        });
    else
        return nil;
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Localization);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RoactUtils);
local v5 = require(l_Parent_1.RobloxAppHooks);
local v6 = require(l_Parent_1.UIBlox);
local v7 = require(l_Parent_0.Actions.DeleteWarningModalClosed);
local v8 = require(l_Parent_0.Utils.recordDeleteWarningModalOptOut);
local l_useCallback_0 = v3.useCallback;
local l_useDispatch_0 = v4.Hooks.RoactRodux.useDispatch;
local l_useEffect_0 = v3.useEffect;
local l_useLocalization_0 = v2.Hooks.useLocalization;
local l_useScreenSize_0 = v5.useScreenSize;
local l_useSelector_0 = v4.Hooks.RoactRodux.useSelector;
local l_useState_0 = v3.useState;
local l_useStyle_0 = v6.Core.Style.useStyle;
local v17 = require(l_Parent_0.Analytics.EventNames);
local v18 = require(l_Parent_0.Analytics.useAnalytics);
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local l_Checkbox_0 = v6.App.InputButton.Checkbox;
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
return function(v22)
    local v23 = l_useScreenSize_0();
    local v24 = l_useStyle_0();
    local v25 = v18();
    local v26 = l_useDispatch_0();
    local v27 = l_useLocalization_0({
        alertBody = "Feature.Captures.Label.DeleteCaptureInfo",
        alertBodyPlural = "Feature.Captures.Label.DeleteCapturesWarning",
        alertTitle = "Feature.Captures.Title.DeleteCaptureWarning",
        alertTitlePlural = "Feature.Captures.Title.DeleteMultipleCapturesWarning",
        cancelCTA = "Feature.Captures.Action.DeleteCaptureWarningCancel",
        deleteCTA = "Feature.Captures.Action.DeleteCaptureWarningConfirm",
        optOutText = "Feature.Captures.Label.DeleteCaptureWarningOptOut"
    });
    local l_Theme_0 = v24.Theme;
    local v30 = l_useSelector_0(function(v29)
        return v29.Screenshots.Carousel.IsDeleteWarningModalOpen;
    end);
    local v32 = l_useSelector_0(function(v31)
        return v31.Screenshots.CaptureManager.SelectedCaptures;
    end);
    local v33, v34 = l_useState_0(false);
    l_useEffect_0(function()
        if v30 then
            v34(false);
        end;
    end, {
        v30,
        v34
    });
    return v3.createElement("Frame", {
        Active = true,
        BackgroundColor3 = l_Theme_0.Overlay.Color,
        BackgroundTransparency = l_Theme_0.Overlay.Transparency,
        Size = UDim2.new(1, 0, 1, 0),
        Visible = v30,
        ZIndex = v22.zIndex
    }, {
        Alert = v3.createElement(l_InteractiveAlert_0, {
            bodyText = if #v32 > 1 then v27.alertBodyPlural else v27.alertBody,
            buttonStackInfo = {
                buttons = {
                    {
                        buttonType = l_ButtonType_0.Secondary,
                        props = {
                            onActivated = l_useCallback_0(function()
                                v26(v7());
                                v25.fireEvent(v17.CapturesDeleteWarningModalCancelPressed);
                            end, {}),
                            text = v27.cancelCTA
                        }
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            onActivated = l_useCallback_0(function()
                                v22.deleteItem();
                                if v33 then
                                    v8(v25);
                                end;
                                v25.fireEvent(v17.CapturesDeleteWarningModalDeletePressed);
                                v26(v7());
                            end, {
                                v25,
                                v33,
                                v22.deleteItem
                            }),
                            text = v27.deleteCTA
                        }
                    }
                }
            },
            isMiddleContentFocusable = false,
            middleContent = function()
                return v3.createElement(l_Checkbox_0, {
                    text = v27.optOutText,
                    isSelected = v33,
                    isDisabled = false,
                    onActivated = function()
                        v34(not v33);
                    end
                });
            end,
            position = UDim2.fromScale(0.5, 0.5),
            screenSize = v23,
            title = if #v32 > 1 then v27.alertTitlePlural else v27.alertTitle
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RoactUtils);
local v5 = require(l_Parent_1.UIBlox);
local l_ImageSetLabel_0 = v5.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v5.App.ImageSet.Images;
local l_useExternalEvent_0 = v5.Core.Hooks.useExternalEvent;
local l_useStyle_0 = v5.Core.Style.useStyle;
local v10 = require(l_Parent_0.Utils.createShutterSound);
local v11 = require(l_Parent_0.Analytics.EventNames);
local v12 = require(l_Parent_0.Context.ShotsContext);
local v13 = require(l_Parent_0.Thunks.TakeCapture);
local v14 = require(l_Parent_0.Analytics.useAnalytics);
local l_useCallback_0 = v3.useCallback;
local l_useDispatch_0 = v4.Hooks.RoactRodux.useDispatch;
local l_useEffect_0 = v3.useEffect;
local l_useRef_0 = v3.useRef;
local l_useSelector_0 = v4.Hooks.RoactRodux.useSelector;
local v20 = require(l_Parent_0.Flags.FFlagMakeEntrypointButtonDraggable);
local l_GetFFlagEnableScreenshotUtility_0 = require(l_Parent_1.SharedFlags).GetFFlagEnableScreenshotUtility;
return function(_)
    local v23 = v14();
    local v24 = l_useDispatch_0();
    local v25 = l_useStyle_0();
    local v27 = l_useSelector_0(function(v26)
        return v26.Screenshots.IsActive;
    end);
    local v28 = l_GetFFlagEnableScreenshotUtility_0() and v3.useContext(v12).chromeEnabled;
    local v29 = l_useRef_0(nil);
    local v30 = l_useRef_0(nil);
    local v31 = l_useRef_0(false);
    local v32 = l_useRef_0(v10());
    local v33 = l_useRef_0(nil);
    local v34 = l_useCallback_0(function()
        if not v33.current then
            v33.current = DateTime.now().UnixTimestampMillis;
        end;
    end, {});
    local v35 = l_useCallback_0(function()
        v23.fireEvent(v11.CapturesEntrypointActivated);
        if v32.current then
            v32.current:Play();
        end;
        v24(v13());
    end, {});
    if v20 then
        l_useExternalEvent_0(l_UserInputService_0.TouchMoved, function(v36, _)
            if not (v29.current or not v33.current) and DateTime.now().UnixTimestampMillis - v33.current >= 100 then
                v31.current = true;
                v29.current = v36;
            end;
            if not ((not (v36 == v29.current) or not v31.current) or not v30.current) then
                v30.current.Position = UDim2.fromOffset(v36.Position.X + 24, v36.Position.Y + 24);
            end;
        end);
        l_useExternalEvent_0(l_UserInputService_0.TouchEnded, function(v38, _)
            if not v33.current or not v31.current then
                if v33.current then
                    v35();
                end;
            else
                v23.fireEvent(v11.CapturesEntrypointDragged);
            end;
            if v38 == v29.current then
                v29.current = nil;
            end;
            v31.current = false;
            v33.current = nil;
        end);
    end;
    l_useEffect_0(function()
        if v27 then
            v23.fireEvent(v11.CapturesEntrypointViewed);
        end;
        if not v32.current then
            v32.current = v10();
        end;
        return function()
            if v32.current then
                v32.current:Stop();
                v32.current:Destroy();
                v32.current = nil;
            end;
        end;
    end, {
        v27
    });
    return v3.createElement("Frame", {
        Active = false,
        AnchorPoint = Vector2.new(0.5, 0.5),
        BackgroundTransparency = 1,
        Position = UDim2.new(1, -50, 0.5, 0),
        Size = UDim2.fromOffset(48, 48),
        Visible = v27 and not v28,
        ref = if not v20 then nil else v30
    }, {
        CameraButton = v3.createElement("ImageButton", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = v25.Theme.Overlay.Transparency * v25.Theme.Overlay.Transparency,
            BackgroundColor3 = v25.Theme.Overlay.Color,
            [v3.Event.Activated] = if v20 then nil else v35,
            [v3.Event.InputBegan] = if not v20 then nil else v34
        }, {
            Border = v3.createElement("UIStroke", {
                Color = v25.Theme.Overlay.Color,
                Transparency = v25.Theme.Overlay.Transparency,
                Thickness = 2
            }),
            Corner = v3.createElement("UICorner", {
                CornerRadius = UDim.new(0.5, 0)
            }),
            CameraIcon = v3.createElement(l_ImageSetLabel_0, {
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Position = UDim2.fromScale(0.5, 0.5),
                Size = UDim2.fromOffset(36, 36),
                Image = l_Images_0["icons/controls/screenshot"]
            })
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Dash);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RoactUtils);
local v5 = require(l_Parent_1.RobloxAppHooks);
local v6 = require(l_Parent_1.UIBlox);
local l_useEffectOnce_0 = v4.Hooks.useEffectOnce;
local l_useScreenSize_0 = v5.useScreenSize;
local l_GridView_0 = v6.App.Grid.GridView;
local v10 = require(l_Parent_0.Components.GalleryActionContainer);
local v11 = require(l_Parent_0.Components.GalleryItem);
local v12 = require(l_Parent_0.Components.ShowMoreButton);
local _ = require(l_Parent_0.Types);
local v14 = require(l_Parent_0.Flags.FFlagCapturesRemoveOldMenuTheme);
local v15 = require(l_Parent_0.Flags.FFlagCaptureStorageBulkManagementEnabled);
local v16 = not v14 and 12 or 1;
local v17 = if not v14 then v16 + 4 else v16 + 8;
local function _(v18)
    return (math.clamp(math.floor(v18 / 120), 1, 4));
end;
local function _(v20, v21)
    local v22 = math.clamp(math.floor(v21 / 120), 1, 4);
    v21 = v21 - 4 * (v22 - 1);
    local v23 = math.min(v21 / v22, v21);
    return Vector2.new(math.floor(v23), (math.floor(v23 * v20)));
end;
local function _(v25, v26, v27)
    if v25 <= 0 then
        return 0;
    else
        local v28 = math.floor(v25 / v27.Y);
        if v25 < v27.Y * v28 + 4 * (v28 - 1) then
            v28 = v28 - 1;
        end;
        return (math.max(v28 * math.clamp(math.floor(v26 / 120), 1, 4), 8));
    end;
end;
local function v32(v30, v31)
    return v3.createElement(v11, {
        capture = v30,
        captureIndex = v31
    });
end;
return function(v33)
    local v34, v35 = v3.useState(Vector2.new(0, 0));
    local v36, v37 = v3.useState(0);
    local v38 = l_useScreenSize_0();
    local v39 = v36 < #v33.captures;
    local v40 = false;
    if v34.X > 0 then
        v40 = v34.Y > 0;
    end;
    local v42 = v3.useCallback(function(v41)
        v35(v41.AbsoluteSize);
    end, {});
    local v43 = math.clamp(v38.Y / v38.X, 0.42857142857142855, 1);
    local v44 = (v34.Y - 12) - 40;
    if v14 then
        v44 = v44 - 36;
    end;
    local l_X_0 = v34.X;
    local l_v43_0 = v43;
    local l_l_X_0_0 = l_X_0;
    local v48 = math.clamp(math.floor(l_l_X_0_0 / 120), 1, 4);
    l_l_X_0_0 = l_l_X_0_0 - 4 * (v48 - 1);
    local v49 = math.min(l_l_X_0_0 / v48, l_l_X_0_0);
    local v50 = Vector2.new(math.floor(v49), (math.floor(v49 * l_v43_0)));
    l_l_X_0_0 = v44;
    v48 = l_X_0;
    v49 = v50;
    if l_l_X_0_0 <= 0 then
        l_v43_0 = 0;
    else
        local v51 = math.floor(l_l_X_0_0 / v49.Y);
        if l_l_X_0_0 < v49.Y * v51 + 4 * (v51 - 1) then
            v51 = v51 - 1;
        end;
        l_v43_0 = math.max(v51 * math.clamp(math.floor(v48 / 120), 1, 4), 8);
    end;
    if l_v43_0 < v36 then
        l_X_0 = l_X_0 - v17;
        v48 = v43;
        v49 = l_X_0;
        local v52 = math.clamp(math.floor(v49 / 120), 1, 4);
        v49 = v49 - 4 * (v52 - 1);
        local v53 = math.min(v49 / v52, v49);
        v50 = Vector2.new(math.floor(v53), (math.floor(v53 * v48)));
        v48 = v44;
        v49 = l_X_0;
        v52 = v50;
        if v48 <= 0 then
            l_v43_0 = 0;
        else
            v53 = math.floor(v48 / v52.Y);
            if v48 < v52.Y * v53 + 4 * (v53 - 1) then
                v53 = v53 - 1;
            end;
            l_v43_0 = math.max(v53 * math.clamp(math.floor(v49 / 120), 1, 4), 8);
        end;
    end;
    l_useEffectOnce_0(function()
        v37(l_v43_0);
    end, l_v43_0 ~= 0);
    v3.useEffect(function()
        if v36 < l_v43_0 then
            v37(l_v43_0);
        end;
    end, {
        v34
    });
    return v3.createElement("Frame", {
        BackgroundTransparency = 1,
        LayoutOrder = v33.LayoutOrder,
        Size = v33.Size or UDim2.fromScale(1, 1),
        [v3.Change.AbsoluteSize] = v42
    }, {
        UIListLayout = if not v15 then nil else v3.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }),
        GalleryActionContainer = if not v15 then nil else v3.createElement(v10, {
            isDisabled = false,
            itemCount = #v33.captures,
            LayoutOrder = 1
        }),
        ScrollingFrame = v3.createElement("ScrollingFrame", {
            AutomaticCanvasSize = Enum.AutomaticSize.Y,
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            CanvasSize = UDim2.fromScale(1, 0),
            LayoutOrder = 2,
            ScrollBarThickness = v16,
            ScrollingDirection = Enum.ScrollingDirection.Y,
            Size = if not v15 then UDim2.fromScale(1, 1) else UDim2.new(1, 0, 1, -36)
        }, {
            UIListLayout = v3.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                Padding = UDim.new(0, 12)
            }),
            GridView = v40 and v3.createElement(l_GridView_0, {
                itemPadding = Vector2.new(4, 4),
                items = v3.useMemo(function()
                    return v2.slice(v33.captures, 1, (math.min(#v33.captures, v36)));
                end, {
                    v33.captures,
                    v36
                }),
                itemSize = v50,
                LayoutOrder = 1,
                renderItem = v32
            }),
            ShowMoreButton = v39 and v3.createElement(v12, {
                LayoutOrder = 2,
                buttonHeight = 40,
                onActivated = v3.useCallback(function()
                    v37(v36 + l_v43_0);
                end, {
                    v36,
                    l_v43_0
                })
            })
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.React);
local l_useDispatch_0 = require(l_Parent_1.RoactUtils).Hooks.RoactRodux.useDispatch;
local v4 = require(l_Parent_0.Enums.CaptureType);
local v5 = require(l_Parent_0.Actions.CarouselOpened);
local v6 = require(l_Parent_0.Analytics.EventNames);
local _ = require(l_Parent_0.Types);
local v8 = require(l_Parent_0.Analytics.useAnalytics);
return function(v9)
    local v10 = v8();
    local v11 = l_useDispatch_0();
    local v12, v13 = v2.useState(UDim2.fromScale(1, 1));
    return v2.createElement("ImageButton", {
        BackgroundTransparency = 1,
        ClipsDescendants = true,
        Image = if v9.capture.type == v4.Screenshot then v9.capture.contentId else nil,
        ScaleType = Enum.ScaleType.Crop,
        Size = UDim2.fromScale(1, 1),
        [v2.Event.Activated] = v2.useCallback(function()
            v10.fireEvent(v6.CapturesCarouselOpened);
            v11(v5(v9.captureIndex));
        end, {})
    }, {
        VideoPreview = if v9.capture.type == v4.Video then v2.createElement("VideoFrame", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            Playing = false,
            Position = UDim2.fromScale(0.5, 0.5),
            Size = v12,
            Video = v9.capture.contentId,
            [v2.Event.Loaded] = v2.useCallback(function(v14)
                local l_Resolution_0 = v14.Resolution;
                v13(UDim2.fromOffset(l_Resolution_0.X, l_Resolution_0.Y));
            end, {})
        }) else nil
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.AppCommonLib);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.SocialCommon);
local v5 = require(l_Parent_1.UIBlox);
local l_Button_0 = v5.App.Button.Button;
local l_ButtonType_0 = v5.App.Button.Enum.ButtonType;
local l_Images_0 = v5.App.ImageSet.Images;
local l_ImageSetLabel_0 = v5.Core.ImageSet.ImageSetLabel;
local l_Text_0 = v2.Text;
local l_useIsHovered_0 = v4.Hooks.useIsHovered;
local l_useStyle_0 = v5.Core.Style.useStyle;
local v13 = require(l_Parent_0.Context.ShotsContext);
local v14 = require(l_Parent_0.Flags.FFlagCapturesRemoveOldMenuTheme);
local v15 = Color3.fromHex("#4F545F");
local v16 = Color3.fromHex("#5CB2F8");
local v17 = Color3.fromRGB(255, 255, 255);
local v18 = {
    IMAGE = l_Images_0["component_assets/dropshadow_17_4"],
    SLICE_CENTER = Rect.new(12, 12, 13, 13),
    OFFSET = {
        BOTTOM = 6,
        LEFT = 4,
        RIGHT = 4,
        TOP = 2
    }
};
return function(v19)
    local v20 = l_useStyle_0();
    local l_themeOverrides_0 = v3.useContext(v13).themeOverrides;
    local v22, v23, v24 = l_useIsHovered_0();
    local l_Color_0 = v20.Theme.SystemPrimaryDefault.Color;
    local l_Transparency_0 = v20.Theme.SystemPrimaryDefault.Transparency;
    if v22 then
        l_Color_0 = v20.Theme.SystemPrimaryOnHover.Color;
        l_Transparency_0 = v20.Theme.SystemPrimaryOnHover.Transparency;
    end;
    local l_Color_1 = v20.Theme.TextEmphasis.Color;
    local l_Font_0 = v20.Font.Header2.Font;
    local v29 = v20.Font.BaseSize * v20.Font.Header2.RelativeSize;
    if not (v14 or not l_themeOverrides_0) then
        l_Color_0 = l_themeOverrides_0.color("DefaultButton", v15);
        l_Transparency_0 = l_themeOverrides_0.transparency("DefaultButton", 0);
        if v22 then
            l_Color_0 = l_themeOverrides_0.color("DefaultButtonHover", v16);
            l_Transparency_0 = l_themeOverrides_0.transparency("DefaultButtonHover", 0);
        end;
        l_Color_1 = l_themeOverrides_0.color("TextEmphasis", v17);
        l_Font_0 = l_themeOverrides_0.font(l_Font_0, "UtilityText");
        v29 = l_themeOverrides_0.textSize(24, "UtilityText");
    end;
    local v30 = v3.useMemo(function()
        if not v19.buttonWidth then
            return l_Text_0.GetTextWidth(v19.text, l_Font_0, v29) + 24;
        else
            return v19.buttonWidth;
        end;
    end, {
        v19.text,
        l_Font_0,
        v29,
        v19.buttonWidth
    });
    return v3.createElement("Frame", {
        AnchorPoint = v19.AnchorPoint,
        BackgroundTransparency = 1,
        LayoutOrder = v19.LayoutOrder,
        Position = v19.Position,
        Size = if not v19.buttonHeight then UDim2.new(0, v30, 1, 0) else UDim2.fromOffset(v30, v19.buttonHeight)
    }, {
        DropShadow = if v14 then nil else v3.createElement(l_ImageSetLabel_0, {
            BackgroundTransparency = 1,
            Image = v18.IMAGE,
            ImageColor3 = v20.Theme.DropShadow.Color,
            ImageTransparency = v20.Theme.DropShadow.Transparency,
            Position = UDim2.new(0, -v18.OFFSET.LEFT, 0, -v18.OFFSET.TOP),
            ScaleType = Enum.ScaleType.Slice,
            Size = UDim2.new(1, v18.OFFSET.LEFT + v18.OFFSET.RIGHT, 1, v18.OFFSET.TOP + v18.OFFSET.BOTTOM),
            SliceCenter = v18.SLICE_CENTER,
            ZIndex = 1
        }),
        ShowMoreButton = if v14 then v3.createElement(l_Button_0, {
            buttonType = l_ButtonType_0.Secondary,
            onActivated = v19.onActivated,
            size = UDim2.fromScale(1, 1),
            text = v19.text
        }) else v3.createElement("TextButton", {
            AutoButtonColor = false,
            BackgroundColor3 = l_Color_0,
            BackgroundTransparency = l_Transparency_0,
            BorderSizePixel = 0,
            Font = l_Font_0,
            Size = UDim2.fromScale(1, 1),
            Text = v19.text,
            TextColor3 = l_Color_1,
            TextSize = v29,
            ZIndex = 2,
            [v3.Event.Activated] = v19.onActivated,
            [v3.Event.InputBegan] = v23,
            [v3.Event.InputEnded] = v24
        }, {
            UICorner = v3.createElement("UICorner", {
                CornerRadius = UDim.new(0, 4)
            })
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Localization);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RoactUtils);
local l_SegmentedControl_0 = require(l_Parent_1.UIBlox).App.Control.SegmentedControl;
local l_useDispatch_0 = v4.Hooks.RoactRodux.useDispatch;
local l_useLocalization_0 = v2.Hooks.useLocalization;
local l_useSelector_0 = v4.Hooks.RoactRodux.useSelector;
local v9 = require(l_Parent_0.Analytics.EventNames);
local v10 = require(l_Parent_0.Actions.ShotsActivated);
local v11 = require(l_Parent_0.Actions.ShotsDeactivated);
local v12 = require(l_Parent_0.Enums.ShotsToastType);
local v13 = require(l_Parent_0.Actions.ToastDismissed);
local v14 = require(l_Parent_0.Actions.ToastTriggered);
local v15 = require(l_Parent_0.Analytics.useAnalytics);
return function(v16)
    local v17 = v15();
    local v18 = l_useDispatch_0();
    local v20 = l_useSelector_0(function(v19)
        return v19.Screenshots.IsCapturesCoreGuiEnabled;
    end);
    local v22 = l_useSelector_0(function(v21)
        return v21.Screenshots.IsActive;
    end);
    local v23 = l_useLocalization_0({
        offText = "Feature.Captures.Control.Off",
        onText = "Feature.Captures.Control.On"
    });
    return v3.createElement("Frame", {
        AnchorPoint = Vector2.new(0.5, 0.5),
        BackgroundTransparency = 1,
        Position = UDim2.fromScale(0.5, 0.5),
        Size = UDim2.fromOffset(v16.width, v16.height)
    }, {
        Control = v3.createElement(l_SegmentedControl_0, {
            height = v16.height,
            onTabActivated = v3.useCallback(function(v24)
                if not (v24 == 1) or v22 then
                    if v22 then
                        v17.fireEvent(v9.CapturesDeactivatedInGameMenu);
                        v18(v11());
                        v18(v13());
                    end;
                    return ;
                else
                    v17.fireEvent(v9.CapturesActivatedInGameMenu);
                    v18(v10());
                    v18(v14(v12.ShotsActivated));
                    return ;
                end;
            end, {
                v22
            }),
            selectedTabIndex = not v22 and 2 or 1,
            tabs = {
                {
                    tabName = v23.onText,
                    isDisabled = not v20
                },
                {
                    tabName = v23.offText,
                    isDisabled = not v20
                }
            },
            width = UDim.new(0, v16.width)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Localization);
local l_default_0 = require(l_Parent_1.PermissionsProtocol).PermissionsProtocol.default;
local v4 = require(l_Parent_1.React);
local v5 = require(l_Parent_1.RobloxAppHooks);
local v6 = require(l_Parent_1.UIBlox);
local l_useCallback_0 = v4.useCallback;
local l_useLocalization_0 = v2.Hooks.useLocalization;
local l_useScreenSize_0 = v5.useScreenSize;
local l_useStyle_0 = v6.Core.Style.useStyle;
local v11 = require(l_Parent_0.Analytics.EventNames);
local v12 = require(l_Parent_0.Analytics.useAnalytics);
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
return function(v15)
    local v16 = l_useScreenSize_0();
    local v17 = l_useStyle_0();
    local v18 = v12();
    local v19 = l_useLocalization_0({
        alertBody = "Feature.Captures.Description.AllowPhotoAccessInfo",
        alertTitle = "Feature.Captures.Title.AllowPhotoAccessInfo",
        accessDeniedCTA = "Feature.Captures.Action.AllowPhotoAccessDeclined",
        accessAllowedCTA = "Feature.Captures.Action.AllowPhotoAccessAccepted"
    });
    local l_Theme_0 = v17.Theme;
    return v4.createElement("Frame", {
        Active = true,
        BackgroundColor3 = l_Theme_0.Overlay.Color,
        BackgroundTransparency = l_Theme_0.Overlay.Transparency,
        Size = UDim2.new(1, 0, 1, 0),
        Visible = v15.visible,
        ZIndex = v15.zIndex
    }, {
        Alert = v4.createElement(l_InteractiveAlert_0, {
            bodyText = v19.alertBody,
            buttonStackInfo = {
                buttons = {
                    {
                        buttonType = l_ButtonType_0.Secondary,
                        props = {
                            onActivated = l_useCallback_0(function()
                                v18.fireEvent(v11.CapturesSavePermissionModalCancelPressed);
                                v15.closeModal();
                            end, {
                                v15.closeModal
                            }),
                            text = v19.accessDeniedCTA
                        }
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            onActivated = l_useCallback_0(function()
                                l_default_0:requestPermissions({
                                    l_default_0.Permissions.WRITE_MEDIA_STORAGE
                                });
                                v18.fireEvent(v11.CapturesSavePermissionModalAllowPressed);
                                v15.closeModal();
                            end, {
                                v15.closeModal
                            }),
                            text = v19.accessAllowedCTA
                        }
                    }
                }
            },
            isMiddleContentFocusable = false,
            position = UDim2.fromScale(0.5, 0.5),
            screenSize = v16,
            title = v19.alertTitle
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Localization);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RoactUtils);
local v5 = require(l_Parent_1.RobloxAppHooks);
local v6 = require(l_Parent_1.UIBlox);
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local v9 = require(l_Parent_0.Analytics.useAnalytics);
local l_useDispatch_0 = v4.Hooks.RoactRodux.useDispatch;
local l_useLocalization_0 = v2.Hooks.useLocalization;
local l_useScreenSize_0 = v5.useScreenSize;
local v13 = require(l_Parent_0.Analytics.EventNames);
local v14 = require(l_Parent_0.Utils.getCaptureSize);
local v15 = require(l_Parent_0.Thunks.ShareCapturePromptFinished);
local _ = require(l_Parent_0.Types);
return function(v17)
    local v18 = v9();
    local v19 = l_useDispatch_0();
    local v20 = l_useScreenSize_0();
    local v21, v22 = v3.useState(Vector2.new(0, 0));
    local v23, v24 = v3.useState(Vector2.new(200, 200));
    local v25, v26 = v3.useState(Vector2.new(0, 0));
    local l_contentId_0 = v17.promptData.contentId;
    local v28 = not (v17.enableInputDelayed ~= nil) or v17.enableInputDelayed;
    local v29 = l_useLocalization_0({
        bodyText = "Feature.Captures.Body.ShareCapturePrompt",
        no = "Feature.Captures.Action.NoThanks",
        title = "Feature.Captures.Title.ShareCapturePrompt",
        yes = "Feature.Captures.Action.Share"
    });
    v3.useEffect(function()
        v18.fireEvent(v13.ShareCapturePromptViewed);
        task.spawn(function()
            local v30 = v14(l_contentId_0);
            if v30 then
                v24(v30);
            end;
        end);
    end, {
        l_contentId_0
    });
    local v32 = v3.useCallback(function(v31)
        v22(v31.AbsoluteSize);
    end, {
        v22
    });
    local v34 = v3.useCallback(function(v33)
        v26(v33.AbsoluteSize);
    end, {
        v26
    });
    local v35 = v3.useCallback(function()
        v18.fireEvent(v13.ShareCapturePromptAccepted);
        v19(v15(v17.promptId, v17.promptData, true));
    end, {
        v17.promptData,
        v17.promptId
    });
    local v36 = v3.useCallback(function()
        v18.fireEvent(v13.ShareCapturePromptRejected);
        v19(v15(v17.promptId, v17.promptData, false));
    end, {
        v17.promptData,
        v17.promptId
    });
    return v3.createElement(l_InteractiveAlert_0, {
        bodyText = v29.bodyText,
        buttonStackInfo = v3.useMemo(function()
            return {
                buttons = {
                    {
                        props = {
                            onActivated = v36,
                            text = v29.no
                        },
                        isDefaultChild = true
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            delayInputSeconds = 2,
                            enableInputDelayed = v28,
                            isDelayedInput = v28,
                            onActivated = v35,
                            text = v29.yes
                        },
                        isDefaultChild = false
                    }
                }
            };
        end, {
            v29,
            v35,
            v36
        }),
        isMiddleContentFocusable = false,
        middleContent = v3.useCallback(function()
            local v37 = (v20.Y - 80) - (v21.Y - v25.Y);
            local v38 = v25.X / (v23.X / v23.Y);
            if v38 < v37 then
                v37 = v38;
            end;
            return v3.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, v37),
                [v3.Change.AbsoluteSize] = v34
            }, {
                CaptureImage = v3.createElement("ImageLabel", {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    BackgroundTransparency = 1,
                    Image = l_contentId_0,
                    Position = UDim2.fromScale(0.5, 0.5),
                    ScaleType = Enum.ScaleType.Fit,
                    Size = UDim2.fromScale(1, 1)
                })
            });
        end, {
            v21,
            v25,
            l_contentId_0,
            v23
        }),
        onAbsoluteSizeChanged = v32,
        position = UDim2.fromScale(0.5, 0.5),
        screenSize = v20,
        title = v29.title
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.React);
local v3 = require(l_Parent_1.RoactUtils);
local v4 = require(l_Parent_0.Constants);
local v5 = require(l_Parent_0.Components.EntrypointButton);
local v6 = require(l_Parent_0.Components.ToastContainer);
local l_useSelector_0 = v3.Hooks.RoactRodux.useSelector;
return function(_)
    return v2.createElement(v2.Fragment, {}, {
        EntrypointButtonFrame = if not l_useSelector_0(function(v9)
            return v9.Screenshots.IsCapturesCoreGuiEnabled;
        end) then nil else v2.createElement("Frame", {
            Active = false,
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1),
            ZIndex = v4.ZIndex.Entrypoint
        }, {
            EntrypointButtonContainer = v2.createElement(v5)
        }),
        ToastsFrame = if l_useSelector_0(function(v10)
            return v10.Screenshots.Carousel.IsOpen;
        end) then nil else v2.createElement("Frame", {
            Active = false,
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1),
            ZIndex = v4.ZIndex.Toasts
        }, {
            ToastContainer = v2.createElement(v6)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Localization);
local v3 = require(l_Parent_1.React);
local v4 = require(l_Parent_1.RoactUtils);
local v5 = require(l_Parent_1.UIBlox);
local l_useLocalization_0 = v2.Hooks.useLocalization;
local l_useSelector_0 = v4.Hooks.RoactRodux.useSelector;
local l_useStyle_0 = v5.Core.Style.useStyle;
local v9 = require(l_Parent_0.Components.GalleryGridView);
local v10 = require(l_Parent_0.Context.ShotsContext);
local v11 = require(l_Parent_0.Flags.FFlagCapturesRemoveOldMenuTheme);
local v12 = require(l_Parent_0.Flags.FFlagCaptureStorageBulkManagementEnabled);
local v13 = Color3.fromRGB(255, 255, 255);
local v14 = Color3.fromRGB(255, 255, 255);
return function(v15)
    local v16 = l_useStyle_0();
    local l_themeOverrides_0 = v3.useContext(v10).themeOverrides;
    local v19 = l_useSelector_0(function(v18)
        return v18.Screenshots.Captures;
    end);
    local v20 = next(v19) == nil;
    local v21 = l_useLocalization_0({
        nothingHereYet = "Feature.Captures.Label.NothingHereYet",
        title = "Feature.Captures.Title.Gallery"
    });
    local v22 = v15.Size or UDim2.fromScale(1, 1);
    local l_Color_0 = v16.Theme.BackgroundDefault.Color;
    local l_Transparency_0 = v16.Theme.BackgroundDefault.Transparency;
    local l_Color_1 = v16.Theme.TextMuted.Color;
    local l_Font_0 = v16.Font.CaptionBody.Font;
    local v27 = v16.Font.BaseSize * v16.Font.CaptionBody.RelativeSize;
    local l_Transparency_1 = v16.Theme.TextMuted.Transparency;
    if not (v11 or not l_themeOverrides_0) then
        l_Color_0 = l_themeOverrides_0.color("RowFrameBackground", v13);
        l_Transparency_0 = l_themeOverrides_0.transparency("RowFrameBackground", 0.85);
        l_Color_1 = l_themeOverrides_0.color("TextDefault", v14);
        l_Font_0 = l_themeOverrides_0.font(l_Font_0, "HelpText");
        v27 = l_themeOverrides_0.textSize(20, "HelpText");
        l_Transparency_1 = l_themeOverrides_0.transparency("TextDefault", 0.3);
    end;
    return v3.createElement("Frame", {
        BackgroundColor3 = l_Color_0,
        BackgroundTransparency = l_Transparency_0,
        BorderSizePixel = 0,
        LayoutOrder = v15.LayoutOrder,
        Size = v22
    }, {
        UICorner = v3.createElement("UICorner", {
            CornerRadius = if not l_themeOverrides_0 then UDim.new(0, 8) else l_themeOverrides_0.DefaultCornerRadius
        }),
        UIPadding = if v12 then nil else v3.createElement("UIPadding", {
            PaddingTop = UDim.new(0, 12)
        }),
        Layout = v3.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = UDim.new(0, 12),
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }),
        NothingHereYet = v20 and v3.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = l_Font_0,
            Size = UDim2.new(1, -12, 1, 12),
            Text = v21.nothingHereYet,
            TextColor3 = l_Color_1,
            TextSize = v27,
            TextTransparency = l_Transparency_1,
            TextWrapped = true,
            TextXAlignment = Enum.TextXAlignment.Center
        }, {
            MaxSize = v3.createElement("UISizeConstraint", {
                MaxSize = Vector2.new(312, math.huge)
            })
        }),
        GalleryGridView = not v20 and v3.createElement(v9, {
            captures = v19,
            Size = UDim2.new(1, -12, 1, -12)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Localization);
local v3 = require(l_Parent_1.React);
local l_useLocalization_0 = v2.Hooks.useLocalization;
local v5 = require(l_Parent_0.Analytics.EventNames);
local v6 = require(l_Parent_0.Components.MenuButton);
local v7 = require(l_Parent_0.Analytics.useAnalytics);
return function(v8)
    local v9 = v7();
    return v3.createElement(v6, {
        buttonHeight = v8.buttonHeight,
        LayoutOrder = v8.LayoutOrder,
        onActivated = v3.useCallback(function()
            v9.fireEvent(v5.CapturesShowMoreInGameMenu);
            v8.onActivated();
        end, {
            v8.onActivated
        }),
        text = l_useLocalization_0({
            showMore = "Feature.Avatar.Action.ShowMore"
        }).showMore
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_Parent_1.Dash);
local v4 = require(l_Parent_1.Localization);
local v5 = require(l_Parent_1.React);
local v6 = require(l_Parent_1.RoactUtils);
local v7 = require(l_Parent_1.UIBlox);
local l_Images_0 = v7.App.ImageSet.Images;
local l_Toast_0 = v7.App.Dialog.Toast;
local v10 = require(l_Parent_0.Analytics.useAnalytics);
local l_useDispatch_0 = v6.Hooks.RoactRodux.useDispatch;
local l_useLocalization_0 = v4.Hooks.useLocalization;
local l_useSelector_0 = v6.Hooks.RoactRodux.useSelector;
local v14 = require(l_Parent_0.Actions.CarouselOpened);
local v15 = require(l_Parent_0.Constants);
local v16 = require(l_Parent_0.Analytics.EventNames);
local v17 = require(l_Parent_0.Thunks.ShareCapture);
local v18 = require(l_Parent_0.Enums.ShotsToastType);
local v19 = require(l_Parent_0.Actions.ToastVanished);
local _ = require(l_Parent_0.Types);
local v21 = require(l_Parent_0.Flags.FFlagDecomposeDesktopCapturesEligibilityCheck);
local v22 = {
    captureSaved = "captureSaved",
    captureSavedToDevice = "captureSavedToDevice",
    capturesEnabled = "capturesEnabled",
    openInFiles = "openInFiles",
    shareAction = "shareAction",
    shareCaptureDescription = "shareCaptureDescription",
    viewAction = "viewAction"
};
local v23 = true;
if l_UserInputService_0:GetPlatform() ~= Enum.Platform.Windows then
    v23 = l_UserInputService_0:GetPlatform() == Enum.Platform.OSX;
end;
local v31 = {
    [v18.CaptureSavedToDeviceWithOpenCTA] = {
        iconImage = l_Images_0["icons/status/success"],
        onActivated = function(v24)
            v24.fireEvent(v16.CapturesSavedToDeviceToastOpenButtonActivated);
            game:OpenScreenshotsFolder();
        end,
        toastCTAKey = v22.openInFiles,
        toastTitleKey = v22.captureSavedToDevice
    },
    [v18.CaptureSavedToDevice] = {
        iconImage = l_Images_0["icons/status/success"],
        onActivated = (not not v21 and v23) and function(v25)
            v25.fireEvent(v16.CapturesSavedToDeviceToastOpenButtonActivated);
            game:OpenScreenshotsFolder();
        end or nil,
        toastCTAKey = if not not v21 and v23 then v22.openInFiles else nil,
        toastTitleKey = v22.captureSavedToDevice
    },
    [v18.ShotsActivated] = {
        iconImage = l_Images_0["icons/status/success"],
        toastTitleKey = v22.capturesEnabled
    },
    [v18.ShotsCaptureTaken] = {
        iconImage = l_Images_0["icons/controls/screenshot"],
        onActivated = function(v26, v27, v28)
            v26.fireEvent(v16.CapturesShareToastButtonActivated);
            if not (not v28 or not v28.captureInfo) then
                v27(v17(v28.captureInfo));
            end;
        end,
        toastCTAKey = v22.shareAction,
        toastSubtitleKey = v22.shareCaptureDescription,
        toastTitleKey = v22.captureSaved
    },
    [v18.ViewCapture] = {
        iconImage = l_Images_0["icons/controls/screenshot"],
        onActivated = function(v29, v30)
            v29.fireEvent(v16.CapturesViewToastButtonActivated);
            v30(v14(1));
        end,
        toastCTAKey = v22.viewAction,
        toastTitleKey = v22.captureSaved
    }
};
return function(_)
    local v33 = v10();
    local v34 = l_useDispatch_0();
    local v35 = l_useLocalization_0({
        [v22.captureSaved] = "Feature.Captures.Toast.CaptureSaved",
        [v22.captureSavedToDevice] = "Feature.Captures.Toast.CaptureSavedToDevice",
        [v22.capturesEnabled] = "Feature.Captures.Toast.CapturesEnabled",
        [v22.openInFiles] = "Feature.Captures.Action.OpenInFiles",
        [v22.shareAction] = "Feature.Captures.Action.Share",
        [v22.shareCaptureDescription] = "Feature.Captures.Description.ShareCTA",
        [v22.viewAction] = "Feature.Captures.Action.ViewCapture"
    });
    local v37 = l_useSelector_0(function(v36)
        return v36.Screenshots.Toast.ToastType;
    end);
    local v39 = l_useSelector_0(function(v38)
        return v38.Screenshots.Toast.ToastConfig;
    end);
    local v41 = l_useSelector_0(function(v40)
        return v40.Screenshots.Toast.IsDismissed;
    end);
    local v42 = v5.useCallback(function()
        v34(v19());
    end);
    local v44 = v5.useCallback(function(v43)
        if not v43 then
            return nil;
        else
            return v35[v43];
        end;
    end);
    local v47 = v5.useMemo(function()
        if v37 == v18.None then
            return nil;
        else
            local v45 = v31[v37];
            local v46 = nil;
            if v45.onActivated then
                v46 = function()
                    v45.onActivated(v33, v34, v39);
                    v42();
                end;
            end;
            return v3.join(v45, {
                buttonText = v44(v45.toastCTAKey),
                onActivated = v46,
                onDismissed = v42,
                toastCTAKey = v3.None,
                toastSubtitle = v44(v45.toastSubtitleKey),
                toastSubtitleKey = v3.None,
                toastTitle = v44(v45.toastTitleKey),
                toastTitleKey = v3.None
            });
        end;
    end, {
        v37,
        v39
    });
    if v37 == v18.None then
        return nil;
    else
        return v5.createElement(l_Toast_0, {
            duration = v15.ToastDuration,
            show = not v41,
            toastContent = v47
        });
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_CoreGui_0 = game:GetService("CoreGui");
local v3 = require(l_Parent_1.Localization);
local v4 = require(l_Parent_1.React);
local v5 = require(l_Parent_1.UIBlox);
local v6 = require(l_Parent_0.Analytics.useAnalytics);
local l_useLocalization_0 = v3.Hooks.useLocalization;
local l_useStyle_0 = v5.Core.Style.useStyle;
local l_Button_0 = v5.App.Button.Button;
local l_ButtonType_0 = v5.App.Button.Enum.ButtonType;
local v11 = require(l_Parent_0.Analytics.EventNames);
local v12 = require(l_Parent_0.Context.ShotsContext);
local v13 = require(l_Parent_0.Flags.FFlagCapturesRemoveOldMenuTheme);
local v14 = Color3.fromRGB(255, 255, 255);
local v15 = Color3.fromRGB(255, 255, 255);
return function(v16)
    local v17 = v6();
    local v18 = l_useStyle_0();
    local l_themeOverrides_0 = v4.useContext(v12).themeOverrides;
    local v20 = l_useLocalization_0({
        videoCTATitle = "Feature.Captures.Title.VideoCTA",
        videoEducationalText = "Feature.Captures.Label.VideoEducationalText",
        startRecording = "Feature.Captures.Control.StartRecordingVideo",
        stopRecording = "Feature.Captures.Control.StopRecordingVideo"
    });
    local v21, v22 = v4.useState(false);
    v4.useEffect(function()
        local v23 = nil;
        local l_FirstChild_0 = settings():FindFirstChild("Game Options");
        if l_FirstChild_0 then
            v23 = l_FirstChild_0.VideoRecordingChangeRequest:connect(function(v25)
                v22(v25);
            end);
        end;
        return function()
            if v23 then
                v23:disconnect();
            end;
        end;
    end, {});
    local v26 = v4.useCallback(function()
        if v21 then
            v17.fireEvent(v11.CapturesMigratedLegacyVideoRecordDeactivated);
        else
            v16.closeSettingsMenu();
            v17.fireEvent(v11.CapturesMigratedLegacyVideoRecordActivated);
        end;
        l_CoreGui_0:ToggleRecording();
    end, {
        v17.fireEvent,
        v21,
        v16.closeSettingsMenu
    });
    local l_Color_0 = v18.Theme.BackgroundDefault.Color;
    local l_Transparency_0 = v18.Theme.BackgroundDefault.Transparency;
    local l_Color_1 = v18.Theme.TextDefault.Color;
    local l_Font_0 = v18.Font.CaptionBody.Font;
    local v31 = v18.Font.BaseSize * v18.Font.CaptionBody.RelativeSize;
    local l_Color_2 = v18.Theme.TextEmphasis.Color;
    local l_Font_1 = v18.Font.Header2.Font;
    local v34 = v18.Font.BaseSize * v18.Font.Header2.RelativeSize;
    if not (v13 or not l_themeOverrides_0) then
        l_Color_0 = l_themeOverrides_0.color("RowFrameBackground", v14);
        l_Transparency_0 = l_themeOverrides_0.transparency("RowFrameBackground", 0.85);
        l_Color_1 = l_themeOverrides_0.color("TextDefault", v15);
        l_Font_0 = l_themeOverrides_0.font(l_Font_0, "UtilityText");
        v31 = l_themeOverrides_0.textSize(16, "UtilityText");
        l_Color_2 = l_themeOverrides_0.color("TextEmphasis", v15);
        l_Font_1 = l_themeOverrides_0.font(l_Font_1, "Button");
        v34 = l_themeOverrides_0.textSize(24, "Button");
    end;
    return v4.createElement("Frame", {
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundColor3 = l_Color_0,
        BackgroundTransparency = l_Transparency_0,
        BorderSizePixel = 0,
        LayoutOrder = 3,
        Size = UDim2.fromScale(1, 0)
    }, {
        TextFrame = v4.createElement("Frame", {
            AutomaticSize = Enum.AutomaticSize.Y,
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(0.7, 0)
        }, {
            Layout = v4.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Top
            }),
            Title = v4.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Font = l_Font_1,
                LayoutOrder = 1,
                Size = UDim2.new(1, 0, 0, 30),
                Text = v20.videoCTATitle,
                TextColor3 = l_Color_2,
                TextSize = v34,
                TextXAlignment = Enum.TextXAlignment.Left
            }),
            EducationalLabel = v4.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Font = l_Font_0,
                LayoutOrder = 2,
                Size = UDim2.new(1, 0, 0, 40),
                Text = v20.videoEducationalText,
                TextColor3 = l_Color_1,
                TextSize = v31,
                TextWrapped = true,
                TextXAlignment = Enum.TextXAlignment.Left
            })
        }),
        CapturesToggleFrame = v4.createElement("Frame", {
            AnchorPoint = Vector2.new(1, 0.5),
            BackgroundTransparency = 1,
            Position = UDim2.fromScale(1, 0.5),
            Size = UDim2.fromOffset(224, 44)
        }, {
            RecordButton = v4.createElement(l_Button_0, {
                buttonType = l_ButtonType_0.Secondary,
                onActivated = v26,
                size = UDim2.fromScale(1, 1),
                text = if not v21 then v20.startRecording else v20.stopRecording
            })
        })
    });
end;


return {
    AnalyticsSource = "Captures",
    CapturesContext = "Captures",
    CarouselDirection = {
        Left = "Left",
        Right = "Right"
    },
    CarouselDisplayOrder = 7,
    DeleteWarningModalOptOutStorageKey = "CapturesDeleteModalOptOutUserIds",
    LastFlashOccurrenceTsLocalStorageKey = "LastFlashOccurrenceTimestampMs",
    LoggerKey = "Screenshots",
    OverlayName = "CaptureOverlay",
    OverlayDisplayOrder = 5,
    RoduxKey = "Screenshots",
    ScreenshotsActiveLocalStorageKey = "ScreenshotsFeatureActiveUserIds",
    ToastDuration = 2,
    ZIndex = {
        Entrypoint = 1,
        Toasts = 5
    }
};


local l_Parent_0 = script.Parent.Parent.Parent;
return require(l_Parent_0.React).createContext({
    fireAnalyticsEvent = require(l_Parent_0.Dash).noop,
    themeOverrides = nil,
    chromeEnabled = nil
});


return {
    SaveCaptures = "SaveCaptures",
    ShareCapture = "ShareCapture"
};


return {
    PrivateServer = "PrivateServer",
    ReservedServer = "ReservedServer",
    StandardServer = "StandardServer"
};


return {
    CaptureSavedToDeviceWithOpenCTA = "CaptureSavedToDeviceWithOpenCTA",
    CaptureSavedToDevice = "CaptureSavedToDevice",
    None = "None",
    ShotsActivated = "ShotsActivated",
    ShotsCaptureTaken = "ShotsCaptureTaken",
    ViewCapture = "ViewCapture"
};


return {
    PromptedSave = "PromptedSave",
    PromptedShare = "PromptedShare",
    UserSave = "UserSave"
};