local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_CorePackages_0.Roact);
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local v5 = require(l_CorePackages_0.UIBlox);
local l_CursorKind_0 = v5.App.SelectionImage.CursorKind;
local l_withSelectionCursorProvider_0 = v5.App.SelectionImage.withSelectionCursorProvider;
local l_Text_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Text;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_withStyle_0 = v5.Style.withStyle;
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.NewItemNotification);
local v12 = v3.PureComponent:extend("CategoryButton");
v12.renderWithLocalized = function(v13, v14)
    return l_withStyle_0(function(v15)
        local l_Font_0 = v15.Font;
        local l_Theme_0 = v15.Theme;
        local l_isSelected_0 = v13.props.isSelected;
        local l_Font_1 = l_Font_0.Header2.Font;
        local v20 = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize;
        local v21 = l_Text_0.GetTextWidth(v14.title, l_Font_1, v20);
        local v22 = not not l_isSelected_0 and l_Theme_0.TextEmphasis.Color or l_Theme_0.TextMuted.Color;
        local v23 = not not l_isSelected_0 and l_Theme_0.TextEmphasis.Transparency or l_Theme_0.TextMuted.Transparency;
        local v24 = v21 + 20;
        local l_hasNewItemNotification_0 = v13.props.hasNewItemNotification;
        local l_forwardRef_0 = v13.props.forwardRef;
        local l_frameRef_0 = v13.props.frameRef;
        return l_withSelectionCursorProvider_0(function(v28)
            return v3.createElement("Frame", {
                Size = UDim2.new(0, v24, 1, 0),
                BackgroundTransparency = 1,
                LayoutOrder = v13.props.layoutOrder,
                [v3.Ref] = l_frameRef_0
            }, {
                Button = v3.createElement(l_Focusable_0.TextButton, {
                    AnchorPoint = Vector2.new(0, 0.5),
                    Position = UDim2.new(0, 0, 0.5, 0),
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 1,
                    Text = v14.title,
                    TextSize = v20,
                    TextColor3 = v22,
                    TextTransparency = v23,
                    Font = l_Font_1,
                    [v3.Event.Activated] = function()
                        v13.props.onActivate(v13.props.categoryIndex);
                    end,
                    [v3.Ref] = l_forwardRef_0,
                    NextSelectionLeft = v13.props.NextSelectionLeft,
                    NextSelectionRight = v13.props.NextSelectionRight,
                    NextSelectionUp = v13.props.NextSelectionUp,
                    NextSelectionDown = v13.props.NextSelectionDown,
                    SelectionImageObject = v28(l_CursorKind_0.NavHighlight)
                }),
                NewItemNotification = l_hasNewItemNotification_0 and v3.createElement(v11, {
                    isSelected = l_isSelected_0
                })
            });
        end);
    end);
end;
v12.render = function(v29)
    return l_withLocalization_0({
        title = v29.props.categoryTitle
    })(function(v30)
        return v29:renderWithLocalized(v30);
    end);
end;
return v3.forwardRef(function(v31, v32)
    return v3.createElement(v12, v2.Dictionary.join(v31, {
        forwardRef = v32
    }));
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local l_useStyle_0 = require(l_CorePackages_0.UIBlox).Core.Style.useStyle;
return function(v3)
    local l_frameRef_0 = v3.frameRef;
    local l_gradientStyle_0 = v3.gradientStyle;
    local l_height_0 = v3.height;
    local l_ZIndex_0 = v3.ZIndex;
    local l_Theme_0 = l_useStyle_0().Theme;
    local v9 = not not l_gradientStyle_0 and l_gradientStyle_0.Color or l_Theme_0.BackgroundDefault.Color;
    local v10 = not not l_gradientStyle_0 and l_gradientStyle_0.Transparency or l_Theme_0.BackgroundDefault.Transparency;
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 1, 0),
        ZIndex = l_ZIndex_0,
        ref = l_frameRef_0
    }, {
        Left = v1.createElement("Frame", {
            BackgroundTransparency = v10,
            BackgroundColor3 = v9,
            Size = UDim2.new(0, 50, 0, l_height_0)
        }, {
            Gradient = v1.createElement("UIGradient", {
                Transparency = NumberSequence.new({
                    NumberSequenceKeypoint.new(0, 0),
                    NumberSequenceKeypoint.new(1, 1)
                })
            })
        }),
        Right = v1.createElement("Frame", {
            BackgroundTransparency = v10,
            BackgroundColor3 = v9,
            AnchorPoint = Vector2.new(1, 0),
            Position = UDim2.fromScale(1, 0),
            Size = UDim2.new(0, 50, 0, l_height_0)
        }, {
            Gradient = v1.createElement("UIGradient", {
                Transparency = NumberSequence.new({
                    NumberSequenceKeypoint.new(0, 1),
                    NumberSequenceKeypoint.new(1, 0)
                })
            })
        })
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v3.Focusable;
local v5 = require(l_CorePackages_0.UIBlox);
local v6 = require(l_CorePackages_0.Cryo);
local l_Images_0 = v5.App.ImageSet.Images;
local l_CursorKind_0 = v5.App.SelectionImage.CursorKind;
local l_ImageSetLabel_0 = v5.Core.ImageSet.ImageSetLabel;
local v10 = require(l_CorePackages_0.Packages.t);
local v11 = require(l_CorePackages_0.Otter);
local l_withSelectionCursorProvider_0 = v5.App.SelectionImage.withSelectionCursorProvider;
local l_Text_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Text;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_withStyle_0 = v5.Style.withStyle;
local v16 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.CategorySubButton);
local v18 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.NewItemNotification);
local l_NavInnerPadding_0 = v16.NavInnerPadding;
local l_NavCornerSize_0 = v16.NavCornerSize;
local l_NavSubButtonInnerPadding_0 = v16.NavSubButtonInnerPadding;
local l_NavButtonElementPadding_0 = v16.NavButtonElementPadding;
local l_NavButtonElementMargin_0 = v16.NavButtonElementMargin;
local v24 = {
    frequency = 3.0303030303030303,
    dampingRatio = 1
};
local v25 = v2.PureComponent:extend("IconCategoryButton");
v25.validateProps = v10.strictInterface({
    categoryTitle = v10.string,
    iconOn = v10.string,
    iconOff = v10.string,
    navHeight = v10.number,
    isSubNavigationButton = v10.boolean,
    layoutOrder = v10.number,
    isSelected = v10.boolean,
    hasNewItemNotification = v10.optional(v10.boolean),
    frameRef = v10.table,
    forwardRef = v10.table,
    onActivate = v10.callback,
    subButtons = v10.optional(v10.table),
    onSubButtonSelected = v10.optional(v10.callback),
    subcatIndex = v10.optional(v10.number),
    NextSelectionUp = v10.optional(v10.table),
    NextSelectionDown = v10.optional(v10.table),
    NextSelectionLeft = v10.optional(v10.table),
    NextSelectionRight = v10.optional(v10.table),
    inputBindings = v10.optional(v10.table)
});
v25.init = function(v26)
    local v27 = not v26.props.isSelected and 0 or 1;
    local v28, v29 = v2.createBinding(v27);
    v26.nonIconSizeMultiplierBinding = v28;
    v26.nonIconSizeMultiplierBindingUpdate = v29;
    v26.motor = v11.createSingleMotor(v27);
    v26.motor:onStep(v26.nonIconSizeMultiplierBindingUpdate);
    if v26.props.subButtons and #v26.props.subButtons > 0 then
        v26.subButtonRefs = v3.createRefCache();
    end;
end;
v25.didUpdate = function(v30, v31, _)
    if v30.props.isSelected ~= v31.isSelected then
        v30.motor:setGoal(v11.spring(not v30.props.isSelected and 0 or 1, v24));
    end;
end;
v25.willUnmount = function(v33)
    v33.motor:destroy();
end;
v25.getDefaultChild = function(v34)
    if v34.props.isSelected then
        if not (v34.props.subButtons ~= nil) or #v34.props.subButtons == 0 then
            return nil;
        else
            return v34.subButtonRefs[1];
        end;
    else
        return nil;
    end;
end;
v25.getSubButtonNextSelectionLeft = function(v35, v36)
    if v36 > 1 then
        return v35.subButtonRefs[v36 - 1];
    else
        return v35.props.NextSelectionLeft;
    end;
end;
v25.getSubButtonNextSelectionRight = function(v37, v38)
    if v38 < #v37.props.subButtons then
        return v37.subButtonRefs[v38 + 1];
    else
        return v37.props.NextSelectionRight;
    end;
end;
v25.getInnerFrameChildren = function(v39, v40, v41, v42, v43, v44, v45, v46, v47)
    local v48 = {};
    local v49 = {};
    local l_Theme_0 = v41.Theme;
    local l_isSelected_0 = v39.props.isSelected;
    local v52 = not not l_isSelected_0 and l_Theme_0.TextEmphasis.Color or l_Theme_0.TextMuted.Color;
    local v53 = not not l_isSelected_0 and l_Theme_0.TextEmphasis.Transparency or l_Theme_0.TextMuted.Transparency;
    local l_Font_0 = v41.Font.Header2.Font;
    v49.UIPadding = v2.createElement("UIPadding", {
        PaddingBottom = UDim.new(0, 0),
        PaddingTop = UDim.new(0, 0),
        PaddingLeft = UDim.new(0, l_NavButtonElementPadding_0),
        PaddingRight = UDim.new(0, 0)
    });
    v49.UIListLayout = v2.createElement("UIListLayout", {
        Padding = UDim.new(0, l_NavButtonElementPadding_0),
        SortOrder = Enum.SortOrder.LayoutOrder,
        FillDirection = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Center,
        VerticalAlignment = Enum.VerticalAlignment.Center
    });
    v49.TextLabel = v2.createElement("TextLabel", {
        Size = UDim2.new(0, v42, 1, 0),
        LayoutOrder = 1,
        BackgroundTransparency = 1,
        Text = v40.title,
        TextSize = v45,
        TextColor3 = v52,
        TextTransparency = v53,
        Font = l_Font_0,
        BorderSizePixel = 0
    });
    local l_subButtons_0 = v39.props.subButtons;
    if l_subButtons_0 then
        for v56, v57 in l_subButtons_0, nil, nil do
            v49[v57.Name] = v2.createElement(v17, {
                title = v40[v57.Name],
                width = v43[v56],
                layoutOrder = v56 + 1,
                index = v56,
                onSubButtonSelected = function(v58)
                    if not l_isSelected_0 then
                        v39.props.onActivate();
                    end;
                    v39.props.onSubButtonSelected(v58);
                end,
                parentButtonSelected = l_isSelected_0,
                isClippedWhenParentUnselected = true,
                buttonRef = v39.subButtonRefs[v56],
                NextSelectionLeft = v39:getSubButtonNextSelectionLeft(v56),
                NextSelectionRight = v39:getSubButtonNextSelectionRight(v56)
            });
        end;
    end;
    v48.UICorner = v2.createElement("UICorner", {
        CornerRadius = UDim.new(0, l_NavCornerSize_0)
    });
    v48.UIPadding = v2.createElement("UIPadding", {
        PaddingBottom = UDim.new(0, 0),
        PaddingTop = UDim.new(0, 0),
        PaddingLeft = UDim.new(0, l_NavButtonElementMargin_0),
        PaddingRight = UDim.new(0, l_NavButtonElementMargin_0)
    });
    v48.Icon = v2.createElement(l_ImageSetLabel_0, {
        LayoutOrder = 2,
        BackgroundTransparency = 1,
        Image = if not l_isSelected_0 then l_Images_0[v39.props.iconOff] else l_Images_0[v39.props.iconOn],
        ImageColor3 = l_Theme_0.IconEmphasis.Color,
        Size = UDim2.new(0, v44, 1, -v46),
        ScaleType = Enum.ScaleType.Fit,
        Position = UDim2.new(0, 0, 0, 0)
    });
    v48.ScaledFrame = v2.createElement("Frame", {
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        ClipsDescendants = true,
        Size = v39.nonIconSizeMultiplierBinding:map(function(v59)
            return UDim2.new(0, v59 * v47, 1, -v46);
        end),
        Position = UDim2.fromOffset(v44, 0)
    }, v49);
    return v48;
end;
v25.renderButtonWithTextAndIcon = function(v60, v61, v62, v63, v64, v65, v66, v67, v68)
    local l_Font_1 = v62.Font;
    local v70 = l_Font_1.BaseSize * l_Font_1.Header2.RelativeSize;
    local l_Theme_1 = v62.Theme;
    local l_forwardRef_0 = v60.props.forwardRef;
    local l_isSubNavigationButton_0 = v60.props.isSubNavigationButton;
    return v2.createElement(l_Focusable_0.ImageButton, {
        AnchorPoint = Vector2.new(0, 0),
        Position = UDim2.new(0, 0, 0, l_NavInnerPadding_0),
        Size = UDim2.new(1, 0, 1, -l_NavInnerPadding_0 + v64),
        BackgroundTransparency = if not l_isSubNavigationButton_0 then l_Theme_1.BackgroundDefault.Transparency else l_Theme_1.BackgroundUIDefault.Transparency,
        BackgroundColor3 = if not l_isSubNavigationButton_0 then l_Theme_1.BackgroundDefault.Color else l_Theme_1.BackgroundUIDefault.Color,
        [v2.Event.Activated] = v60.props.onActivate,
        [v2.Ref] = l_forwardRef_0,
        NextSelectionLeft = v60.props.NextSelectionLeft,
        NextSelectionRight = v60.props.NextSelectionRight,
        SelectionImageObject = v63(l_CursorKind_0.NavHighlight),
        restorePreviousChildFocus = true,
        defaultChild = v60:getDefaultChild()
    }, v60:getInnerFrameChildren(v61, v62, v65, v66, v67, v70, v64, v68));
end;
v25.renderWithProviders = function(v74, v75, v76, v77)
    local l_isSelected_1 = v74.props.isSelected;
    local l_hasNewItemNotification_0 = v74.props.hasNewItemNotification;
    local l_frameRef_0 = v74.props.frameRef;
    local l_Font_2 = v76.Font;
    local l_Font_3 = l_Font_2.Header2.Font;
    local v83 = l_Font_2.BaseSize * l_Font_2.Header2.RelativeSize;
    local v84 = l_Text_0.GetTextWidth(v75.title, l_Font_3, v83);
    local v85 = {};
    local v86 = 0;
    if v74.props.subButtons then
        for _, v88 in v74.props.subButtons, nil, nil do
            local v89 = l_Text_0.GetTextWidth(v75[v88.Name], l_Font_3, v83) + 2 * l_NavSubButtonInnerPadding_0;
            table.insert(v85, v89);
            v86 = (v86 + l_NavButtonElementPadding_0) + v89;
        end;
    end;
    local v90 = if not v74.props.isSubNavigationButton then l_NavCornerSize_0 else 0;
    local v91 = (v74.props.navHeight - l_NavInnerPadding_0) - 2 * l_NavButtonElementPadding_0;
    local v92 = (l_NavButtonElementPadding_0 + v84) + v86;
    local v93 = (l_NavButtonElementMargin_0 + v91) + l_NavButtonElementMargin_0;
    return v2.createElement("Frame", {
        Size = v74.nonIconSizeMultiplierBinding:map(function(v94)
            return UDim2.new(0, v93 + v94 * v92, 1, -l_NavInnerPadding_0 + v90);
        end),
        BackgroundTransparency = 1,
        LayoutOrder = v74.props.layoutOrder,
        [v2.Ref] = l_frameRef_0
    }, {
        Button = v74:renderButtonWithTextAndIcon(v75, v76, v77, v90, v84, v85, v91, v92),
        NewItemNotification = l_hasNewItemNotification_0 and v2.createElement(v18, {
            isSelected = l_isSelected_1
        })
    });
end;
v25.render = function(v95)
    local v96 = {
        title = v95.props.categoryTitle
    };
    if v95.props.subButtons then
        for _, v98 in v95.props.subButtons, nil, nil do
            v96[v98.Name] = v98.Title;
        end;
    end;
    return l_withLocalization_0(v96)(function(v99)
        return l_withStyle_0(function(v100)
            return l_withSelectionCursorProvider_0(function(v101)
                return v95:renderWithProviders(v99, v100, v101);
            end);
        end);
    end);
end;
return v2.forwardRef(function(v102, v103)
    return v2.createElement(v25, v6.Dictionary.join(v102, {
        forwardRef = v103
    }));
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.Packages.t);
local v3 = require(l_CorePackages_0.Otter);
local v4 = {
    dampingRatio = 1,
    frequency = 3.5
};
local v5 = v1.PureComponent:extend("IntroScroll");
v5.validateProps = v2.strictInterface({
    childWidgetIndex = v2.number,
    scrollingFrameRef = v2.table,
    updateCanvasPosition = v2.callback
});
v5.init = function(v6)
    v6.initMotorValue = 0;
    v6.motor = v3.createSingleMotor(0);
    v6.motor:onStep(function(v7)
        v6.props.updateCanvasPosition(Vector2.new(v7, 0));
    end);
end;
v5.didUpdate = function(v8, v9, _)
    if v8.props.childWidgetIndex and v8.props.childWidgetIndex ~= v9.childWidgetIndex then
        local l_current_0 = v8.props.scrollingFrameRef.current;
        v8.motor:setGoal(v3.instant((math.clamp(l_current_0.AbsoluteCanvasSize.X - l_current_0.AbsoluteSize.X, 0, l_current_0.AbsoluteSize.X * 0.25))));
        v8.motor:step(0);
        v8.motor:setGoal(v8:getGoal());
    end;
end;
v5.getGoal = function(_, _)
    return v3.spring(0, v4);
end;
v5.render = function(_)
    return nil;
end;
v5.willUnmount = function(v15)
    if v15.motor then
        v15.motor:destroy();
        v15.motor = nil;
    end;
end;
return v5;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v4.Focusable;
local v6 = require(l_CorePackages_0.RoactRodux);
local v7 = require(l_CorePackages_0.UIBlox);
local v8 = require(l_CorePackages_0.AvatarExperienceDeps);
local v9 = require(l_CorePackages_0.Packages.t);
local l_FitFrameHorizontal_0 = v8.RoactFitComponents.FitFrameHorizontal;
local l_withStyle_0 = v7.Style.withStyle;
local v12 = require(l_Modules_0.LuaApp.Constants);
local v13 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v14 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v15 = require(l_Modules_0.AvatarExperience.AvatarEditor.GetAvatarEditorCategories);
local v16 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.DEPRECATED_CategoryButton);
local v18 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.IconCategoryButton);
local v19 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.NavHighlight);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v21 = require(l_Modules_0.AvatarExperience.Common.Components.ScrollingListWithArrowsAndGradient);
local v22 = require(l_Modules_0.AvatarExperience.Common.Components.withLastInputGroup);
local v23 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXSearchResultsCategories);
local v24 = v3.PureComponent:extend("MainNavigation");
v24.validateProps = v9.strictInterface({
    layoutOrder = v9.number,
    navHeight = v9.number,
    zIndex = v9.number,
    categories = v9.table,
    selectedCategoryIndex = v9.number,
    selectCategory = v9.callback,
    subcategorySelected = v9.boolean,
    mainNavigationRef = v9.table,
    NextSelectionDown = v9.optional(v9.table),
    NextSelectionUp = v9.optional(v9.table),
    lastInputGroup = v9.string,
    newItemNotifications = v9.table
});
v24.init = function(v25)
    v25.navButtonRefs = v4.createRefCache();
    v25.categoryButtonRefs = {};
    v25.scrollingFrameRef = v3.createRef();
    v25:setState({
        selectedCategoryPositionX = if v23() then nil else 0,
        selectedCategoryWidth = if v23() then nil else 0,
        selectedCategoryButtonRef = nil
    });
    v25.onNavFrameSizeChanged = function(v26)
        if v25.scrollingFrameRef.current then
            v25.scrollingFrameRef.current.CanvasSize = UDim2.new(0, v26.AbsoluteSize.X, 1, 0);
        end;
    end;
end;
v24.getCategoryButtonRef = function(v27, v28)
    if not v27.categoryButtonRefs[v28] then
        v27.categoryButtonRefs[v28] = v3.createRef();
    end;
    return v27.categoryButtonRefs[v28];
end;
v24.tryUpdateScrollingFramePosition = function(v29, v30, v31)
    local v32 = v29.scrollingFrameRef and v29.scrollingFrameRef:getValue();
    local v33 = (v30 or 0) - 50;
    if v32 then
        local l_X_0 = v32.AbsoluteWindowSize.X;
        if not l_X_0 or l_X_0 == 0 then
            return ;
        else
            local v35 = false;
            if v30 + v31 > 0 then
                v35 = v30 + v31 < l_X_0;
            end;
            local v36 = false;
            if v30 > 0 then
                v36 = v30 < l_X_0;
            end;
            if not (v36 or v35) then
                v32.CanvasPosition = Vector2.new(v33, v32.CanvasPosition.Y);
            end;
        end;
    end;
end;
v24.setCategoryPositionAndWidthState = function(v37)
    if not (not v37.categoryButtonRefs or not v37.props.selectedCategoryIndex) and v37.categoryButtonRefs[v37.props.selectedCategoryIndex] then
        local v38 = v37.categoryButtonRefs[v37.props.selectedCategoryIndex];
        local v39 = v38:getValue();
        if v39 == nil then
            return false;
        else
            if not v23() then
                v37:setState({
                    selectedCategoryPositionX = v39.AbsolutePosition.X,
                    selectedCategoryWidth = v39.AbsoluteSize.X
                });
            else
                v37:tryUpdateScrollingFramePosition(v39.AbsolutePosition.X, v39.AbsoluteSize.X);
                v37:setState({
                    selectedCategoryButtonRef = v38
                });
            end;
            return true;
        end;
    else
        return false;
    end;
end;
v24.didMount = function(v40)
    v40:setCategoryPositionAndWidthState();
    if not (not v23() or not v40.scrollingFrameRef.current) then
        v40.scrollingFrameRef.current:GetPropertyChangedSignal("AbsoluteWindowSize"):Once(function()
            v40:setCategoryPositionAndWidthState();
        end);
    end;
end;
v24.didUpdate = function(v41, v42)
    if v41.props.selectedCategoryIndex ~= v42.selectedCategoryIndex then
        v41:setCategoryPositionAndWidthState();
    end;
end;
v24.hasNewItemNotification = function(v43, v44)
    if v43.props.categories ~= v15() then
        return false;
    else
        local l_newItemNotifications_0 = v43.props.newItemNotifications;
        local v46 = v43.props.categories[v44];
        if v46.Name == v14.CharacterKey then
            return l_newItemNotifications_0[v13.NewOutfitNotificationKey];
        elseif not (v46.Name == v14.HeadAndBody) or not l_newItemNotifications_0[v13.NewDHOutfitNotificationKey] then
            local l_Subcategories_0 = v46.Subcategories;
            if not l_Subcategories_0 then
                local l_AssetTypeIdStrings_0 = v46.AssetTypeIdStrings;
                if not (not l_AssetTypeIdStrings_0 or not v16.shouldNotifyAssetTypes(l_AssetTypeIdStrings_0, l_newItemNotifications_0)) then
                    return true;
                end;
            else
                for _, v50 in l_Subcategories_0, nil, nil do
                    local l_AssetTypeIdStrings_1 = v50.AssetTypeIdStrings;
                    if not (not l_AssetTypeIdStrings_1 or not v16.shouldNotifyAssetTypes(l_AssetTypeIdStrings_1, l_newItemNotifications_0)) then
                        return true;
                    end;
                end;
            end;
            return false;
        else
            return true;
        end;
    end;
end;
v24.renderIconCategoryButton = function(v52, v53, v54, v55, v56)
    local v57 = v54 == v55;
    local l_selectCategory_0 = v52.props.selectCategory;
    local l_categories_0 = v52.props.categories;
    return v3.createElement(l_Focusable_0[v18], {
        categoryTitle = v56.Title,
        iconOn = v56.IconOn,
        iconOff = v56.IconOff,
        navHeight = v52.props.navHeight,
        isSubNavigationButton = false,
        layoutOrder = v55,
        isSelected = v57,
        hasNewItemNotification = v52:hasNewItemNotification(v55),
        frameRef = v52:getCategoryButtonRef(v55),
        onActivate = function()
            l_selectCategory_0(v55);
        end,
        [v3.Ref] = v52.navButtonRefs[v55],
        NextSelectionLeft = v55 > 1 and v52.navButtonRefs[v55 - 1] or nil,
        NextSelectionRight = v55 < #l_categories_0 and v52.navButtonRefs[v55 + 1] or nil,
        inputBindings = v53 ~= nil and {
            ShiftLeft = v4.Input.onBegin(Enum.KeyCode.ButtonL1, function()
                if v55 > 1 then
                    v53.moveFocusLeft();
                end;
            end),
            ShiftRight = v4.Input.onBegin(Enum.KeyCode.ButtonR1, function()
                if v55 < #l_categories_0 then
                    v53.moveFocusRight();
                end;
            end)
        } or nil
    });
end;
v24.renderCategoryButton = function(v60, v61, v62, v63, v64)
    local v65 = v62 == v63;
    local l_selectCategory_1 = v60.props.selectCategory;
    local l_categories_1 = v60.props.categories;
    return v3.createElement(l_Focusable_0[v17], {
        categoryIndex = v63,
        categoryTitle = v64.Title,
        layoutOrder = v63,
        isSelected = v65,
        hasNewItemNotification = v60:hasNewItemNotification(v63),
        frameRef = v60:getCategoryButtonRef(v63),
        onActivate = function()
            l_selectCategory_1(v63);
        end,
        [v3.Ref] = v60.navButtonRefs[v63],
        NextSelectionLeft = v63 > 1 and v60.navButtonRefs[v63 - 1] or nil,
        NextSelectionRight = v63 < #l_categories_1 and v60.navButtonRefs[v63 + 1] or nil,
        inputBindings = v61 ~= nil and {
            ShiftLeft = v4.Input.onBegin(Enum.KeyCode.ButtonL1, function()
                if v63 > 1 then
                    v61.moveFocusLeft();
                end;
            end),
            ShiftRight = v4.Input.onBegin(Enum.KeyCode.ButtonR1, function()
                if v63 < #l_categories_1 then
                    v61.moveFocusRight();
                end;
            end)
        } or nil
    });
end;
v24.renderNavButtonsFrameChildren = function(v68, v69)
    local l_categories_2 = v68.props.categories;
    local l_selectedCategoryIndex_0 = v68.props.selectedCategoryIndex;
    local v72 = {};
    for v73, v74 in l_categories_2, nil, nil do
        v72[v74.Name] = v68:renderCategoryButton(v69, l_selectedCategoryIndex_0, v73, v74);
    end;
    return v72;
end;
v24.getScrollingListChildren = function(v75)
    local l_subcategorySelected_0 = v75.props.subcategorySelected;
    return {
        NavFrame = v4.withFocusController(function(v77)
            return v3.createElement(l_Focusable_0[l_FitFrameHorizontal_0], {
                height = UDim.new(1, 0),
                FillDirection = Enum.FillDirection.Horizontal,
                BackgroundTransparency = 1,
                [v3.Change.AbsoluteSize] = v75.onNavFrameSizeChanged,
                inputBindings = {
                    ToTopBar = v4.Input.onBegin(Enum.KeyCode.ButtonB, function()
                        v77.moveFocusUp();
                    end)
                }
            }, v75:renderNavButtonsFrameChildren(v77));
        end),
        Highlight = (not (v75.props.lastInputGroup == v12.InputType.Gamepad) or l_subcategorySelected_0) and v3.createElement(v19, {
            scrollingFrameRef = v75.scrollingFrameRef,
            useArrowHighlight = l_subcategorySelected_0,
            selectedCategoryButtonPositionX = v75.state.selectedCategoryPositionX,
            selectedCategoryButtonWidth = v75.state.selectedCategoryWidth,
            selectedCategoryButtonRef = if not v23() then nil else v75.state.selectedCategoryButtonRef
        })
    };
end;
v24.getMainNavigationChildren = function(v78)
    return {
        ScrollingListWithArrowsAndGradient = v3.createElement(v21, {
            getScollingListContent = function()
                return v78:getScrollingListChildren();
            end,
            listHeight = v78.props.navHeight,
            scrollingFrameRef = v78.scrollingFrameRef,
            buttonRefs = v78.categoryButtonRefs,
            buttonPadding = 0
        })
    };
end;
v24.render = function(v79)
    local l_layoutOrder_0 = v79.props.layoutOrder;
    local l_navHeight_0 = v79.props.navHeight;
    local l_zIndex_0 = v79.props.zIndex;
    local l_selectedCategoryIndex_1 = v79.props.selectedCategoryIndex;
    return l_withStyle_0(function(v84)
        local l_Theme_0 = v84.Theme;
        return v3.createElement(l_Focusable_0.Frame, {
            ClipsDescendants = true,
            BackgroundColor3 = l_Theme_0.BackgroundDefault.Color,
            BackgroundTransparency = l_Theme_0.BackgroundDefault.Transparency,
            BorderSizePixel = 0,
            LayoutOrder = l_layoutOrder_0,
            Size = UDim2.new(1, 0, 0, l_navHeight_0),
            ZIndex = l_zIndex_0,
            [v3.Ref] = v79.props.mainNavigationRef,
            NextSelectionUp = v79.props.NextSelectionUp,
            NextSelectionDown = v79.props.NextSelectionDown,
            defaultChild = v79.navButtonRefs[l_selectedCategoryIndex_1]
        }, v79:getMainNavigationChildren());
    end);
end;
return (v22((v6.connect(function(v86, _)
    return {
        newItemNotifications = v86.AvatarExperience.AvatarEditor.NewItemNotifications
    };
end, nil)(v24))));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.UIBlox);
local v5 = require(l_CorePackages_0.Packages.t);
local l_withStyle_0 = v4.Style.withStyle;
local l_SpringAnimatedItem_0 = v4.Utility.SpringAnimatedItem;
local l_ImageSetLabel_0 = v4.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v4.App.ImageSet.Images;
local v10 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXSearchResultsCategories);
local v11 = v3.PureComponent:extend("NavHighlight");
local v12 = l_Images_0["component_assets/triangleUp_16"];
local v13 = {
    dampingRatio = 1,
    frequency = 3.5
};
local v14 = Vector2.new(20, 8);
local function v16(v15)
    return {
        Size = UDim2.new(0, v15.width, 1, 0),
        Position = UDim2.fromOffset(v15.position, 0)
    };
end;
if v10() then
    v11.validateProps = v5.strictInterface({
        useArrowHighlight = v5.optional(v5.boolean),
        selectedCategoryButtonRef = v5.optional(v5.table),
        scrollingFrameRef = v5.table
    });
end;
v11.render = function(v17)
    local l_useArrowHighlight_0 = v17.props.useArrowHighlight;
    local v19 = 0;
    local v20 = 0;
    v19 = v10() and 0 or v17.props.selectedCategoryButtonWidth;
    v20 = v10() and 0 or v17.props.selectedCategoryButtonPositionX;
    if not (not v10() or not v17.props.selectedCategoryButtonRef) then
        local v21 = v17.props.selectedCategoryButtonRef:getValue();
        if v21 then
            v19 = v21.AbsoluteSize.X;
            v20 = v21.AbsolutePosition.X;
        end;
    end;
    local v22 = v17.props.scrollingFrameRef:getValue();
    if v22 then
        v20 = (v20 + v22.CanvasPosition.X) - v22.AbsolutePosition.X;
    end;
    return l_withStyle_0(function(v23)
        local l_Theme_0 = v23.Theme;
        return v3.createElement(l_SpringAnimatedItem_0.AnimatedFrame, {
            regularProps = {
                BackgroundTransparency = 1
            },
            animatedValues = {
                width = v19,
                position = v20
            },
            mapValuesToProps = v16,
            springOptions = v13
        }, {
            Highlight = not l_useArrowHighlight_0 and v3.createElement("Frame", {
                AnchorPoint = Vector2.new(0, 1),
                Position = UDim2.new(0, 0, 1, 0),
                Size = UDim2.new(1, 0, 0, 3),
                BorderSizePixel = 0,
                BackgroundColor3 = l_Theme_0.IconEmphasis.Color,
                BackgroundTransparency = l_Theme_0.IconEmphasis.Transparency
            }),
            ArrowHighlight = l_useArrowHighlight_0 and v3.createElement(l_ImageSetLabel_0, {
                AnchorPoint = Vector2.new(0.5, 1),
                BackgroundTransparency = 1,
                Position = UDim2.new(0.5, 0, 1, 0),
                Size = UDim2.new(0, v14.X, 0, v14.Y),
                Image = v12,
                ImageColor3 = l_Theme_0.BackgroundContrast.Color,
                ImageTransparency = l_Theme_0.BackgroundContrast.Transparency
            })
        });
    end);
end;
return v11;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v4.Focusable;
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_CorePackages_0.Packages.t);
local l_FitFrameVertical_0 = require(l_CorePackages_0.AvatarExperienceDeps).RoactFitComponents.FitFrameVertical;
local v9 = require(l_Modules_0.AvatarExperience.Catalog.Components.Filters.FilterButtonLayout);
local v10 = require(l_CorePackages_0.RoactNavigation);
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local l_withStyle_0 = v6.Style.withStyle;
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.MainNavigation);
local v14 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.SubNavigation);
local v15 = v3.PureComponent:extend("NavigationFrame");
v15.validateProps = v7.strictInterface({
    layoutOrderMain = v7.number,
    navHeightMain = v7.number,
    layoutOrderSub = v7.number,
    navHeightSub = v7.number,
    categoryTable = v7.table,
    selectedCategoryIndex = v7.number,
    selectCategory = v7.callback,
    selectedSubcategoryIndex = v7.number,
    subcategoryTable = v7.optional(v7.table),
    onSubNavigationPropsDidUpdate = v7.callback,
    selectSubcategory = v7.callback,
    absoluteSizeChanged = v7.callback,
    navigationFrameRef = v7.table,
    NextSelectionUp = v7.optional(v7.table),
    NextSelectionDown = v7.optional(v7.table),
    showingTopics = v7.optional(v7.boolean),
    navigation = v7.table
});
v15.init = function(v16)
    v16.mainNavRef = v3.createRef();
    v16.subNavRef = v3.createRef();
    v16.onAbsoluteSizeChanged = function(v17)
        local l_absoluteSizeChanged_0 = v16.props.absoluteSizeChanged;
        if l_absoluteSizeChanged_0 then
            l_absoluteSizeChanged_0(v17.AbsoluteSize);
        end;
    end;
end;
v15.render = function(v19)
    local l_layoutOrderMain_0 = v19.props.layoutOrderMain;
    local l_layoutOrderSub_0 = v19.props.layoutOrderSub;
    local l_navHeightMain_0 = v19.props.navHeightMain;
    local l_navHeightSub_0 = v19.props.navHeightSub;
    local l_categoryTable_0 = v19.props.categoryTable;
    local l_selectedCategoryIndex_0 = v19.props.selectedCategoryIndex;
    local l_subcategoryTable_0 = v19.props.subcategoryTable;
    local l_selectedSubcategoryIndex_0 = v19.props.selectedSubcategoryIndex;
    local l_selectCategory_0 = v19.props.selectCategory;
    local l_onSubNavigationPropsDidUpdate_0 = v19.props.onSubNavigationPropsDidUpdate;
    local l_selectSubcategory_0 = v19.props.selectSubcategory;
    local v31 = l_categoryTable_0[l_selectedCategoryIndex_0].Subcategories ~= nil;
    local l_showingTopics_0 = v19.props.showingTopics;
    local v33 = not l_showingTopics_0 and v19.props.navigation.state.routeName == v11.Catalog;
    return l_withStyle_0(function(v34)
        local l_Theme_0 = v34.Theme;
        local l_navigationFrameRef_0 = v19.props.navigationFrameRef;
        return v4.withFocusController(function(_)
            local l_createElement_0 = v3.createElement;
            local v39 = l_Focusable_0[l_FitFrameVertical_0];
            local v40 = {
                width = UDim.new(1, 0),
                FillDirection = Enum.FillDirection.Vertical,
                BackgroundColor3 = l_Theme_0.BackgroundContrast.Color,
                BackgroundTransparency = l_Theme_0.BackgroundContrast.Transparency,
                BorderSizePixel = 0,
                LayoutOrder = l_layoutOrderMain_0,
                ZIndex = 3,
                [v3.Change.AbsoluteSize] = v19.onAbsoluteSizeChanged,
                [v3.Ref] = l_navigationFrameRef_0,
                defaultChild = v19.mainNavRef,
                restorePreviousChildFocus = true
            };
            local v41 = {};
            local l_createElement_1 = v3.createElement;
            local l_v13_0 = v13;
            local v44 = {
                layoutOrder = l_layoutOrderMain_0,
                navHeight = l_navHeightMain_0,
                zIndex = 1,
                categories = l_categoryTable_0,
                selectedCategoryIndex = l_selectedCategoryIndex_0,
                selectCategory = l_selectCategory_0
            };
            local v45 = false;
            if l_selectedSubcategoryIndex_0 ~= 0 then
                v45 = v31;
            end;
            v44.subcategorySelected = v45;
            v44.mainNavigationRef = v19.mainNavRef;
            v44.NextSelectionDown = if not v31 and l_showingTopics_0 then v19.props.NextSelectionDown else v19.subNavRef;
            v44.NextSelectionUp = v19.props.NextSelectionUp;
            v41.MainNavigation = l_createElement_1(l_v13_0, v44);
            v41.SubNavigation = v3.createElement(v9, {
                height = if v31 or v33 then l_navHeightSub_0 else 0,
                isContentEmpty = not v31,
                layoutOrder = l_layoutOrderSub_0,
                showFilterButton = v33,
                layoutRef = v19.subNavRef,
                NextSelectionUp = v19.mainNavRef,
                NextSelectionDown = v19.props.NextSelectionDown
            }, {
                SubNavigation = v3.createElement(v14, {
                    layoutOrder = 1,
                    navHeight = l_navHeightSub_0,
                    selectedCategoryIndex = l_selectedCategoryIndex_0,
                    selectedSubcategoryIndex = l_selectedSubcategoryIndex_0,
                    subcategories = l_subcategoryTable_0,
                    onSubNavigationPropsDidUpdate = l_onSubNavigationPropsDidUpdate_0,
                    selectSubcategory = l_selectSubcategory_0
                })
            });
            return l_createElement_0(v39, v40, v41);
        end);
    end);
end;
return (v10.withNavigation(v15));


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.UIBlox);
local v3 = require(l_CorePackages_0.Packages.t);
local l_withStyle_0 = v2.Style.withStyle;
local l_Images_0 = v2.App.ImageSet.Images;
local l_ImageSetLabel_0 = v2.Core.ImageSet.ImageSetLabel;
local v7 = l_Images_0["component_assets/circle_9"];
local v8 = v1.PureComponent:extend("NewItemNotification");
v8.validateProps = v3.strictInterface({
    isSelected = v3.optional(v3.boolean)
});
v8.defaultProps = {
    isSelected = false
};
v8.render = function(v9)
    return l_withStyle_0(function(v10)
        local l_Theme_0 = v10.Theme;
        return v1.createElement(l_ImageSetLabel_0, {
            Image = v7,
            AnchorPoint = Vector2.new(1, 0),
            Position = UDim2.new(1, -3, 0, 6),
            Size = UDim2.fromOffset(6, 6),
            ImageColor3 = not not v9.props.isSelected and l_Theme_0.TextEmphasis.Color or l_Theme_0.TextMuted.Color,
            ImageTransparency = not not v9.props.isSelected and l_Theme_0.TextEmphasis.Transparency or l_Theme_0.TextMuted.Transparency,
            BackgroundTransparency = 1
        });
    end);
end;
return v8;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Packages.t);
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v5.Focusable;
local v7 = require(l_CorePackages_0.RoactRodux);
local v8 = require(l_CorePackages_0.UIBlox);
local v9 = require(l_CorePackages_0.AvatarExperienceDeps);
local v10 = require(l_CorePackages_0.RoactNavigation);
local l_RoactFitComponents_0 = v9.RoactFitComponents;
local l_FitFrameHorizontal_0 = l_RoactFitComponents_0.FitFrameHorizontal;
local l_withStyle_0 = v8.Style.withStyle;
local l_SpringAnimatedItem_0 = v8.Utility.SpringAnimatedItem;
local v15 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v16 = require(l_Modules_0.LuaApp.Constants);
local v17 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v18 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v19 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.DEPRECATED_CategoryButton);
local v21 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.IconCategoryButton);
local v22 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.TextCategoryButton);
local v23 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.NavHighlight);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v25 = require(l_Modules_0.AvatarExperience.Common.Components.withLastInputGroup);
local v26 = require(l_Modules_0.AvatarExperience.Common.Components.ScrollingListWithArrowsAndGradient);
local v27 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXSearchResultsCategories);
local v28 = v4.PureComponent:extend("SubNavigation");
local v29 = {
    dampingRatio = 1,
    frequency = 3.5
};
v28.validateProps = v3.strictInterface({
    layoutOrder = v3.number,
    navHeight = v3.number,
    selectedCategoryIndex = v3.number,
    selectedSubcategoryIndex = v3.number,
    subcategories = v3.optional(v3.table),
    onSubNavigationPropsDidUpdate = v3.callback,
    selectSubcategory = v3.callback,
    NextSelectionUp = v3.optional(v3.table),
    NextSelectionDown = v3.optional(v3.table),
    subNavigationRef = v3.optional(v3.table),
    lastInputGroup = v3.string,
    newItemNotifications = v3.table,
    navigation = v3.table
});
local function v31(v30)
    return {
        Size = UDim2.new(1, 0, 0, v30.height)
    };
end;
v28.init = function(v32)
    v32.scrollingFrameRef = v4.createRef();
    v32.navButtonRefs = v5.createRefCache();
    v32.categoryButtonRefs = {};
    v32:setState({
        selectedCategoryPositionX = if v27() then nil else 0,
        selectedCategoryWidth = if v27() then nil else 0,
        selectedCategoryButtonRef = nil,
        renderHighlight = false
    });
    v32.onNavFrameSizeChanged = function(v33)
        if v32.scrollingFrameRef.current then
            v32.scrollingFrameRef.current.CanvasSize = UDim2.new(0, v33.AbsoluteSize.X, 1, 0);
        end;
    end;
end;
v28.getCategoryButtonRef = function(v34, v35)
    if not v34.categoryButtonRefs[v35] then
        v34.categoryButtonRefs[v35] = v4.createRef();
    end;
    return v34.categoryButtonRefs[v35];
end;
v28.tryUpdateScrollingFramePosition = function(v36, v37, v38)
    local v39 = v36.scrollingFrameRef and v36.scrollingFrameRef:getValue();
    local v40 = (v37 or 0) - 50;
    if v39 then
        local l_X_0 = v39.AbsoluteWindowSize.X;
        if not l_X_0 or l_X_0 == 0 then
            return ;
        else
            local v42 = false;
            if v37 + v38 > 0 then
                v42 = v37 + v38 < l_X_0;
            end;
            local v43 = false;
            if v37 > 0 then
                v43 = v37 < l_X_0;
            end;
            if not (v43 or v42) then
                v39.CanvasPosition = Vector2.new(v40, v39.CanvasPosition.Y);
            end;
        end;
    end;
end;
v28.setCategoryPositionAndWidthState = function(v44)
    if not (not v44.categoryButtonRefs or not v44.props.selectedSubcategoryIndex) and v44.categoryButtonRefs[v44.props.selectedSubcategoryIndex] then
        local v45 = v44.categoryButtonRefs[v44.props.selectedSubcategoryIndex];
        local v46 = v45:getValue();
        if v46 == nil then
            v44:setState({
                renderHighlight = false
            });
            return false;
        else
            if not v27() then
                v44:setState({
                    selectedCategoryPositionX = v46.AbsolutePosition.X,
                    selectedCategoryWidth = v46.AbsoluteSize.X,
                    renderHighlight = true
                });
            else
                v44:tryUpdateScrollingFramePosition(v46.AbsolutePosition.X, v46.AbsoluteSize.X);
                v44:setState({
                    selectedCategoryButtonRef = v45,
                    renderHighlight = true
                });
            end;
            return true;
        end;
    else
        v44:setState({
            renderHighlight = false
        });
        return false;
    end;
end;
v28.didMount = function(v47)
    v47:setCategoryPositionAndWidthState();
    if not (not v27() or not v47.scrollingFrameRef.current) then
        v47.scrollingFrameRef.current:GetPropertyChangedSignal("AbsoluteWindowSize"):Once(function()
            v47:setCategoryPositionAndWidthState();
        end);
    end;
end;
v28.didUpdate = function(v48, v49)
    v48.props.onSubNavigationPropsDidUpdate(v49, v48.scrollingFrameRef);
    if not (v48.props.selectedSubcategoryIndex == v49.selectedSubcategoryIndex) or v48.props.selectedCategoryIndex ~= v49.selectedCategoryIndex then
        v48:setCategoryPositionAndWidthState();
    end;
end;
v28.getRouteName = function(v50)
    return v50.props.navigation.state.routeName;
end;
local function _(v51, v52)
    local v53 = false;
    if v51.SearchUuid == v18.PurchasedCharacterKey then
        v53 = v52[v17.NewOutfitNotificationKey];
    end;
    local v54 = false;
    if v51.OutfitType == v17.OutfitTypes.DynamicHead then
        v54 = v52[v17.NewDHOutfitNotificationKey];
    end;
    return v53 or v54;
end;
v28.hasNewItemNotification = function(v56, v57, v58)
    if v56:getRouteName() ~= v15.AvatarEditor then
        return false;
    else
        local l_newItemNotifications_0 = v56.props.newItemNotifications;
        local v60 = v58[v57];
        local l_AssetTypeIdStrings_0 = v60.AssetTypeIdStrings;
        if not l_AssetTypeIdStrings_0 or not v19.shouldNotifyAssetTypes(l_AssetTypeIdStrings_0, l_newItemNotifications_0) then
            local v62 = false;
            if v60.SearchUuid == v18.PurchasedCharacterKey then
                v62 = l_newItemNotifications_0[v17.NewOutfitNotificationKey];
            end;
            local v63 = false;
            if v60.OutfitType == v17.OutfitTypes.DynamicHead then
                v63 = l_newItemNotifications_0[v17.NewDHOutfitNotificationKey];
            end;
            if not (v62 or v63) then
                return false;
            else
                return true;
            end;
        else
            return true;
        end;
    end;
end;
v28.getNextSelectionLeft = function(v64, v65, _)
    return v65 > 1 and v64.navButtonRefs[v65 - 1] or nil;
end;
v28.getNextSelectionRight = function(v67, v68, v69)
    return v68 < #v69 and v67.navButtonRefs[v68 + 1] or nil;
end;
v28.renderIconCategoryButton = function(v70, v71, v72, v73, v74, v75)
    local v76 = v73 == v74;
    local l_subcategories_0 = v70.props.subcategories;
    local l_selectSubcategory_0 = v70.props.selectSubcategory;
    return (v4.createElement(l_Focusable_0[v21], {
        categoryTitle = v75.Title,
        iconOn = v75.IconOn,
        iconOff = v75.IconOff,
        navHeight = v70.props.navHeight,
        isSubNavigationButton = true,
        layoutOrder = v74,
        isSelected = v76,
        hasNewItemNotification = v70:hasNewItemNotification(v74, l_subcategories_0),
        frameRef = v70:getCategoryButtonRef(v74),
        onActivate = function()
            l_selectSubcategory_0(v72, v74);
        end,
        subButtons = v75.SubButtons,
        subcatIndex = v74,
        [v4.Ref] = v70.navButtonRefs[v74],
        NextSelectionLeft = v70:getNextSelectionLeft(v74),
        NextSelectionRight = v70:getNextSelectionRight(v74, l_subcategories_0),
        inputBindings = v71 ~= nil and {
            ShiftLeft = v5.Input.onBegin(Enum.KeyCode.ButtonL1, function()
                if v74 > 1 then
                    v71.moveFocusLeft();
                end;
            end),
            ShiftRight = v5.Input.onBegin(Enum.KeyCode.ButtonR1, function()
                if v74 < #l_subcategories_0 then
                    v71.moveFocusRight();
                end;
            end)
        } or nil
    }));
end;
v28.renderTextCategoryButton = function(v79, v80, v81, v82, v83, v84)
    local v85 = v82 == v83;
    local l_subcategories_1 = v79.props.subcategories;
    local l_selectSubcategory_1 = v79.props.selectSubcategory;
    return (v4.createElement(l_Focusable_0[v22], {
        categoryTitle = v84.Title,
        layoutOrder = v83,
        isSelected = v85,
        hasNewItemNotification = v79:hasNewItemNotification(v83, l_subcategories_1),
        frameRef = v79:getCategoryButtonRef(v83),
        onActivate = function()
            l_selectSubcategory_1(v81, v83);
        end,
        subButtons = v84.SubButtons,
        subcatIndex = v83,
        [v4.Ref] = v79.navButtonRefs[v83],
        NextSelectionLeft = v79:getNextSelectionLeft(v83),
        NextSelectionRight = v79:getNextSelectionRight(v83, l_subcategories_1),
        inputBindings = v80 ~= nil and {
            ShiftLeft = v5.Input.onBegin(Enum.KeyCode.ButtonL1, function()
                if v83 > 1 then
                    v80.moveFocusLeft();
                end;
            end),
            ShiftRight = v5.Input.onBegin(Enum.KeyCode.ButtonR1, function()
                if v83 < #l_subcategories_1 then
                    v80.moveFocusRight();
                end;
            end)
        } or nil
    }));
end;
v28.renderCategoryButton = function(v88, v89, v90, v91, v92, v93)
    local v94 = v91 == v92;
    local l_subcategories_2 = v88.props.subcategories;
    local l_selectSubcategory_2 = v88.props.selectSubcategory;
    return v4.createElement(l_Focusable_0[v20], {
        categoryTitle = v93.Title,
        layoutOrder = v92,
        isSelected = v94,
        hasNewItemNotification = v88:hasNewItemNotification(v92, l_subcategories_2),
        frameRef = v88:getCategoryButtonRef(v92),
        onActivate = function()
            l_selectSubcategory_2(v90, v92);
        end,
        [v4.Ref] = v88.navButtonRefs[v92],
        NextSelectionLeft = v92 > 1 and v88.navButtonRefs[v92 - 1] or nil,
        NextSelectionRight = v92 < #l_subcategories_2 and v88.navButtonRefs[v92 + 1] or nil,
        inputBindings = v89 ~= nil and {
            ShiftLeft = v5.Input.onBegin(Enum.KeyCode.ButtonL1, function()
                if v92 > 1 then
                    v89.moveFocusLeft();
                end;
            end),
            ShiftRight = v5.Input.onBegin(Enum.KeyCode.ButtonR1, function()
                if v92 < #l_subcategories_2 then
                    v89.moveFocusRight();
                end;
            end)
        } or nil
    });
end;
v28.renderSubNavFrameChildren = function(v97, v98)
    local l_subcategories_3 = v97.props.subcategories;
    local l_selectedSubcategoryIndex_0 = v97.props.selectedSubcategoryIndex;
    local l_selectedCategoryIndex_0 = v97.props.selectedCategoryIndex;
    local v102 = {};
    if l_subcategories_3 then
        for v103, v104 in l_subcategories_3, nil, nil do
            v102[v104.Name] = v97:renderCategoryButton(v98, l_selectedCategoryIndex_0, l_selectedSubcategoryIndex_0, v103, v104);
        end;
    end;
    return v102;
end;
v28.getScrollingListChildren = function(v105)
    local l_subNavigationRef_0 = v105.props.subNavigationRef;
    local v107 = not (v105.props.lastInputGroup == v16.InputType.Gamepad) and v105.state.renderHighlight;
    local l_selectedSubcategoryIndex_1 = v105.props.selectedSubcategoryIndex;
    local v109 = UDim.new(0, 15);
    local v110 = l_RoactFitComponents_0.Rect.rectangle(10, 0);
    return {
        SubNavFrame = v5.withFocusController(function(v111)
            return v4.createElement(l_Focusable_0[l_FitFrameHorizontal_0], {
                height = UDim.new(1, 0),
                contentPadding = v109,
                margin = v110,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                FillDirection = Enum.FillDirection.Horizontal,
                BackgroundTransparency = 1,
                [v4.Change.AbsoluteSize] = v105.onNavFrameSizeChanged,
                [v4.Ref] = l_subNavigationRef_0,
                NextSelectionUp = v105.props.NextSelectionUp,
                NextSelectionDown = v105.props.NextSelectionDown,
                defaultChild = v105.navButtonRefs[l_selectedSubcategoryIndex_1 == 0 and 1 or l_selectedSubcategoryIndex_1],
                inputBindings = {
                    ToMainNav = v5.Input.onBegin(Enum.KeyCode.ButtonB, function()
                        v111.moveFocusUp();
                    end)
                }
            }, v105:renderSubNavFrameChildren(v111));
        end),
        Highlight = v107 and v4.createElement(v23, {
            scrollingFrameRef = v105.scrollingFrameRef,
            selectedCategoryButtonPositionX = v105.state.selectedCategoryPositionX,
            selectedCategoryButtonWidth = v105.state.selectedCategoryWidth,
            selectedCategoryButtonRef = if not v27() then nil else v105.state.selectedCategoryButtonRef
        })
    };
end;
v28.getSubNavigationChildren = function(v112, _, v114)
    return {
        ScrollingListWithArrowsAndGradient = v4.createElement(v26, {
            getScollingListContent = function()
                return v112:getScrollingListChildren();
            end,
            listHeight = v114,
            scrollingFrameRef = v112.scrollingFrameRef,
            buttonRefs = v112.categoryButtonRefs,
            childWidgetIndex = v112.props.selectedCategoryIndex,
            useIntroScroll = true,
            buttonPadding = 15
        })
    };
end;
v28.render = function(v115)
    local l_layoutOrder_0 = v115.props.layoutOrder;
    local l_navHeight_0 = v115.props.navHeight;
    if not v115.props.subcategories then
        l_navHeight_0 = 0;
    end;
    return (l_withStyle_0(function(v118)
        local l_Theme_0 = v118.Theme;
        return v4.createElement(l_SpringAnimatedItem_0.AnimatedFrame, {
            regularProps = {
                Size = UDim2.new(1, 0, 0, 0),
                BackgroundColor3 = l_Theme_0.BackgroundContrast.Color,
                BackgroundTransparency = l_Theme_0.BackgroundContrast.Transparency,
                BorderSizePixel = 0,
                LayoutOrder = l_layoutOrder_0,
                ClipsDescendants = true
            },
            animatedValues = {
                height = l_navHeight_0
            },
            mapValuesToProps = v31,
            springOptions = v29
        }, v115:getSubNavigationChildren(l_Theme_0, l_navHeight_0));
    end));
end;
return (v10.withNavigation((v25((v7.connect(function(v120, _)
    return {
        newItemNotifications = v120.AvatarExperience.AvatarEditor.NewItemNotifications
    };
end, nil)(v28))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v3.Focusable;
local v5 = require(l_CorePackages_0.UIBlox);
local v6 = require(l_CorePackages_0.Cryo);
local l_CursorKind_0 = v5.App.SelectionImage.CursorKind;
local v8 = require(l_CorePackages_0.Packages.t);
local l_withSelectionCursorProvider_0 = v5.App.SelectionImage.withSelectionCursorProvider;
local l_Text_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Text;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_withStyle_0 = v5.Style.withStyle;
local v13 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v14 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.CategorySubButton);
local v15 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.NewItemNotification);
local v16 = v2.PureComponent:extend("TextCategoryButton");
local l_NavButtonElementPadding_0 = v13.NavButtonElementPadding;
local l_NavButtonElementMargin_0 = v13.NavButtonElementMargin;
local l_NavInnerPadding_0 = v13.NavInnerPadding;
local l_NavCornerSize_0 = v13.NavCornerSize;
local l_NavButtonBorderSize_0 = v13.NavButtonBorderSize;
local l_NavSubButtonInnerPadding_0 = v13.NavSubButtonInnerPadding;
v16.validateProps = v8.strictInterface({
    categoryTitle = v8.string,
    layoutOrder = v8.number,
    isSelected = v8.boolean,
    hasNewItemNotification = v8.optional(v8.boolean),
    frameRef = v8.table,
    onActivate = v8.callback,
    subButtons = v8.optional(v8.table),
    onSubButtonSelected = v8.optional(v8.callback),
    subcatIndex = v8.optional(v8.number),
    forwardRef = v8.table,
    NextSelectionUp = v8.optional(v8.table),
    NextSelectionDown = v8.optional(v8.table),
    NextSelectionLeft = v8.optional(v8.table),
    NextSelectionRight = v8.optional(v8.table),
    inputBindings = v8.optional(v8.table)
});
v16.init = function(v23)
    if v23.props.subButtons and #v23.props.subButtons > 0 then
        v23.subButtonRefs = v3.createRefCache();
    end;
end;
v16.getDefaultChild = function(v24)
    if not (v24.props.subButtons ~= nil) or #v24.props.subButtons == 0 then
        return nil;
    else
        return v24.subButtonRefs[1];
    end;
end;
v16.getSubButtonNextSelectionLeft = function(v25, v26)
    if v26 > 1 then
        return v25.subButtonRefs[v26 - 1];
    else
        return nil;
    end;
end;
v16.getSubButtonNextSelectionRight = function(v27, v28)
    if v28 < #v27.props.subButtons then
        return v27.subButtonRefs[v28 + 1];
    else
        return nil;
    end;
end;
v16.getInnerFrameChildren = function(v29, v30, v31, v32, v33, v34, v35)
    local v36 = {};
    local l_isSelected_0 = v29.props.isSelected;
    local v38 = if not l_isSelected_0 then l_NavCornerSize_0 else l_NavCornerSize_0 - l_NavButtonBorderSize_0;
    local l_Theme_0 = v31.Theme;
    local v40 = not not l_isSelected_0 and l_Theme_0.TextEmphasis.Transparency or l_Theme_0.TextMuted.Transparency;
    local l_Font_0 = v31.Font.Header2.Font;
    v36.UICorner = v2.createElement("UICorner", {
        CornerRadius = UDim.new(0, v38)
    });
    v36.UIPadding = v2.createElement("UIPadding", {
        PaddingBottom = UDim.new(0, 0),
        PaddingTop = UDim.new(0, 0),
        PaddingLeft = UDim.new(0, l_NavButtonElementMargin_0),
        PaddingRight = UDim.new(0, l_NavButtonElementMargin_0)
    });
    v36.UIListLayout = v2.createElement("UIListLayout", {
        Padding = UDim.new(0, l_NavButtonElementPadding_0),
        SortOrder = Enum.SortOrder.LayoutOrder,
        FillDirection = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Center,
        VerticalAlignment = Enum.VerticalAlignment.Center
    });
    v36.TextLabel = v2.createElement("TextLabel", {
        Size = UDim2.new(0, v32, 1, 0),
        LayoutOrder = 1,
        BackgroundTransparency = 1,
        Text = v30.title,
        TextSize = v35,
        TextColor3 = v34,
        TextTransparency = v40,
        Font = l_Font_0,
        BorderSizePixel = 0
    });
    local l_subButtons_0 = v29.props.subButtons;
    if l_subButtons_0 then
        for v43, v44 in l_subButtons_0, nil, nil do
            v36[v44.Name] = v2.createElement(v14, {
                title = v30[v44.Name],
                width = v33[v43],
                layoutOrder = v43 + 1,
                index = v43,
                onSubButtonSelected = function(v45)
                    if not l_isSelected_0 then
                        v29.props.onActivate();
                    end;
                    v29.props.onSubButtonSelected(v45);
                end,
                parentButtonSelected = l_isSelected_0,
                buttonRef = v29.subButtonRefs[v43],
                NextSelectionLeft = v29:getSubButtonNextSelectionLeft(v43),
                NextSelectionRight = v29:getSubButtonNextSelectionRight(v43)
            });
        end;
    end;
    return v36;
end;
v16.renderButtonWithText = function(v46, v47, v48, v49)
    local l_Font_1 = v48.Font;
    local l_Font_2 = l_Font_1.Header2.Font;
    local v52 = l_Font_1.BaseSize * l_Font_1.Header2.RelativeSize;
    local v53 = l_Text_0.GetTextWidth(v47.title, l_Font_2, v52);
    local l_Theme_1 = v48.Theme;
    local l_isSelected_1 = v46.props.isSelected;
    local v56 = not not l_isSelected_1 and l_Theme_1.TextEmphasis.Color or l_Theme_1.TextMuted.Color;
    local v57 = {};
    local v58 = 0;
    if v46.props.subButtons then
        for _, v60 in v46.props.subButtons, nil, nil do
            local v61 = l_Text_0.GetTextWidth(v47[v60.Name], l_Font_2, v52) + 2 * l_NavSubButtonInnerPadding_0;
            table.insert(v57, v61);
            v58 = (v58 + l_NavButtonElementPadding_0) + v61;
        end;
    end;
    local v62 = ((l_NavButtonElementMargin_0 + v53) + v58) + l_NavButtonElementMargin_0;
    local v63 = v46:getDefaultChild();
    if not l_isSelected_1 then
        return v2.createElement(l_Focusable_0.TextButton, {
            AnchorPoint = Vector2.new(0, 0.5),
            Position = UDim2.new(0, 0, 0.5, 0),
            Size = UDim2.new(0, v62, 1, -l_NavInnerPadding_0),
            BackgroundTransparency = 0,
            BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color,
            BorderSizePixel = 0,
            [v2.Event.Activated] = function()
                v46.props.onActivate();
            end,
            [v2.Ref] = v46.props.forwardRef,
            NextSelectionLeft = v46.props.NextSelectionLeft,
            NextSelectionRight = v46.props.NextSelectionRight,
            SelectionImageObject = v49(l_CursorKind_0.NavHighlight),
            defaultChild = v63
        }, v46:getInnerFrameChildren(v47, v48, v53, v57, v56, v52));
    else
        return v2.createElement(l_Focusable_0.TextButton, {
            AnchorPoint = Vector2.new(0, 0.5),
            Position = UDim2.new(0, 0, 0.5, 0),
            Size = UDim2.new(0, v62 + l_NavButtonBorderSize_0 * 2, 1, -l_NavInnerPadding_0),
            BackgroundTransparency = 0,
            BackgroundColor3 = v56,
            [v2.Event.Activated] = function()
                v46.props.onActivate();
            end,
            [v2.Ref] = v46.props.forwardRef,
            NextSelectionLeft = v46.props.NextSelectionLeft,
            NextSelectionRight = v46.props.NextSelectionRight,
            SelectionImageObject = v49(l_CursorKind_0.NavHighlight),
            defaultChild = v63
        }, {
            UICorner = v2.createElement("UICorner", {
                CornerRadius = UDim.new(0, l_NavCornerSize_0)
            }),
            InnerFrame = v2.createElement("Frame", {
                Size = UDim2.new(1, -l_NavButtonBorderSize_0 * 2, 1, -l_NavButtonBorderSize_0 * 2),
                Position = UDim2.fromOffset(l_NavButtonBorderSize_0, l_NavButtonBorderSize_0),
                BackgroundTransparency = 0,
                BackgroundColor3 = l_Theme_1.BackgroundUIDefault.Color,
                BorderSizePixel = 0
            }, v46:getInnerFrameChildren(v47, v48, v53, v57, v56, v52))
        });
    end;
end;
v16.renderWithProviders = function(v64, v65, v66, v67)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 0, 1, 0),
        AutomaticSize = Enum.AutomaticSize.X,
        BackgroundTransparency = 1,
        LayoutOrder = v64.props.layoutOrder,
        [v2.Ref] = v64.props.frameRef
    }, {
        Button = v64:renderButtonWithText(v65, v66, v67),
        NewItemNotification = v64.props.hasNewItemNotification and v2.createElement(v15, {
            isSelected = v64.props.isSelected
        })
    });
end;
v16.render = function(v68)
    local v69 = {
        title = v68.props.categoryTitle
    };
    if v68.props.subButtons then
        for _, v71 in v68.props.subButtons, nil, nil do
            v69[v71.Name] = v71.Title;
        end;
    end;
    return l_withLocalization_0(v69)(function(v72)
        return l_withStyle_0(function(v73)
            return l_withSelectionCursorProvider_0(function(v74)
                return v68:renderWithProviders(v72, v73, v74);
            end);
        end);
    end);
end;
return v2.forwardRef(function(v75, v76)
    return v2.createElement(v16, v6.Dictionary.join(v75, {
        forwardRef = v76
    }));
end);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Packages.React);
local v4 = require(l_CorePackages_0.Workspace.Packages.SharedFlags);
local v5 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v6 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v6.App.ImageSet.Images;
local l_IconButton_0 = v6.App.Button.IconButton;
local l_IconSize_0 = v6.App.ImageSet.Enum.IconSize;
local v10 = require(l_Modules_0.LuaApp.Components.SearchBar);
local v11 = require(l_Modules_0.LuaApp.SearchUuid);
local v12 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local l_AppPanel3D_0 = require(l_CorePackages_0.Workspace.Packages.VrCompatibility).AppPanel3D;
local l_Panel3D_0 = v6.Core.VR.Panel3D;
local v15 = require(l_Modules_0.LuaApp.Navigation.CurrentTabContext);
local v16 = require(l_Modules_0.LuaApp.Navigation.SwitchNavigatorVisibleContext);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_HeaderBar_0 = v6.App.Bar.HeaderBar;
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local v21 = require(l_Modules_0.LuaApp.Hooks.useRoactService);
local l_useStyle_0 = v6.Core.Style.useStyle;
local l_SearchTypes_0 = require(l_Modules_0.LuaApp.Constants).SearchTypes;
local v24 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local l_SegmentedControl_0 = v6.App.Control.SegmentedControl;
local v26 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local l_VR_0 = v5.VR;
local l_GetFFlagAdjustVRFloor_0 = v4.GetFFlagAdjustVRFloor;
local v29 = require(l_Modules_0.LuaApp.Actions.SetSearchParameters);
local v30 = require(l_Modules_0.LuaApp.Actions.SetSearchType);
local v31 = require(l_Modules_0.LuaApp.Analytics.Events.catalogSearchEvent);
local l_ROUNDED_CORNER_RADIUS_0 = require(l_Modules_0.LuaApp.Constants).ROUNDED_CORNER_RADIUS;
local v33 = l_Images_0["icons/navigation/pushBack"];
local v34 = l_Images_0["icons/common/search"];
local v35 = l_Images_0["icons/menu/customize"];
local v36 = l_Images_0["icons/menu/shop"];
local v37 = {
    v24.AvatarEditor,
    v24.Catalog
};
local v38 = {
    [v24.AvatarEditor] = 1,
    [v24.CatalogSearch] = 2,
    [v24.Catalog] = 2
};
local v39 = if not l_GetFFlagAdjustVRFloor_0() then l_Panel3D_0 else l_AppPanel3D_0;
return function(v40)
    local v41, v42 = v3.useState(false);
    local v43 = l_useDispatch_0();
    local v44 = v21(v26);
    local v45 = l_useStyle_0();
    local v46 = l_useLocalization_0({
        shop = "Feature.Avatar.Action.Shop",
        customize = "Feature.Catalog.Action.Customize",
        searchPlaceholder = "Search.GlobalSearch.Example.SearchCatalog"
    });
    local function v48(v47)
        return v3.createElement(l_IconButton_0, {
            layoutOrder = 1,
            size = UDim2.fromOffset(58, 58),
            icon = v33,
            iconSize = l_IconSize_0.Medium,
            iconColor3 = v45.Theme.SystemPrimaryDefault.Color,
            iconTransparency = v45.Theme.SystemPrimaryDefault.Transparency,
            backgroundColor = {
                Color = v45.Theme.BackgroundUIDefault.Color,
                Transparency = v45.Theme.BackgroundUIDefault.Transparency
            },
            showBackground = true,
            onActivated = v47
        });
    end;
    local v54 = v3.useCallback(function(v49, v50, v51)
        local v52 = v11();
        local v53 = {
            searchKeyword = v49,
            isKeywordSuggestionEnabled = true
        };
        v43(v30(v52, l_SearchTypes_0.Catalog));
        v43(v29(v52, v53));
        v31(v44, "catalog", v49, v50, v24.CatalogSearch, v51);
        v12.navigateToSearch(v40.navigation, v52, v53);
        v42(false);
    end);
    local v55 = nil;
    local v56 = nil;
    local v57 = nil;
    local v58 = nil;
    if not v41 then
        if v40.currentPage == v24.LayeredClothingSort then
            v55 = v48(function()
                v40.navigation.navigate(v24.Catalog);
            end);
            v58 = "Feature.Avatar.Title.LCSortPage";
        else
            v56 = v3.createElement(l_SegmentedControl_0, {
                layoutOrder = 2,
                selectedTabIndex = v38[v40.currentPage] or 1,
                onTabActivated = function(v59)
                    v40.navigation.navigate(v37[v59]);
                end,
                tabs = {
                    {
                        tabName = v46.customize,
                        icon = v35
                    },
                    {
                        tabName = v46.shop,
                        icon = v36
                    }
                },
                width = UDim.new(0, 350),
                height = 58
            });
            v57 = if v38[v40.currentPage] == 2 then v3.createElement(l_IconButton_0, {
                layoutOrder = 3,
                size = UDim2.fromOffset(58, 58),
                icon = v34,
                iconSize = l_IconSize_0.Medium,
                iconColor3 = v45.Theme.SystemPrimaryDefault.Color,
                iconTransparency = v45.Theme.SystemPrimaryDefault.Transparency,
                backgroundColor = {
                    Color = v45.Theme.BackgroundUIDefault.Color,
                    Transparency = v45.Theme.BackgroundUIDefault.Transparency
                },
                showBackground = true,
                onActivated = function()
                    v42(true);
                end
            }) else nil;
        end;
    else
        v56 = v3.createElement(v10, {
            Size = UDim2.new(1, 0, 1, -l_ROUNDED_CORNER_RADIUS_0),
            modernUI = true,
            cancelSearch = function()
                v42(false);
            end,
            confirmSearch = v54,
            onFocused = nil,
            onTextCleared = nil,
            isCompactView = false,
            placeholderText = v46.searchPlaceholder,
            searchType = l_SearchTypes_0.Catalog,
            autocomplete = true,
            isSearching = v41
        });
    end;
    return v3.createElement(v15.Consumer, {
        render = function(v60)
            return v3.createElement(v16.Consumer, {
                render = function(v61)
                    return v3.createElement(v39, {
                        partSize = l_VR_0.AvatarEditorNavBarSize,
                        offset = if not l_GetFFlagAdjustVRFloor_0() then CFrame.lookAt(l_VR_0.AvatarEditorNavBarPosition, l_VR_0.AvatarEditorNavBarOrientation) else l_VR_0.AvatarEditorNavBarPosition,
                        virtualScreenSize = l_VR_0.AvatarEditorNavBarResolution,
                        panelName = "AvatarNavBarVR",
                        hidden = not v61 or v60 ~= v24.AvatarExperienceRoot
                    }, {
                        RoundedFrame = v3.createElement("Frame", {
                            Size = UDim2.new(1, 0, 1, 0),
                            BackgroundTransparency = 0,
                            BackgroundColor3 = v45.Theme.BackgroundDefault.Color
                        }, {
                            UICorner = v3.createElement("UICorner", {
                                CornerRadius = UDim.new(0, l_ROUNDED_CORNER_RADIUS_0)
                            }),
                            UIPadding = v3.createElement("UIPadding", {
                                PaddingRight = UDim.new(0, l_ROUNDED_CORNER_RADIUS_0),
                                PaddingLeft = UDim.new(0, l_ROUNDED_CORNER_RADIUS_0)
                            }),
                            HeaderBar = l_withLocalization_0({
                                title = v58
                            })(function(v62)
                                return v3.createElement(l_HeaderBar_0, {
                                    backgroundTransparency = 0,
                                    barHeight = l_VR_0.AvatarEditorNavBarResolution.Y,
                                    renderLeft = if not v55 then nil else function()
                                        return v55;
                                    end,
                                    renderCenter = not not v56 and function()
                                        return v56;
                                    end or nil,
                                    renderRight = not not v57 and function()
                                        return v57;
                                    end or nil,
                                    title = not not v58 and v62.title or nil
                                });
                            end)
                        })
                    });
                end
            });
        end
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.t);
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local v6 = require(l_Modules_0.AvatarExperience.Common.Constants);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v8 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectIsPortrait);
local l_IsVRAppBuild_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).IsVRAppBuild;
local v10 = v2.PureComponent:extend("NavOverlayContainer");
v10.validateProps = v4.strictInterface({
    onAbsoluteSizeChanged = v4.optional(v4.callback),
    onAbsolutePositionChanged = v4.optional(v4.callback),
    ZIndex = v4.optional(v4.integer),
    [v2.Children] = v4.table,
    globalGuiInset = v4.strictInterface({
        left = v4.integer,
        top = v4.integer,
        right = v4.integer,
        bottom = v4.integer
    }),
    screenSize = v4.Vector2,
    isPortrait = v4.boolean
});
v10.render = function(v11)
    local l_globalGuiInset_0 = v11.props.globalGuiInset;
    local v13 = l_getSafeAreaSize_0(v11.props.screenSize, l_globalGuiInset_0);
    local v14 = UDim2.fromScale(1, 1);
    local v15 = UDim2.fromOffset(0, 0);
    if not v11.props.isPortrait then
        v14 = UDim2.fromScale(v6.LandscapeNavWidth, 1);
        v15 = UDim2.fromOffset(0, 0);
    end;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Position = if not l_IsVRAppBuild_0() then UDim2.new(0, l_globalGuiInset_0.left, 0, l_globalGuiInset_0.top) else UDim2.fromScale(0, 0),
        Size = if not l_IsVRAppBuild_0() then v13 else UDim2.fromScale(1, 1),
        ZIndex = v11.props.ZIndex
    }, {
        WidthFrame = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = v14,
            Position = v15,
            [v2.Change.AbsoluteSize] = v11.props.onAbsoluteSizeChanged,
            [v2.Change.AbsolutePosition] = v11.props.onAbsolutePositionChanged
        }, v11.props[v2.Children])
    });
end;
return v3.connect(function(v16, _)
    return {
        globalGuiInset = v16.GlobalGuiInset,
        screenSize = v16.ScreenSize,
        isPortrait = v8(v16)
    };
end, nil)(v10);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local v3 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_useNavigation_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useNavigation;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v6 = require(l_Modules_0.LuaApp.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Components.ItemsList.CatalogItemCard);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v10 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagFixWidgetGamepadLastRow);
local v11 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXItemCardRedesignIXPEnabled);
local v12 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXItemCardTallEnabled);
return (v2.forwardRef(function(v13, v14)
    local v15 = v3.useRefCache();
    local v16 = l_useNavigation_0();
    local v18 = l_useSelector_0(function(v17)
        return v17.Search.SearchesInCatalog[v13.searchUuid];
    end);
    local v19 = v3.useFocusController();
    local l_entryRowIndex_0 = v13.entryRowIndex;
    local l_row_0 = v13.row;
    local l_itemsPerRow_0 = v13.itemsPerRow;
    local l_itemSize_0 = v13.itemSize;
    local l_key_0 = v16.state.key;
    local v25 = v6.ImpressionsEvents.AvatarItems .. (not l_key_0 and "" or string.gsub(l_key_0, "[-{}]", ""));
    local v26 = v18 and v18.keyword;
    local l_Catalog_0 = v7.AnalyticsContext.Catalog;
    if v13.fromSearch then
        l_Catalog_0 = v7.AnalyticsContext.CatalogSearch;
    end;
    local v28 = {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 10)
        })
    };
    for v29, v30 in l_row_0, nil, nil do
        v28[v29] = v2.createElement("Frame", {
            Size = UDim2.fromOffset(l_itemSize_0.X, l_itemSize_0.Y),
            LayoutOrder = v29,
            BackgroundTransparency = 1
        }, {
            ["GridItemFrame" .. (l_entryRowIndex_0 - 1) * l_itemsPerRow_0 + v29] = v2.createElement(v3.Focusable.Frame, {
                Size = UDim2.fromOffset(l_itemSize_0.X, l_itemSize_0.Y),
                BackgroundTransparency = 1,
                ref = v15[v29],
                NextSelectionRight = if v29 < l_itemsPerRow_0 then v15[v29 + 1] else nil,
                NextSelectionLeft = if v29 > 1 then v15[v29 - 1] else nil,
                onFocusGained = function()
                    if v13.gamepadNavigationFocusPos:getValue().Y ~= v13.entryRowIndex then
                        return ;
                    else
                        v13.setGamepadNavigationFocusPos(Vector2.new(v29, v13.entryRowIndex));
                        if v13.onFocusGained then
                            v13.onFocusGained();
                        end;
                        return ;
                    end;
                end
            }, {
                CatalogItemCard = v2.createElement(v8, {
                    analyticsContext = l_Catalog_0,
                    analyticsItemCountPerPage = v7.PageFetchLimit,
                    index = (l_entryRowIndex_0 - 1) * l_itemsPerRow_0 + v29,
                    itemType = v30.type,
                    itemId = v30.id,
                    adTrackingData = v30.encryptedAdTrackingData,
                    isSponsoredItem = false,
                    itemDetailsPeekViewRefs = v13.itemDetailsPeekViewRefs,
                    resultsListRef = v13.gridRef,
                    impressionsTag = v25,
                    impressionsSchema = "defaultItem",
                    impressionsGroup = nil,
                    impressionsSearch = v26,
                    impressionsId = v30.id,
                    hideItemName = if not v11() then nil else v13.hideItemNames,
                    thumbailAspectRatio = if not v12() then nil else v13.thumbnailAspectRatio,
                    thumbnailScaleType = if not v12() then nil else v13.thumbnailScaleType,
                    thumbnailSize = if not v12() then nil else v13.thumbnailSize
                })
            })
        });
    end;
    return v2.createElement(v3.Focusable.Frame, {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, l_itemSize_0.Y + 11),
        ref = v14,
        NextSelectionUp = v13.NextSelectionUp,
        NextSelectionDown = v13.NextSelectionDown,
        NextSelectionRight = v13.NextSelectionRight,
        onFocusGained = function()
            v13.setGamepadNavigationFocusPos(Vector2.new(v13.gamepadNavigationFocusPos:getValue().X, v13.entryRowIndex));
            local l_X_0 = v13.gamepadNavigationFocusPos:getValue().X;
            v19.moveFocusTo(if not v10() then v15[l_X_0] else v15[math.min(l_X_0, #l_row_0)]);
        end
    }, v28);
end));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_CorePackages_0.Workspace.Packages.SharedFlags);
local v5 = require(l_CorePackages_0.Promise);
local v6 = require(l_CorePackages_0.Cryo);
local v7 = require(l_CorePackages_0.Roact);
local l_withNavigationFocus_0 = require(l_CorePackages_0.RoactNavigation).withNavigationFocus;
local v9 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v9.Focusable;
local v11 = require(l_CorePackages_0.Packages.t);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.Debug.NavigationEventsLogger);
local v14 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local v15 = require(l_Modules_0.AvatarExperience.Common.Debug.LogTree).logger("ax.gamepad");
local l_isGamepadInput_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).isGamepadInput;
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.BoundInputsUpdater);
local v18 = require(l_Modules_0.AvatarExperience.Common.Components.GamepadFocusRecovery);
local v19 = require(l_Modules_0.AvatarExperience.Common.Components.AvatarVRPanelWrapper);
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreenProperties);
local l_IsVRAppBuild_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).IsVRAppBuild;
local l_GetFFlagLuafiedReportEntryPoints_0 = v4.GetFFlagLuafiedReportEntryPoints;
local v23 = v7.PureComponent:extend("OverlayFocusHandler");
v23.validateProps = v11.strictInterface({
    overlayComponent = v11.union(v11.table, v11.callback),
    arguments = v11.table,
    navigation = v11.table,
    isFocused = v11.boolean
});
v23.init = function(v24)
    v24:setState({
        gamepadFocused = false,
        lastInputIsGamepad = l_isGamepadInput_0((l_UserInputService_0:GetLastInputType()))
    });
    v24.mounted = false;
    v24.focusController = v9.createFocusController();
    v24.defaultChildRef = v7.createRef();
    v24.onFocusChanged = function(v25)
        if v24.mounted then
            v24:setState({
                gamepadFocused = v25
            });
        end;
    end;
    v24.closePrompt = function()
        v14.closeOverlay(v24.props.navigation);
    end;
end;
v23.didMount = function(v26)
    v26.mounted = true;
    v26:handleUpdate(v6.Dictionary.join(v26.props, {
        isFocused = false
    }), v26.state);
end;
v23.willUnmount = function(v27)
    v27.mounted = false;
end;
v23.didUpdate = function(v28, v29, v30)
    v28:handleUpdate(v29, v30);
end;
v23.cancelCaptureFocus = function(v31)
    if v31.captureFocusPromise then
        v31.captureFocusPromise:cancel();
        v31.captureFocusPromise = nil;
    end;
end;
v23.captureFocusAfterDelay = function(v32, v33)
    v32:cancelCaptureFocus();
    v32.captureFocusPromise = v5.delay(v33):andThen(v32.focusController.captureFocus);
end;
v23.handleUpdate = function(v34, v35, v36)
    local l_lastInputIsGamepad_0 = v34.state.lastInputIsGamepad;
    local l_lastInputIsGamepad_1 = v36.lastInputIsGamepad;
    local v39 = l_lastInputIsGamepad_0 and v34.props.isFocused;
    local v40 = not l_lastInputIsGamepad_1 and l_lastInputIsGamepad_0;
    local v41 = l_lastInputIsGamepad_1 and not l_lastInputIsGamepad_0;
    local v42 = not v35.isFocused and v34.props.isFocused;
    if not v39 or not v42 and not v40 then
        if v41 then
            v15:trace("releaseFocus [Overlay]");
            v34.focusController.releaseFocus();
        end;
        return ;
    else
        v15:trace("captureFocus [Overlay], navigatedToPage: {}, acquiredGamepadInput: {}", v42, v40);
        v34.focusController.captureFocus();
        return ;
    end;
end;
v23.getChildren = function(v43)
    local l_overlayComponent_0 = v43.props.overlayComponent;
    local l_arguments_0 = v43.props.arguments;
    return {
        NavigationEventsLogger = v7.createElement(v13, {
            pageName = "[Overlay]"
        }),
        LastInputTypeChangedConnection = v7.createElement(l_ExternalEventConnection_0, {
            event = l_UserInputService_0.LastInputTypeChanged,
            callback = function(v46)
                local v47 = l_isGamepadInput_0(v46);
                if v47 ~= v43.state.lastInputIsGamepad then
                    v43:setState({
                        lastInputIsGamepad = v47
                    });
                end;
            end
        }),
        BoundInputsUpdater = if not l_IsVRAppBuild_0() then v7.createElement(v17) else nil,
        GamepadFocusRecovery = v7.createElement(v18, {
            focusController = v43.focusController,
            isGamepadInput = v43.state.lastInputIsGamepad,
            debugName = "[Overlay]"
        }),
        OverlayScreen = v7.createElement(l_overlayComponent_0, if not l_arguments_0.focusController then v6.Dictionary.join(l_arguments_0, {
            defaultChildRef = v43.defaultChildRef,
            focusController = v43.focusController
        }) else v6.Dictionary.join(l_arguments_0, {
            defaultChildRef = v43.defaultChildRef
        }))
    };
end;
v23.render = function(v48)
    if not l_IsVRAppBuild_0() then
        return v7.createElement(l_Focusable_0.Frame, {
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = 1,
            focusController = v48.focusController,
            onFocusChanged = v48.onFocusChanged,
            defaultChild = v48.defaultChildRef,
            inputBindings = {
                closePrompt = v9.Input.onBegin(Enum.KeyCode.ButtonB, v48.closePrompt)
            }
        }, v48:getChildren());
    else
        local l_routeName_0 = v48.props.navigation.state.routeName;
        return v7.createElement(v19, {
            panelPlacement = v20[l_routeName_0].VRPanelPlacement,
            roundedCornersFrame = not not l_GetFFlagLuafiedReportEntryPoints_0() and v20[l_routeName_0].VRPanelRoundedCorners
        }, v48:getChildren());
    end;
end;
return l_withNavigationFocus_0(v23);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.t);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetAvatarType);
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.ToggleEquipAsset);
local v14 = require(l_Modules_0.AvatarExperience.Common.Constants);
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local v17 = v2.PureComponent:extend("R15UpgradePrompt");
v17.validateProps = v4.strictInterface({
    bodyTextKey = v4.string,
    onSwitchSelected = v4.optional(v4.callback),
    onOverlayClosed = v4.optional(v4.callback),
    onOverlayClosedPostClose = v4.optional(v4.callback),
    defaultChildRef = v4.optional(v4.table),
    focusController = v4.optional(v4.table),
    navigation = v4.table,
    screenSize = v4.Vector2,
    setAvatarType = v4.callback,
    toggleEquipAsset = v4.callback
});
v17.init = function(v18)
    v18.switchToR15 = function()
        v18.props.setAvatarType(v14.AvatarType.R15);
        if v18.props.onSwitchSelected then
            v18.props.onSwitchSelected();
        end;
        v18.closePrompt();
    end;
    v18.closePrompt = function()
        v7.closeOverlay(v18.props.navigation);
        if v18.props.onOverlayClosedPostClose then
            v18.props.onOverlayClosedPostClose();
        end;
    end;
end;
v17.renderLocalized = function(v19, v20)
    return v2.createElement(l_InteractiveAlert_0, {
        title = v20.titleText,
        bodyText = v20.bodyText,
        buttonStackInfo = {
            buttons = {
                {
                    props = {
                        onActivated = v19.closePrompt,
                        text = v20.cancelButtonText
                    },
                    isDefaultChild = true
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v19.switchToR15,
                        text = v20.confirmButtonText
                    }
                }
            }
        },
        position = UDim2.fromScale(0.5, 0.5),
        screenSize = v19.props.screenSize,
        defaultChildRef = v19.props.defaultChildRef
    });
end;
v17.render = function(v21)
    return l_withLocalization_0({
        titleText = "Feature.Avatar.Label.SwitchToR15",
        bodyText = v21.props.bodyTextKey,
        confirmButtonText = "Feature.Avatar.Action.Switch",
        cancelButtonText = "Feature.Avatar.Action.Cancel"
    })(function(v22)
        return v21:renderLocalized(v22);
    end);
end;
return (v11((v10((v3.connect(function(v23, _)
    return {
        screenSize = v23.ScreenSize
    };
end, function(v25)
    return {
        setAvatarType = function(v26)
            v25(v12(v26));
        end,
        toggleEquipAsset = function(v27, v28, v29)
            v25(v13(v27, v28, v29));
        end
    };
end)(v17))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.Cryo);
local v3 = require(l_CorePackages_0.Packages.React);
local v4 = require(l_CorePackages_0.Packages.RoactGamepad);
local v5 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreenProperties);
local v6 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v8 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v9 = require(l_Modules_0.AvatarExperience.Common.Hooks.useAvatarRoute);
local l_useNavigation_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useNavigation;
local l_useNavigationFocus_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.useNavigationFocus;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v13 = require(l_Modules_0.LuaApp.Hooks.useAppPolicy);
local v14 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectIsPortrait);
local l_selectTopBarHeight_0 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar).selectTopBarHeight;
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.Refinement.RefinementEntryButton);
local v17 = require(l_Modules_0.AvatarExperience.LayeredClothingSort.Components.AvatarRefinementButtons);
local v18 = require(l_Modules_0.AvatarExperience.UniversalAppCamera.Components.UniversalAppCameraToggle);
local v19 = require(l_Modules_0.AvatarExperience.Common.Components.AXProfilePictureQuickButton);
local l_IsVRAppBuild_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).IsVRAppBuild;
local v21 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
local v22 = require(l_Modules_0.AvatarExperience.Flags.AXAlternateLandingPageIXP);
local v23 = require(l_Modules_0.AvatarExperience.Flags.UniversalAppCameraIXPTest);
local v24 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAccessoryAdjustmentEnabled);
local function v26(v25)
    return v3.createElement(v19, {
        isUIFullView = v25.isUIFullView,
        isSceneFullView = v25.isSceneFullView,
        layoutOrder = v25.layoutOrder,
        ref = v25.profilePictureButtonRef,
        NextSelectionLeft = v25.NextSelectionLeft,
        NextSelectionDown = v25.refinementButtonsRef
    });
end;
local function v33(v27)
    local v28 = v9();
    local v29 = nil;
    if not v24() then
        v29 = true;
    else
        local v30 = v5[v28.opaque.name];
        v29 = not not v30 and not v30.isRefinementPage;
    end;
    local v31 = v21.useTestVariables(v22.EnabledForUser);
    local l_v29_0 = v29;
    if l_v29_0 then
        if not v24() then
            l_v29_0 = v3.createElement(v4.Focusable[v17], {
                isUIFullView = v27.isUIFullView,
                isSceneFullView = v27.isSceneFullView,
                layoutOrder = v27.layoutOrder,
                ref = v27.refinementButtonsRef,
                NextSelectionUp = if not v31 then nil else v27.profilePictureButtonRef,
                NextSelectionLeft = v27.NextSelectionLeft
            });
        else
            return (v3.createElement(v16, {
                layoutOrder = v27.layoutOrder,
                ref = v27.refinementButtonsRef,
                NextSelectionUp = if not v31 then nil else v27.profilePictureButtonRef,
                NextSelectionLeft = v27.NextSelectionLeft
            }));
        end;
    end;
    return l_v29_0;
end;
local function v35(v34)
    if not v21.useTestVariables(v23.EnabledForUser) or l_IsVRAppBuild_0() then
        return nil;
    else
        return (v3.createElement(v18, {
            isUIFullView = v34.isUIFullView,
            isSceneFullView = v34.isSceneFullView,
            layoutOrder = v34.layoutOrder
        }));
    end;
end;
return (v3.forwardRef(function(v36, v37)
    local v38 = v9();
    local v39 = v7.isAvatarSceneButtonsVisible(v38, l_useNavigationFocus_0(), v36.isUIFullView, v36.isSceneFullView, (l_useNavigation_0()));
    local v41 = v13(function(v40)
        return v40.getAllowCameraMovements();
    end);
    local v42 = l_useSelector_0(v14);
    local v43 = l_useSelector_0(l_selectTopBarHeight_0);
    local v44 = if not v42 then v6.LandscapeNavWidth else 0;
    local l_name_0 = v38.opaque.name;
    local v46 = v21.useTestVariables(v22.EnabledForUser);
    local v47 = v3.useRef(nil);
    local v48 = v3.useRef(nil);
    return v3.createElement(v4.Focusable.Frame, {
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1,
        Position = UDim2.new(v44, 24, 0, v43 + 4),
        Size = UDim2.fromOffset(44, 0),
        Visible = v39,
        ref = v37,
        defaultChild = if not not v46 and (not (l_name_0 ~= v8.AvatarEditor) or l_name_0 == v8.Catalog) then v47 else v48
    }, {
        UIListLayout = v3.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 4)
        }),
        ProfilePictureButton = if not not v46 and v41 then v3.createElement(v26, v2.Dictionary.join(v36, {
            layoutOrder = 1,
            profilePictureButtonRef = v47,
            refinementButtonsRef = v48
        })) else nil,
        RefinementEntryButton = v3.createElement(v33, v2.Dictionary.join(v36, {
            layoutOrder = 2,
            profilePictureButtonRef = v47,
            refinementButtonsRef = v48
        })),
        UniversalAppCameraButton = v3.createElement(v35, v2.Dictionary.join(v36, {
            layoutOrder = 3
        }))
    });
end));