local l_CorePackages_0 = game:GetService("CorePackages");
local l_CoreGui_0 = game:GetService("CoreGui");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_CorePackages_0.Packages.RoactGamepad);
local v8 = require(l_CorePackages_0.FitFrame);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_Focusable_0 = v7.Focusable;
local l_FitFrameVertical_0 = v8.FitFrameVertical;
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_GridMetrics_0 = v6.App.Grid.GridMetrics;
local l_ItemTile_0 = v6.Tile.ItemTile;
local l_ItemTileEnums_0 = v6.Tile.ItemTileEnums;
local l_withStyle_0 = v6.Style.withStyle;
local l_EmptyState_0 = v6.App.Indicator.EmptyState;
local l_Images_0 = v6.App.ImageSet.Images;
local v20 = require(l_Modules_0.LuaApp.Components.RefreshScrollingFrameWithLoadMore);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v22 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v24 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v25 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v26 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v27 = require(l_Modules_0.AvatarExperience.Common.Components.LoadableGridView);
local v28 = require(l_CorePackages_0.Workspace.Packages.UserLib);
local l_Constants_0 = v28.Utils.Constants;
local l_getRbxthumbWithTypeSizeAndOptions_0 = v28.Utils.getRbxthumbWithTypeSizeAndOptions;
local v31 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GetEditableOutfits);
local v32 = require(l_Modules_0.AvatarExperience.Flags.GetAXDisableBundleIcon);
local v33 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXEnableOutfitAttribution);
local v34 = l_Images_0["icons/navigation/pushBack"];
local v35 = l_GridMetrics_0.makeCustomMetricsGetter(v25.ItemsGridMetrics);
local v36 = v3.PureComponent:extend("OutfitSelectionGrid");
v36.validateProps = v5.strictInterface({
    onToggleOutfitCard = if not v33 then nil else v5.optional(v5.callback),
    selectedOutfits = v5.array(v5.string),
    selectionUpdated = v5.callback,
    canScrollUpdated = v5.optional(v5.callback),
    multiSelect = v5.optional(v5.boolean),
    goBack = v5.callback,
    pageOwner = v5.string,
    NextSelectionLeft = v5.optional(v5.table),
    NextSelectionRight = v5.optional(v5.table),
    NextSelectionUp = v5.optional(v5.table),
    NextSelectionDown = v5.optional(v5.table),
    forwardRef = v5.table,
    networking = v5.callback,
    showCustomOutfitNames = v5.boolean,
    outfitInfos = v5.table,
    editableOwnedOutfitIds = v5.array(v5.string),
    screenSize = v5.Vector2,
    hasMoreItems = v5.boolean,
    getEditableOutfits = v5.callback
});
v36.defaultProps = {
    multiSelect = false
};
v36.getItemIconType = function(v37, v38)
    local l_outfitInfos_0 = v37.props.outfitInfos;
    local v40 = l_outfitInfos_0 and l_outfitInfos_0[v38];
    if not v40 then
        if not v32() then
            return l_ItemTileEnums_0.ItemIconType.Bundle;
        else
            return nil;
        end;
    else
        return v24.getItemIconTypeFromOutfit(v40);
    end;
end;
v36.init = function(v41)
    v41.loadableGridViewRef = v3.createRef();
    v41.emptyStateRef = v3.createRef();
    local v42 = 0;
    local v43 = 0;
    local function _()
        if v41.props.canScrollUpdated then
            v41.props.canScrollUpdated(v42 < v43 + (v25.ItemsGridTopPadding + v25.ItemsGridBottomPadding));
        end;
    end;
    v41.absoluteSizeChanged = function(v45)
        v42 = v45.AbsoluteSize.Y;
        if v41.props.canScrollUpdated then
            v41.props.canScrollUpdated(v42 < v43 + (v25.ItemsGridTopPadding + v25.ItemsGridBottomPadding));
        end;
    end;
    v41.contentSizeChanged = function(v46)
        v43 = v46.AbsoluteContentSize.Y;
        if v41.props.canScrollUpdated then
            v41.props.canScrollUpdated(v42 < v43 + (v25.ItemsGridTopPadding + v25.ItemsGridBottomPadding));
        end;
    end;
    v41.loadMoreItems = function()
        return v41.props.getEditableOutfits(v41.props.networking);
    end;
end;
v36.renderItem = function(v47, v48)
    if typeof(v48) == "table" then
        v48 = nil;
    end;
    local v49 = v2.List.find(v47.props.selectedOutfits, v48) ~= nil;
    local function v51()
        if not v47.props.multiSelect then
            if not v49 then
                v47.props.selectionUpdated({
                    v48
                });
                if not (not v33 or not v47.props.onToggleOutfitCard) then
                    v47.props.onToggleOutfitCard(true, v48);
                end;
            else
                v47.props.selectionUpdated({});
                if not (not v33 or not v47.props.onToggleOutfitCard) then
                    v47.props.onToggleOutfitCard(false);
                    return ;
                end;
            end;
            return ;
        else
            local _ = nil;
            v47.props.selectionUpdated(if not v49 then v2.List.join(v47.props.selectedOutfits, {
                v48
            }) else v2.List.removeValue(v47.props.selectedOutfits, v48));
            return ;
        end;
    end;
    local v52 = nil;
    local v53 = nil;
    if v48 then
        local v54 = v47.props.outfitInfos[tostring(v48)];
        v52 = not not v54 and v54.name or nil;
        v53 = l_getRbxthumbWithTypeSizeAndOptions_0(v48, l_Constants_0.RbxthumbTypes.Outfit, 150);
        if v54 then
            v53 = v53 .. "&filters=" .. v54.updateCounter;
        end;
    end;
    local l_ItemTileTitleMaxLines_0 = v26.ItemTileTitleMaxLines;
    if not v47.props.showCustomOutfitNames then
        l_ItemTileTitleMaxLines_0 = 0;
    end;
    return v3.createElement(l_Focusable_0[l_ItemTile_0], {
        isSelected = v49,
        multiSelect = v47.props.multiSelect,
        itemIconType = v47:getItemIconType(v48),
        onActivated = v51,
        name = v52,
        titleTextLineCount = l_ItemTileTitleMaxLines_0,
        thumbnail = v53,
        inputBindings = {
            ToggleSelect = v7.Input.onBegin(Enum.KeyCode.ButtonA, v51, {
                key = not v49 and "Feature.Avatar.Action.Select" or "Feature.Avatar.Action.Unselect"
            })
        }
    });
end;
v36.renderWithProviders = function(v56, v57, v58)
    local v59 = v56.props.hasMoreItems and #v56.props.editableOwnedOutfitIds == 0;
    local v60 = not v59 and v56.props.editableOwnedOutfitIds or nil;
    local v61 = not not v60 and #v60 or v26.ShimmerCardsToDisplay;
    local v62 = v61 > 0;
    local l_Font_0 = v57.Font;
    local v64 = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize;
    local v65 = nil;
    v65 = if not v56.props.showCustomOutfitNames then v24.GridItemHeightGetter(v26.ItemTileType.BundleItemTileNoText) else v24.GridItemHeightGetter(v26.ItemTileType.BundleItemTile, v64);
    local _ = nil;
    return v3.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1),
        [v3.Change.AbsoluteSize] = v56.absoluteSizeChanged,
        NextSelectionLeft = v56.props.NextSelectionLeft,
        NextSelectionRight = v56.props.NextSelectionRight,
        NextSelectionDown = v56.props.NextSelectionDown,
        NextSelectionUp = v56.props.NextSelectionUp,
        [v3.Ref] = v56.props.forwardRef,
        defaultChild = if not v62 then v56.emptyStateRef else v56.loadableGridViewRef,
        restorePreviousChildFocus = true
    }, {
        RefreshScrollingFrameWithLoadMore = v62 and v3.createElement(v20, {
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(0, 0),
            Size = UDim2.fromScale(1, 1),
            CanvasSize = UDim2.fromScale(1, 0),
            onLoadMore = v56.props.hasMoreItems and v56.loadMoreItems,
            hasMoreRows = v56.props.hasMoreItems,
            createEndOfScrollElement = false,
            parentAppPage = v56.props.pageOwner,
            initializing = v59
        }, {
            UIListLayout = v3.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                [v3.Change.AbsoluteContentSize] = v56.contentSizeChanged
            }),
            ListWrapper = v3.createElement(l_FitFrameVertical_0, {
                width = UDim.new(1, 0),
                LayoutOrder = 1,
                BackgroundTransparency = 1,
                margin = {
                    top = v25.ItemsGridTopPadding,
                    bottom = v25.ItemsGridBottomPadding,
                    left = v25.ItemsGridSidePadding / 2,
                    right = v25.ItemsGridSidePadding / 2
                }
            }, {
                LoadableGridView = v3.createElement(v27, {
                    getItemMetrics = v35,
                    items = v60,
                    totalNumItems = v61,
                    renderItem = function(v67)
                        return v56:renderItem(v67);
                    end,
                    getItemHeight = v65,
                    windowHeight = v56.props.screenSize.Y,
                    [v3.Ref] = v56.loadableGridViewRef
                })
            })
        }),
        EmptyState = not v62 and v3.createElement(l_EmptyState_0, {
            buttonIcon = v34,
            onActivated = v56.props.goBack,
            text = v58.noItemsLabel:gsub("({itemType})", v58.itemType),
            [v3.Ref] = v56.emptyStateRef
        })
    });
end;
v36.render = function(v68)
    return l_withStyle_0(function(v69)
        return l_withLocalization_0({
            itemType = "Feature.Catalog.Label.Characters",
            noItemsLabel = "Feature.Avatar.Label.NoItems"
        })(function(v70)
            return v68:renderWithProviders(v69, v70);
        end);
    end);
end;
v36.didMount = function(v71)
    if v71.props.hasMoreItems then
        v71.props.getEditableOutfits(v71.props.networking);
    end;
end;
v36.didUpdate = function(v72, v73, _)
    if not (not (v72.props.multiSelect ~= v73.multiSelect) or v72.props.multiSelect) then
        v72.props.selectionUpdated({});
    end;
    local v75 = v72.props.editableOwnedOutfitIds ~= v73.editableOwnedOutfitIds;
    local v76 = v72.props.selectedOutfits ~= v73.selectedOutfits;
    if not (not v75 and not v76) then
        local v77 = {};
        local v78 = false;
        for _, v80 in v72.props.selectedOutfits, nil, nil do
            if not v2.List.find(v72.props.editableOwnedOutfitIds, v80) then
                v78 = true;
            else
                v77[#v77 + 1] = v80;
            end;
        end;
        if v78 then
            v72.props.selectionUpdated(v77);
        end;
    end;
end;
v36 = v4.connect(function(v81, _)
    return {
        editableOwnedOutfitIds = v81.AvatarExperience.AvatarEditor.Character.OwnedItemIdsBySubtype[v25.EditableCharacterKey] or {},
        outfitInfos = v81.AvatarExperience.AvatarEditor.OutfitInfos,
        screenSize = v81.ScreenSize,
        hasMoreItems = not v81.AvatarExperience.AvatarEditor.PageFinished[v25.EditableCharacterKey]
    };
end, function(v83)
    return {
        getEditableOutfits = function(v84)
            return v83(v31(v84));
        end
    };
end)((l_RoactAppPolicy_0.connect(function(v85, _)
    return {
        showCustomOutfitNames = v85.getCustomOutfitNames()
    };
end)((l_RoactServices_0.connect({
    networking = v22
})(v36)))));
return v3.forwardRef(function(v87, v88)
    return v3.createElement(v36, v2.Dictionary.join(v87, {
        forwardRef = v88
    }));
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_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v6 = require(l_CorePackages_0.Packages.RoactGamepad);
local v7 = require(l_CorePackages_0.UIBlox);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v9 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withStackVisibilityWrapper);
local v12 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.BoundInputsUpdater);
local v14 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.AssetManagement.NavOverlayPageContainer);
local v15 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.AssetManagement.OutfitSelectionGrid);
local v16 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.UpdateSavedOutfit);
local l_Images_0 = v7.App.ImageSet.Images;
local l_ActionBar_0 = v7.App.Button.ActionBar;
local l_withStyle_0 = v7.Style.withStyle;
local l_IconButton_0 = v7.App.Button.IconButton;
local l_IconSize_0 = v7.App.ImageSet.Enum.IconSize;
local l_Focusable_0 = v6.Focusable;
local v23 = l_Images_0["icons/navigation/close"];
local v24 = v2.PureComponent:extend("UpdateOutfitPage");
v24.validateProps = v4.strictInterface({
    focusController = v4.optional(v4.table),
    navigation = v4.table,
    avatarRoute = v4.table,
    networking = v4.callback,
    avatarEditorAnalytics = v4.table,
    updateSavedOutfit = v4.callback
});
v24.init = function(v25)
    v25:setState({
        selectedOutfit = nil
    });
    v25.focusController = v25.props.focusController or v6.createFocusController();
    v25.exitButtonRef = v2.createRef();
    v25.gridViewRef = v2.createRef();
    v25.actionBarRef = v2.createRef();
    v25.navigateBack = function()
        v25.props.navigation.goBack();
    end;
    v25.selectedOutfitUpdated = function(v26)
        v25:setState({
            selectedOutfit = v26[1] or v2.None
        });
    end;
    v25.updateOutfit = function()
        if v25.state.selectedOutfit then
            v25.props.updateSavedOutfit(v25.props.networking, v25.props.avatarEditorAnalytics, v25.state.selectedOutfit);
            v25.navigateBack();
            return ;
        else
            return ;
        end;
    end;
    v25.renderExitButton = function()
        return l_withStyle_0(function(v27)
            local l_Theme_0 = v27.Theme;
            return v2.createElement(l_IconButton_0, {
                size = UDim2.new(0, 44, 1, 0),
                icon = v23,
                iconSize = l_IconSize_0.Medium,
                iconColor3 = l_Theme_0.SystemPrimaryDefault.Color,
                iconTransparency = l_Theme_0.SystemPrimaryDefault.Transparency,
                onActivated = v25.navigateBack,
                buttonRef = v25.exitButtonRef,
                NextSelectionDown = v25.gridViewRef
            });
        end);
    end;
end;
v24.renderWithProviders = function(v29, v30, v31)
    local l_Theme_1 = v31.Theme;
    return v2.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1),
        focusController = v29.focusController,
        defaultChild = v29.gridViewRef,
        inputBindings = {
            NavigateBack = v6.Input.onBegin(Enum.KeyCode.ButtonB, v29.navigateBack),
            Update = if not v29.state.selectedOutfit then nil else v6.Input.onBegin(Enum.KeyCode.ButtonX, v29.updateOutfit, {
                key = "Feature.Avatar.Action.Update"
            })
        }
    }, {
        BoundInputsUpdater = v2.createElement(v13),
        NavOverlayPageContainer = v2.createElement(v14, {
            headerBarProps = {
                title = v30.selectToUpdate,
                renderLeft = v29.renderExitButton
            },
            focusController = v29.focusController,
            onDismiss = v29.navigateBack
        }, {
            OutfitSelectionGrid = v2.createElement(v15, {
                selectedOutfits = {
                    v29.state.selectedOutfit
                },
                selectionUpdated = v29.selectedOutfitUpdated,
                goBack = v29.navigateBack,
                pageOwner = v12.UpdateOutfitPage,
                NextSelectionUp = v29.exitButtonRef,
                NextSelectionDown = v29.actionBarRef,
                [v2.Ref] = v29.gridViewRef
            }),
            ActionBarBackgroundGapFiller = v29.state.selectedOutfit ~= nil and v2.createElement("Frame", {
                BackgroundColor3 = l_Theme_1.BackgroundDefault.Color,
                BackgroundTransparency = l_Theme_1.BackgroundDefault.Transparency,
                BorderSizePixel = 0,
                Position = UDim2.fromScale(0, 1),
                AnchorPoint = Vector2.new(0, 1),
                Size = UDim2.new(1, 0, 0, 48),
                ZIndex = 2
            }) or nil,
            ActionBarContainer = v29.state.selectedOutfit ~= nil and v2.createElement("Frame", {
                Size = UDim2.fromScale(1, 1),
                BackgroundTransparency = 1,
                ZIndex = 3
            }, {
                ActionBar = v2.createElement(l_ActionBar_0, {
                    button = {
                        props = {
                            text = v30.update,
                            onActivated = v29.updateOutfit
                        }
                    },
                    NextSelectionUp = v29.gridViewRef,
                    [v2.Ref] = v29.actionBarRef
                })
            }) or nil
        })
    });
end;
v24.render = function(v33)
    return l_withLocalization_0({
        selectToUpdate = "Feature.Avatar.Heading.SelectToUpdate",
        update = "Feature.Avatar.Action.Update"
    })(function(v34)
        return l_withStyle_0(function(v35)
            return v33:renderWithProviders(v34, v35);
        end);
    end);
end;
return (v11((v3.connect(nil, function(v36)
    return {
        updateSavedOutfit = function(v37, v38, v39)
            v36(v16(v37, v38, v39));
        end
    };
end)((l_RoactServices_0.connect({
    networking = v9,
    avatarEditorAnalytics = v10
})(v24))))));


local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.RoactGamepad);
local v6 = require(l_CorePackages_0.Packages.React);
local l_Focusable_0 = v5.Focusable;
local v8 = require(l_CorePackages_0.Cryo);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v10 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v11 = require(l_Modules_0.LuaApp.AppPage);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v14 = require(l_Modules_0.AvatarExperience.Common.Services.Analytics);
local v15 = require(l_Modules_0.AvatarExperience.Catalog.Services.Analytics);
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.AvatarExperienceView);
local v17 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.AvatarNavigationItemsView);
local v18 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar);
local v19 = require(l_Modules_0.AvatarExperience.Common.Components.TopBar.ManageButton);
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.TopBar.makeTitleDropDown);
local v21 = require(l_Modules_0.AvatarExperience.Common.Components.AXTransitionSegmentedMenu);
local v22 = require(l_Modules_0.AvatarExperience.Common.Components.TopBar.makeAvatarBackButton);
local v23 = require(l_Modules_0.AvatarExperience.Common.Components.GamepadFocusHandlerForPage);
local v24 = require(l_Modules_0.AvatarExperience.Common.Components.BoundInputsUpdater);
local v25 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.Debug.NavigationEventsLogger);
local v26 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withStackVisibilityWrapper);
local v27 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local l_PeekViewState_0 = require(l_CorePackages_0.Workspace.Packages.PeekView).PeekViewState;
local v29 = require(l_Modules_0.AvatarExperience.Common.Actions.SetItemDetailsPeekViewState);
local v30 = require(l_Modules_0.AvatarExperience.Common.Thunks.OpenItemPrompt);
local v31 = require(l_Modules_0.AvatarExperience.Common.Thunks.SetFullView);
local v32 = require(l_Modules_0.AvatarExperience.Common.Enum.FullView);
local v33 = require(l_Modules_0.AvatarExperience.Common.Thunks.OpenQuickMenu);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_isGamepadInput_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).isGamepadInput;
local v37 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectIsPortrait);
local v38 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectIsFullView);
local v39 = require(l_Modules_0.LuaApp.Navigation.AndroidBackButtonConnection);
local v40 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.Utils.isAvatarRouteVisible);
local v41 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v42 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
local v43 = require(l_Modules_0.AvatarExperience.Flags.AXAlternateLandingPageIXP);
local v44 = require(l_Modules_0.AvatarExperience.Flags.AXAndroidBackButtonIXPTest);
local v45 = require(l_Modules_0.AvatarExperience.Catalog.Components.OnFocusExposureLogger);
local v46 = require(l_Modules_0.AvatarExperience.Common.Hooks.useAvatarExperienceFocusNavigationBindings);
local v47 = require(l_Modules_0.AvatarExperience.Common.Hooks.useOverlayClosedCallback);
local v48 = require(l_Modules_0.AvatarExperience.Flags.UniversalAppCameraIXPTest);
local v49 = require(l_Modules_0.AvatarExperience.Flags.ColorPickerSliderIXPTest);
local v50 = require(l_Modules_0.AvatarExperience.Flags.AvatarMarketplaceBackendIXPTests);
local l_FFlagAvatarAndroidBackButton_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagAvatarAndroidBackButton;
local l_IsVRAppBuild_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).IsVRAppBuild;
local v53 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXRemoveYButtonCatalogPage);
local v54 = v3.PureComponent:extend("AvatarEditorPage");
v54.init = function(v55)
    v55.topBarRef = v3.createRef();
    v55.sceneUIContainerRef = v3.createRef();
    v55.refinementButtonsRef = v3.createRef();
    v55.quickButtonsRef = v3.createRef();
    v55:setState({
        lastInputIsGamepad = l_isGamepadInput_0((l_UserInputService_0:GetLastInputType()))
    });
    v55.changeView = function()
        v55.props.setFullView(v55.props.avatarExperienceAnalytics, v55.props.avatarRoute.opaque.name, (v41.getNewFullViewEnum(v55.props.fullView)));
    end;
    v55.defaultChildRef = v3.createRef();
    v55.onBackFromTopBar = function()
        v55.props.navigation.navigate(if v55.props.shouldSkipLandingPage or v55.props.alternateAvatarLandingScreenEnabled then v11.Home else v13.AvatarExperienceLandingPage);
    end;
    v55.lastInputTypeChangedCallback = function(v56)
        local v57 = l_isGamepadInput_0(v56);
        if v57 ~= v55.state.lastInputIsGamepad then
            v55:setState({
                lastInputIsGamepad = v57
            });
        end;
    end;
    v55.titleDropDown = v20("Feature.Catalog.Action.Customize", v55.props.overlayClosedCallback);
    v55.backButton = v22(v55.onBackFromTopBar);
end;
v54.getInputBindings = function(v58)
    local l_avatarRoute_0 = v58.props.avatarRoute;
    local l_name_0 = l_avatarRoute_0.current.name;
    local v61 = {};
    if l_name_0 == v13.ItemDetails then
        v61 = v8.Dictionary.join(v61, {
            NavigateBack = v5.Input.onBegin(Enum.KeyCode.ButtonB, function()
                v27.closeFocusedScreen(v58.props.navigation);
            end),
            OpenItemPrompt = v5.Input.onBegin(Enum.KeyCode.ButtonX, function()
                v58.props.openItemPrompt(v58.props.networking, v58.props.catalogAnalytics, v58.props.overlayClosedCallback, v58.props.navigation, l_avatarRoute_0);
            end, {
                key = "Feature.Catalog.Action.Buy"
            }),
            OpenClosePeekView = if v53() then nil else v5.Input.onBegin(Enum.KeyCode.ButtonY, function()
                if not v58.props.itemDetailsExpanded then
                    v58.props.setItemDetailsPeekViewState(l_PeekViewState_0.Full);
                    return ;
                else
                    v58.props.setItemDetailsPeekViewState(l_PeekViewState_0.Brief);
                    return ;
                end;
            end, {
                key = not v58.props.itemDetailsExpanded and "Feature.Catalog.Action.OpenDetails" or "Feature.Catalog.Action.CloseDetails"
            }),
            OpenCatalogContextMenu = v5.Input.onBegin(Enum.KeyCode.ButtonL3, function()
                v58.props.navigation.navigate(v13.CatalogContextMenu, {
                    itemId = l_avatarRoute_0.current.params.itemId,
                    itemType = l_avatarRoute_0.current.params.itemType,
                    onOverlayClosed = v58.props.overlayClosedCallback
                });
            end, {
                key = "Feature.Catalog.Action.ItemOptions"
            })
        });
    end;
    return v61;
end;
if l_FFlagAvatarAndroidBackButton_0 then
    v54.didMount = function(v62)
        if not ((not v62.props.shouldSkipLandingPage and not v62.props.alternateAvatarLandingScreenEnabled or not v62.props.axAndroidBackButtonEnabled) or not v40(v62.props)) then
            v62.props.androidBackButtonConnection.connect(v62.onBackFromTopBar);
        end;
    end;
    v54.willUnmount = function(v63)
        v63.props.androidBackButtonConnection.disconnect();
    end;
    v54.didUpdate = function(v64, v65)
        if not (not v64.props.shouldSkipLandingPage and not v64.props.alternateAvatarLandingScreenEnabled) then
            if (not v64.props.axAndroidBackButtonEnabled or v40(v65)) or not v40(v64.props) then
                if not (not v40(v65) or v40(v64.props)) then
                    v64.props.androidBackButtonConnection.disconnect();
                end;
            else
                v64.props.androidBackButtonConnection.connect(v64.onBackFromTopBar);
                return ;
            end;
        end;
    end;
end;
v54.renderTopBar = function(v66)
    local l_isPortrait_0 = v66.props.isPortrait;
    local l_showManageOutfitButton_0 = v66.props.showManageOutfitButton;
    return l_withLocalization_0({
        title = "Feature.Catalog.Action.Customize"
    })(function(v69)
        local v70 = nil;
        local v71 = nil;
        local v72 = nil;
        if not l_IsVRAppBuild_0() then
            v70 = v66.backButton;
            v71 = if not v66.props.alternateAvatarLandingScreenEnabled then v66.titleDropDown else v21;
            v72 = if not l_showManageOutfitButton_0 then {} else {
                v19
            };
        else
            v70 = nil;
            v71 = nil;
            v72 = {};
        end;
        return v3.createElement(v18.Container, {
            transparentBackground = true,
            hideSiteMessageBanner = l_isPortrait_0,
            [v3.Ref] = v66.topBarRef,
            NextSelectionDown = v66.defaultChildRef,
            NextSelectionRight = v66.sceneUIContainerRef,
            titleText = v69.title,
            leftItem = v70,
            centerItem = v71,
            rightItems = v72,
            useParentSizeForCenterItem = true
        });
    end);
end;
v54.render = function(v73)
    return v3.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 1, 0),
        [v3.Ref] = v73.ref,
        focusController = v73.props.focusController,
        defaultChild = v73.defaultChildRef,
        inputBindings = v73:getInputBindings(),
        restorePreviousChildFocus = false
    }, {
        ColorPickerSliderExposure = v3.createElement(v45, {
            ixpTest = v49
        }),
        UniversalAppCameraExposure = v3.createElement(v45, {
            ixpTest = v48
        }),
        EditorExposure = v3.createElement(v45, {
            ixpTest = v50.Editor
        }),
        BoundInputsUpdater = v3.createElement(v24),
        LastInputTypeChangedConnection = v3.createElement(l_ExternalEventConnection_0, {
            event = l_UserInputService_0.LastInputTypeChanged,
            callback = v73.lastInputTypeChangedCallback
        }),
        NavigationEventsLogger = v3.createElement(v25, {
            pageName = "AvatarEditor"
        }),
        AvatarExperienceView = v3.createElement(v16, {
            allowAdaptiveScrolling = false,
            bottomBarEnabled = false,
            changeViewFunction = v73.changeView,
            isSceneFullView = v73.props.fullView == v32.SceneFullView,
            isUIFullView = v73.props.fullView == v32.UIFullView,
            topBar = v73:renderTopBar(),
            refinementButtonsRef = v73.refinementButtonsRef,
            quickButtonsRef = v73.quickButtonsRef,
            ref = v73.sceneUIContainerRef,
            NextSelectionDown = v73.defaultChildRef,
            NextSelectionLeft = v73.topBarRef,
            defaultChildRef = v73.defaultChildRef
        }, {
            GamepadFocusHandlerForPage = v3.createElement(v23, {
                focusController = v73.props.focusController,
                captureFocusOnMount = true
            }),
            AvatarNavigationItemsView = v3.createElement(v17, {
                defaultChildRef = v73.defaultChildRef,
                NextSelectionUp = v73.topBarRef,
                NextSelectionRight = v73.quickButtonsRef
            })
        })
    });
end;
v54 = v42.connectTestVariables({
    alternateAvatarLandingScreenEnabled = v43.EnabledForUser,
    axAndroidBackButtonEnabled = v44.EnabledForUser
})((v26((v4.connect(function(v74, _)
    return {
        fullView = v38(v74, v13.AvatarEditor),
        isPortrait = v37(v74),
        itemDetailsExpanded = v74.AvatarExperience.Common.ItemDetailsExpanded,
        showManageOutfitButton = v41.getAvatarEditorCategoryInfoFromState(v74).ManageOutfitsEnabled == true
    };
end, function(v76)
    return {
        openItemPrompt = function(v77, v78, v79, v80, v81)
            v76(v30(v77, v78, v79, v80, v81));
        end,
        setItemDetailsPeekViewState = function(v82)
            v76(v29(v82));
        end,
        navigateIntoQuickMenu = function(v83, v84)
            v76(v33(v83, v84));
        end,
        setFullView = function(v85, v86, v87)
            v76(v31(v85, v86, v87));
        end
    };
end)((l_RoactAppPolicy_0.connect(function(v88, _)
    return {
        shouldSkipLandingPage = v88.getShouldSkipAvatarLandingPage()
    };
end)((l_RoactServices_0.connect({
    avatarExperienceAnalytics = v14,
    catalogAnalytics = v15,
    networking = v10
})(v54)))))))));
return function(v90)
    local l_current_0 = v6.useRef(v5.createFocusController()).current;
    local v92 = if not l_FFlagAvatarAndroidBackButton_0 then nil else v6.useRef(v39()).current;
    local v93 = v47(l_current_0);
    return v6.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1),
        ref = v46({
            overlayClosedCallback = v93
        })
    }, v6.createElement(v54, (v8.Dictionary.join(v90, {
        focusController = l_current_0,
        overlayClosedCallback = v93,
        androidBackButtonConnection = v92
    }))));
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.RoactGamepad);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local v7 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v8 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v9 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withAvatarRoute);
local v11 = require(l_Modules_0.AvatarExperience.AvatarEditor.GetAvatarEditorCategories);
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.CategoryContent);
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.Navigation);
local v14 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectHasOwnedOrRecommendedAssetsData);
local v15 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.GetDataStatusForCategory);
local v16 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.SetCategoryAndSubcategory);
local v17 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_Signal_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Signal;
local v20 = require(l_Modules_0.AvatarExperience.Common.Thunks.Exit3DFullView);
local v21 = require(l_CorePackages_0.RoactNavigation);
local v22 = require(l_Modules_0.AvatarExperience.Common.Services.Analytics);
local v23 = v2.PureComponent:extend("NavigationItemsView");
local v24 = {
    [v9.Catalog] = true,
    [v9.ProfilePictureEditorEmotes] = true
};
v23.defaultProps = {
    swipeNavigationEnabled = false
};
v23.init = function(v25)
    v25.navBarRef = v2.createRef();
    v25.contentRef = v2.createRef();
    v25.backToTopSignal = l_Signal_0.new();
    v25:setState({
        restorePreviousChildFocus = true
    });
    v25.setCategory = function(v26)
        v25.props.setCategoryAndSubcategory(v26, nil, v25.props.analytics);
        v25.props.exit3DFullView(v25.props.axAnalytics, v25.props.navigation.state.routeName);
    end;
    v25.setSubcategory = function(v27)
        v25.props.setCategoryAndSubcategory(nil, v27, v25.props.analytics);
        v25.props.exit3DFullView(v25.props.axAnalytics, v25.props.navigation.state.routeName);
    end;
    v25.navigate = function(v28)
        if v25.props.swipeNavigationEnabled then
            local v29 = v11();
            local l_categoryIndex_0 = v25.props.categoryIndex;
            local l_subcategoryIndex_0 = v25.props.subcategoryIndex;
            local l_Subcategories_0 = v29[l_categoryIndex_0].Subcategories;
            if l_Subcategories_0 and l_subcategoryIndex_0 ~= 0 then
                local v33 = l_subcategoryIndex_0 + v28;
                if v33 > 0 and v33 <= #l_Subcategories_0 then
                    v25.setSubcategory(v33);
                    return ;
                end;
            end;
            local v34 = l_categoryIndex_0 + v28;
            if v34 > 0 and v34 <= #v29 then
                v25.setCategory(v34);
            end;
            return ;
        else
            return ;
        end;
    end;
    v25.onNavBarSizeChanged = function(v35)
        if v25.contentRef.current then
            v25.contentRef.current.Size = UDim2.new(1, 0, 1, -v35.Y);
        end;
    end;
    v25.navigateLeft = function()
        v25.navigate(-1);
    end;
    v25.navigateRight = function()
        v25.navigate(1);
    end;
end;
v23.render = function(v36)
    local l_analytics_0 = v36.props.analytics;
    local l_axAnalytics_0 = v36.props.axAnalytics;
    local v39 = v36.props.hasOwnedOrRecommendedAssets or v36.props.dataStatus == v17.Failed;
    return l_withStyle_0(function(v40)
        local l_Theme_0 = v40.Theme;
        return v2.createElement(v4.Focusable.Frame, {
            BackgroundColor3 = l_Theme_0.BackgroundDefault.Color,
            BackgroundTransparency = l_Theme_0.BackgroundDefault.Transparency,
            BorderSizePixel = 0,
            Size = UDim2.new(1, 0, 1, 0),
            [v2.Ref] = v36.props.defaultChildRef,
            restorePreviousChildFocus = v36.state.restorePreviousChildFocus,
            defaultChild = v36.navBarRef,
            NextSelectionRight = v36.props.NextSelectionRight
        }, {
            ListLayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 0)
            }),
            NavBar = v2.createElement(v13, {
                analytics = l_analytics_0,
                axAnalytics = l_axAnalytics_0,
                layoutOrderMain = 1,
                layoutOrderSub = 2,
                navHeightMain = v8.MainNavHeight,
                navHeightSub = v8.SubNavHeight,
                absoluteSizeChanged = v36.onNavBarSizeChanged,
                backToTopSignal = v36.backToTopSignal,
                navBarRef = v36.navBarRef,
                NextSelectionDown = not not v39 and v36.contentRef or nil,
                NextSelectionUp = v36.props.NextSelectionUp
            }),
            CategoryContent = v2.createElement(v12, {
                Size = UDim2.new(1, 0, 1, 0),
                LayoutOrder = 2,
                frameRef = v36.contentRef,
                backToTopSignal = v36.backToTopSignal,
                navigateLeft = v36.navigateLeft,
                navigateRight = v36.navigateRight,
                NextSelectionUp = v36.navBarRef,
                restorePreviousChildFocus = v36.state.restorePreviousChildFocus
            })
        });
    end);
end;
v23.didUpdate = function(v42, v43)
    local l_name_0 = v42.props.avatarRoute.current.name;
    local l_name_1 = v43.avatarRoute.current.name;
    if l_name_0 == v9.AvatarEditor then
        if not v42.state.restorePreviousChildFocus then
            v42:setState({
                restorePreviousChildFocus = true
            });
            return ;
        end;
    elseif not (not (v24[l_name_0] and l_name_1 == v9.AvatarEditor) or not v42.state.restorePreviousChildFocus) then
        v42:setState({
            restorePreviousChildFocus = false
        });
    end;
end;
return v3.connect(function(v46)
    return {
        categoryIndex = v46.AvatarExperience.AvatarEditor.Categories.category,
        subcategoryIndex = v46.AvatarExperience.AvatarEditor.Categories.subcategory,
        hasOwnedOrRecommendedAssets = v14(v46),
        dataStatus = v15(v46)
    };
end, function(v47)
    return {
        setCategoryAndSubcategory = function(v48, v49, v50)
            v47(v16(v48, v49, v50));
        end,
        exit3DFullView = function(v51, v52)
            v47(v20(v51, v52));
        end
    };
end)((v21.withNavigation((v10((l_RoactServices_0.connect({
    analytics = v7,
    axAnalytics = v22
})(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.Packages.RoactGamepad);
local l_Focusable_0 = v3.Focusable;
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_CorePackages_0.AvatarExperienceDeps);
local v8 = require(l_CorePackages_0.RoactNavigation);
local v9 = require(l_CorePackages_0.Cryo);
local l_RoactFitComponents_0 = v7.RoactFitComponents;
local l_FitFrameOnAxis_0 = l_RoactFitComponents_0.FitFrameOnAxis;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v14 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v15 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetAvatarType);
local v16 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.SendAnalytics);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_Text_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Text;
local v19 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v21 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.Debug.logOnOverlayClosed);
local l_withNavigation_0 = v8.withNavigation;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_wasLastInputGamepad_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).wasLastInputGamepad;
local l_CursorKind_0 = v6.App.SelectionImage.CursorKind;
local l_SpringAnimatedItem_0 = v6.Utility.SpringAnimatedItem;
local l_withSelectionCursorProvider_0 = v6.App.SelectionImage.withSelectionCursorProvider;
local l_withStyle_0 = v6.Style.withStyle;
local l_Images_0 = v6.App.ImageSet.Images;
local l_ImageSetLabel_0 = v6.Core.ImageSet.ImageSetLabel;
local v31 = l_Images_0["component_assets/circle_29"];
local v32 = l_Images_0["component_assets/circle_25"];
local v33 = {
    dampingRatio = 1,
    frequency = 3.5
};
local v34 = v2.PureComponent:extend("AvatarTypeSwitch");
local function v36(v35)
    v35.Size = UDim2.new(UDim.new(0, l_Text_0.GetTextWidth(v35.Text, v35.Font, v35.TextSize)), (UDim.new(0, v35.TextSize)));
end;
v34.resizeTextLabels = function(v37)
    local l_current_0 = v37.r6Ref.current;
    local l_current_1 = v37.r15Ref.current;
    if l_current_0 and l_current_1 then
        v36(l_current_0);
        v36(l_current_1);
        local v40 = math.max(l_current_0.AbsoluteSize.x, l_current_1.AbsoluteSize.x);
        l_current_0.Size = UDim2.new(0, v40, 0, l_current_0.Size.Y.Offset);
        l_current_1.Size = UDim2.new(0, v40, 0, l_current_1.Size.Y.Offset);
        return ;
    else
        return ;
    end;
end;
v34.makeOnOverlayClosed = function(_, v42)
    return function()
        local v43 = l_wasLastInputGamepad_0();
        v21("AvatarTypeSwitch");
        if v43 then
            v42.captureFocus();
        end;
    end;
end;
v34.init = function(v44)
    v44.r6Ref = v2.createRef();
    v44.r15Ref = v2.createRef();
    local v45, v46 = v2.createBinding(UDim2.fromScale(1, 1));
    v44.sizeBinding = v45;
    v44.updateSizeBinding = v46;
    v44.absoluteSizeChanged = function(v47)
        v44.updateSizeBinding(UDim2.fromOffset(v47.AbsoluteSize.X, v47.AbsoluteSize.Y));
    end;
    v44.toggleAvatarType = function(v48)
        local l_sendAnalytics_0 = v44.props.sendAnalytics;
        local l_analytics_0 = v44.props.analytics;
        local l_setAvatarType_0 = v44.props.setAvatarType;
        local v52 = if v44.props.avatarType == v14.AvatarType.R6 then v14.AvatarType.R15 else v14.AvatarType.R6;
        local v53 = v19.hasWrapLayer(v44.props.currentCharacter);
        if not (v52 == v14.AvatarType.R6) or not v53 then
            l_setAvatarType_0(v52);
            l_sendAnalytics_0(l_analytics_0.toggleAvatarType, v52);
            return ;
        else
            v44.props.navigation.navigate(v20.LayeredClothingR6SwitchPrompt, {
                onOverlayClosed = v44:makeOnOverlayClosed(v48)
            });
            return ;
        end;
    end;
end;
v34.didMount = function(v54)
    v54:resizeTextLabels();
end;
v34.renderWithProviders = function(v55, v56, v57, v58, v59)
    local l_LayoutOrder_0 = v55.props.LayoutOrder;
    local l_Theme_0 = v57.Theme;
    local l_Font_0 = v57.Font;
    local _ = nil;
    return v2.createElement(l_ImageSetLabel_0, {
        Size = v55.sizeBinding,
        Image = v31,
        ImageColor3 = l_Theme_0.BackgroundContrast.Color,
        BackgroundTransparency = 1,
        ScaleType = Enum.ScaleType.Slice,
        SliceCenter = Rect.new(14, 13, 15, 15),
        LayoutOrder = l_LayoutOrder_0,
        NextSelectionLeft = v55.props.NextSelectionLeft,
        NextSelectionRight = v55.props.NextSelectionRight,
        NextSelectionUp = v55.props.NextSelectionUp,
        NextSelectionDown = v55.props.NextSelectionDown,
        [v2.Ref] = v55.props.forwardRef
    }, {
        AnimatedFrame = v2.createElement(l_SpringAnimatedItem_0.AnimatedFrame, {
            regularProps = {
                Size = UDim2.new(0.5, 0, 1, 0),
                BackgroundTransparency = 1,
                BorderSizePixel = 0
            },
            animatedValues = {
                positionX = v55.props.avatarType == v14.AvatarType.R15 and 0.5 or 0
            },
            mapValuesToProps = function(v64)
                return {
                    Position = UDim2.new(v64.positionX, 0, 0, 0)
                };
            end,
            springOptions = v33
        }, {
            SwitchImage = v2.createElement(l_ImageSetLabel_0, {
                Size = UDim2.new(1, 0, 1, 0),
                Image = v32,
                ImageColor3 = l_Theme_0.UIDefault.Color,
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                ScaleType = Enum.ScaleType.Slice,
                SliceCenter = Rect.new(12, 11, 13, 13)
            })
        }),
        SwitchButton = v2.createElement(l_Focusable_0.ImageButton, {
            BackgroundTransparency = 1,
            Size = UDim2.new(1, 0, 1, 0),
            [v2.Event.Activated] = function()
                v55.toggleAvatarType(v59);
            end,
            SelectionImageObject = v58(l_CursorKind_0.Toggle)
        }),
        LabelsContainer = v2.createElement(l_FitFrameOnAxis_0, {
            axis = l_FitFrameOnAxis_0.Axis.Both,
            margin = l_RoactFitComponents_0.Rect.square(3),
            contentPadding = UDim.new(0, 10),
            FillDirection = Enum.FillDirection.Horizontal,
            BackgroundTransparency = 1,
            ZIndex = 2,
            [v2.Change.AbsoluteSize] = v55.absoluteSizeChanged
        }, {
            R6Label = v2.createElement("TextLabel", {
                BackgroundTransparency = 1,
                AnchorPoint = Vector2.new(0, 0.5),
                Font = l_Font_0.Body.Font,
                Text = v56.r6Text,
                TextXAlignment = Enum.TextXAlignment.Center,
                TextSize = l_Font_0.CaptionHeader.RelativeSize * l_Font_0.BaseSize,
                TextColor3 = if v55.props.avatarType == v14.AvatarType.R6 then l_Theme_0.TextEmphasis.Color else l_Theme_0.TextDefault.Color,
                LayoutOrder = 1,
                [v2.Ref] = v55.r6Ref
            }),
            R15Label = v2.createElement("TextLabel", {
                BackgroundTransparency = 1,
                AnchorPoint = Vector2.new(1, 0.5),
                Font = l_Font_0.Body.Font,
                Text = v56.r15Text,
                TextXAlignment = Enum.TextXAlignment.Center,
                TextSize = l_Font_0.CaptionHeader.RelativeSize * l_Font_0.BaseSize,
                TextColor3 = if v55.props.avatarType == v14.AvatarType.R15 then l_Theme_0.TextEmphasis.Color else l_Theme_0.TextDefault.Color,
                LayoutOrder = 2,
                [v2.Ref] = v55.r15Ref
            })
        })
    });
end;
v34.render = function(v65)
    return l_withLocalization_0({
        r6Text = "Feature.Avatar.Label.R6",
        r15Text = "Feature.Avatar.Label.R15"
    })(function(v66)
        return l_withStyle_0(function(v67)
            return l_withSelectionCursorProvider_0(function(v68)
                return v3.withFocusController(function(v69)
                    return v65:renderWithProviders(v66, v67, v68, v69);
                end);
            end);
        end);
    end);
end;
v34 = v5.connect(function(v70, _)
    return {
        equippedAssets = v70.AvatarExperience.AvatarEditor.Character.EquippedAssets,
        avatarType = v70.AvatarExperience.AvatarEditor.Character.AvatarType,
        currentCharacter = v70.AvatarExperience.AvatarScene.Character.CurrentCharacter
    };
end, function(v72)
    return {
        setAvatarType = function(v73)
            v72(v15(v73));
        end,
        sendAnalytics = function(v74, v75)
            v72(v16(v74, v75));
        end
    };
end)((l_withNavigation_0(l_RoactServices_0.connect({
    analytics = v13
})(v34), nil)));
return v2.forwardRef(function(v76, v77)
    return v2.createElement(v34, v9.Dictionary.join(v76, {
        forwardRef = v77
    }));
end);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.t);
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.UIBlox);
local l_withSelectionCursorProvider_0 = v5.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = v5.App.SelectionImage.CursorKind;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local l_Color_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Color;
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetBodyColors);
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.SetBodyColor3);
local v14 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.SendAnalytics);
local v15 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
local v16 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v17 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectRangeIdForSelectedBodyParts);
local v18 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectButtonColor3);
local v19 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectButtonSliderValue);
local v20 = require(l_Modules_0.AvatarExperience.Flags.ColorPickerSliderIXPTest);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_withStyle_0 = v5.Style.withStyle;
local l_Images_0 = v5.App.ImageSet.Images;
local l_ImageSetLabel_0 = v5.Core.ImageSet.ImageSetLabel;
local v25 = v3.PureComponent:extend("BodyColorButton");
local v26 = l_Images_0["icons/actions/selectOn"];
v25.validateProps = v2.strictInterface({
    rangeId = if not v20.isEnabled() then nil else v2.optional(v2.string),
    brickId = if not v20.isEnabled() then v2.number else v2.optional(v2.number),
    brickColor = if not v20.isEnabled() then v2.number else v2.optional(v2.number),
    userId = v2.optional(v2.string),
    selectedBodyPartColorIds = v2.optional(v2.table),
    bodyColors = v2.optional(v2.table),
    sliderValue = v2.optional(v2.number),
    isBodyColorButtonSelected = v2.optional(v2.boolean),
    buttonColor3 = v2.optional(v2.Color3),
    setBodyColors = v2.optional(v2.callback),
    sendAnalytics = v2.callback,
    setBodyColor3 = v2.optional(v2.callback),
    analytics = v2.table,
    colorPickerSliderEnabled = v2.optional(v2.boolean)
});
v25.DEPRECATED_getBrickIdUsedByAllParts = function(v27)
    local l_bodyColors_0 = v27.props.bodyColors;
    local v29 = nil;
    for _, v31 in l_bodyColors_0, nil, nil do
        if v29 == nil then
            v29 = v31;
        elseif v29 ~= v31 then
            return nil;
        end;
    end;
    return v29;
end;
v25.DEPRECATED_getIsBodyPartSelected = function(v32, v33)
    local l_selectedBodyPartColorIds_0 = v32.props.selectedBodyPartColorIds;
    if l_selectedBodyPartColorIds_0 and #l_selectedBodyPartColorIds_0 > 0 then
        for _, v36 in l_selectedBodyPartColorIds_0, nil, nil do
            if v33 == v36 then
                return true;
            end;
        end;
        return false;
    else
        return true;
    end;
end;
v25.DEPRECATED_anySelectedBodyPartUsesThisColor = function(v37)
    local l_bodyColors_1 = v37.props.bodyColors;
    if l_bodyColors_1 then
        for v39, v40 in l_bodyColors_1, nil, nil do
            if v37:DEPRECATED_getIsBodyPartSelected(v39) and v40 == v37.props.brickId then
                return true;
            end;
        end;
    end;
    return false;
end;
v25.onActivated = function(v41)
    if not v41.props.colorPickerSliderEnabled then
        local l_sendAnalytics_0 = v41.props.sendAnalytics;
        local l_analytics_0 = v41.props.analytics;
        local l_selectedBodyPartColorIds_1 = v41.props.selectedBodyPartColorIds;
        local l_brickId_0 = v41.props.brickId;
        local l_bodyColors_2 = v41.props.bodyColors;
        local l_setBodyColors_0 = v41.props.setBodyColors;
        local l_l_bodyColors_2_0 = l_bodyColors_2;
        if l_selectedBodyPartColorIds_1 and #l_selectedBodyPartColorIds_1 > 0 then
            l_l_bodyColors_2_0 = table.clone(l_l_bodyColors_2_0);
            for _, v50 in l_selectedBodyPartColorIds_1, nil, nil do
                l_l_bodyColors_2_0[v50] = l_brickId_0;
            end;
        else
            l_l_bodyColors_2_0 = {
                headColorId = l_brickId_0,
                leftArmColorId = l_brickId_0,
                leftLegColorId = l_brickId_0,
                rightArmColorId = l_brickId_0,
                rightLegColorId = l_brickId_0,
                torsoColorId = l_brickId_0
            };
        end;
        l_setBodyColors_0(l_l_bodyColors_2_0);
        l_sendAnalytics_0(l_analytics_0.setBodyColors, l_l_bodyColors_2_0);
        return ;
    else
        v41.props.setBodyColor3(v41.props.buttonColor3, v41.props.rangeId, v41.props.sliderValue, v41.props.analytics);
        return ;
    end;
end;
v25.DEPRECATED_hasColorEquipped = function(v51)
    local l_selectedBodyPartColorIds_2 = v51.props.selectedBodyPartColorIds;
    if l_selectedBodyPartColorIds_2 and #l_selectedBodyPartColorIds_2 > 1 then
        return v51:DEPRECATED_getBrickIdUsedByAllParts() == v51.props.brickId;
    else
        return v51:DEPRECATED_anySelectedBodyPartUsesThisColor();
    end;
end;
v25.render = function(v53)
    return l_withStyle_0(function(v54)
        local l_Theme_0 = v54.Theme;
        local v56 = nil;
        v56 = if not v53.props.colorPickerSliderEnabled then v53:DEPRECATED_hasColorEquipped() else v53.props.isBodyColorButtonSelected;
        local v57 = nil;
        if v56 then
            v57 = v3.createElement("Frame", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                Size = UDim2.new(0.8, 0, 0.8, 0),
                BackgroundTransparency = l_Theme_0.Overlay.Transparency,
                BackgroundColor3 = l_Theme_0.Overlay.Color,
                BorderSizePixel = 0
            }, {
                UICorner = v3.createElement("UICorner", {
                    CornerRadius = UDim.new(0.5, 0)
                }),
                Checkmark = v3.createElement(l_ImageSetLabel_0, {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    Size = UDim2.new(0, 30, 0, 30),
                    BackgroundTransparency = 1,
                    Image = v26,
                    ImageColor3 = l_Theme_0.ContextualPrimaryContent.Color,
                    ImageTransparency = l_Theme_0.ContextualPrimaryContent.Transparency
                })
            });
        end;
        local v58 = nil;
        if not v53.props.colorPickerSliderEnabled then
            v58 = l_Color_0.Color3FromHex(v53.props.brickColor);
        else
            v58 = v53.props.buttonColor3;
            assert(v58 ~= nil, "backgroundColor3 is nil");
        end;
        return l_withSelectionCursorProvider_0(function(v59)
            return v3.createElement("Frame", {
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundTransparency = 1
            }, {
                TextButton = v3.createElement(l_Focusable_0.TextButton, {
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 0,
                    BackgroundColor3 = v58,
                    Text = "",
                    BorderSizePixel = 0,
                    AutoButtonColor = false,
                    ZIndex = 2,
                    SelectionImageObject = v59(l_CursorKind_0.SkinToneCircle),
                    [v3.Event.Activated] = function(_)
                        v53:onActivated();
                    end
                }, {
                    UICorner = v3.createElement("UICorner", {
                        CornerRadius = UDim.new(0.5, 0)
                    }),
                    EquippedFrame = v57
                }),
                Border = v3.createElement("Frame", {
                    Size = UDim2.new(1, 2, 1, 2),
                    Position = UDim2.fromScale(0.5, 0.5),
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    BackgroundColor3 = l_Theme_0.Divider.Color,
                    BackgroundTransparency = l_Theme_0.Divider.Transparency,
                    BorderSizePixel = 0,
                    ZIndex = 1
                }, {
                    UICorner = v3.createElement("UICorner", {
                        CornerRadius = UDim.new(0.5, 0)
                    })
                })
            });
        end);
    end);
end;
return (v15.connectTestVariables({
    colorPickerSliderEnabled = v20.EnabledForUser
})((v4.connect(function(v61, v62)
    local v63 = nil;
    local v64 = nil;
    local v65 = nil;
    local v66 = nil;
    local v67 = nil;
    local v68 = nil;
    if not v62.colorPickerSliderEnabled then
        v63 = v61.AvatarExperience.AvatarEditor.Character.BodyColors;
        v64 = v61.AvatarExperience.AvatarEditor.BodyColorPickerSettings.selectedBodyPartColorIds;
    else
        v65 = v18(v61.AvatarExperience, v62.rangeId);
        v66 = v17(v61) == v62.rangeId;
        v67 = v16.getUserId(v61);
        v68 = v19(v61.AvatarExperience, v62.rangeId);
    end;
    return {
        sliderValue = v68,
        buttonColor3 = v65,
        isBodyColorButtonSelected = v66,
        userId = v67,
        bodyColors = v63,
        selectedBodyPartColorIds = v64
    };
end, function(v69)
    local v70 = v15.readTestVariable(v20.EnabledForUser);
    return {
        setBodyColors = if v70 then nil else function(v71)
            v69(v12(v71));
        end,
        sendAnalytics = function(v72, v73)
            v69(v14(v72, v73));
        end,
        setBodyColor3 = if not v70 then nil else function(v74, v75, v76, v77)
            v69(v13(v74, v75, v76, v77));
        end
    };
end)((l_RoactServices_0.connect({
    analytics = v9
})(v25))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.t);
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.BodyColorButton);
local v6 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v8 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local v10 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v10.Core.Style.withStyle;
local l_withSelectionCursorProvider_0 = v10.App.SelectionImage.withSelectionCursorProvider;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_CursorKind_0 = v10.App.SelectionImage.CursorKind;
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local l_GridMetrics_0 = v10.App.Grid.GridMetrics;
local l_ShimmerPanel_0 = v10.App.Loading.ShimmerPanel;
local l_RadioButtonList_0 = v10.App.InputButton.RadioButtonList;
local l_DefaultMetricsGridView_0 = v10.App.Grid.DefaultMetricsGridView;
local v20 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.BodyColorsSliderFrame);
local v21 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetBodyColorViewSetting);
local v22 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetSelectedBodyPartColorIds);
local v23 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetBodyPartRangeIds);
local v24 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetSelectedBodyPartIndex);
local v25 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
local v26 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectRangeIdForSelectedBodyParts);
local v27 = require(l_Modules_0.AvatarExperience.Common.Context.withAdaptiveScrolling);
local v28 = require(l_Modules_0.AvatarExperience.Flags.ColorPickerSliderIXPTest);
local v29 = require(l_Modules_0.AvatarExperience.Flags.FFlagColorPickerUseParentProps);
local v30 = v3.PureComponent:extend("BodyColorsFrame");
local v31 = table.create(v6.ShimmerColorCardsToDisplay, {});
local v32 = {
    minimumItemsPerRow = 5,
    minimumItemWidth = 60
};
local function _(v33)
    return (tonumber(string.sub(v33, 2), 16));
end;
v30.validateProps = v2.strictInterface({
    Size = v2.UDim2,
    NextSelectionUp = v2.optional(v2.table),
    colorPickerSliderEnabled = v2.optional(v2.boolean),
    viewSetting = v2.string,
    rangeIdForSelectedBodyParts = v2.optional(v2.string),
    defaultBodyColors = v2.optional(v2.table),
    defaultBodyColorRanges = v2.optional(v2.table),
    bodyColor3s = v2.optional(v2.table),
    bodyPartRangeIds = v2.optional(v2.table),
    selectedBodyPartIndex = v2.optional(v2.number),
    setViewSetting = v2.callback,
    setSelectedBodyPartColorIds = v2.optional(v2.callback),
    setBodyPartRangeIds = v2.optional(v2.callback),
    setSelectedBodyPartIndex = v2.optional(v2.callback),
    adaptiveScrolling = v2.optional(v2.any)
});
v30.init = function(v35)
    if v35.props.colorPickerSliderEnabled then
        v35:setState({
            bodyColorsFrameHeight = 0,
            bodyPartsListHeight = 0
        });
    end;
    v35.renderItem = function(v36)
        if not v35.props.colorPickerSliderEnabled then
            if not v36.brickColorId then
                return v35:getShimmerPanel();
            else
                return v3.createElement(v5, {
                    brickId = v36.brickColorId,
                    brickColor = tonumber(string.sub(v36.hexColor, 2), 16)
                });
            end;
        elseif not v36.rangeId then
            return v35:getShimmerPanel();
        else
            return v3.createElement(v5, {
                rangeId = v36.rangeId
            });
        end;
    end;
    local v37, v38 = v3.createBinding(UDim2.new(0, 0, 1, 0));
    v35.canvasSizeBinding = v37;
    v35.updateCanvasSizeBinding = v38;
    v37, v38 = v3.createBinding(0);
    v35.bodyPartsListHeightBinding = v37;
    v35.updateBodyPartsListHeightBinding = v38;
    v37, v38 = v3.createBinding(0);
    v35.bodyColorsFrameHeightBinding = v37;
    v35.updateBodyColorsFrameHeightBinding = v38;
    v35.onUIListLayoutContentSizeChanged = function(v39)
        v35.updateCanvasSizeBinding(UDim2.new(0, 0, 0, v39.AbsoluteContentSize.Y + v6.SkinColorGridPadding * 2));
    end;
    v35.onBodyPartsListAbsoluteSizeChanged = function(v40)
        v35.updateBodyPartsListHeightBinding(v40.AbsoluteSize.Y);
    end;
    v35.onBodyColorsFrameAbsoluteSizeChanged = function(v41)
        v35.updateBodyColorsFrameHeightBinding(v41.AbsoluteSize.Y);
    end;
    v35.toggleViewButtonRef = v3.createRef();
    v35.bodyColorButtonsRef = v3.createRef();
    v35.bodyPartButtonsRef = v3.createRef();
    if v35.props.colorPickerSliderEnabled then
        v35.sliderRef = v3.createRef();
    end;
    v35:setSelectedBodyPartIndex(1);
end;
v30.setSelectedBodyPartIndex = function(v42, v43)
    if not v42.props.colorPickerSliderEnabled then
        local v44 = {};
        for _, v46 in v6.BodyPartButtonData[v43].bodyParts, nil, nil do
            table.insert(v44, v46);
        end;
        v42.props.setSelectedBodyPartColorIds(v44);
        return ;
    else
        v42.props.setSelectedBodyPartIndex(v43);
        return ;
    end;
end;
v30.getShimmerPanel = function(_)
    return v3.createElement(l_ShimmerPanel_0, {
        Size = UDim2.new(1, 0, 1, 0)
    });
end;
v30.getItems = function(v48)
    if not v48.props.colorPickerSliderEnabled then
        local l_defaultBodyColors_0 = v48.props.defaultBodyColors;
        return not not (l_defaultBodyColors_0 and #l_defaultBodyColors_0 > 0) and l_defaultBodyColors_0 or v31;
    else
        local l_defaultBodyColorRanges_0 = v48.props.defaultBodyColorRanges;
        return not not (l_defaultBodyColorRanges_0 and #l_defaultBodyColorRanges_0 > 0) and l_defaultBodyColorRanges_0 or v31;
    end;
end;
v30.getBodyPartsListHeight = function(v51)
    if v51.props.viewSetting == v6.ColorPickerViewSettings.AdvancedView then
        return v51.state.bodyPartsListHeight;
    else
        return 0;
    end;
end;
v30.getGridAndSidebarFrameSize = function(v52)
    if not v52:shouldRenderSliderBar() then
        return v52.props.Size;
    else
        return v3.joinBindings({
            v52.canvasSizeBinding,
            v52.bodyPartsListHeightBinding,
            v52.bodyColorsFrameHeightBinding
        }):map(function(v53)
            local l_Offset_0 = v53[1].Y.Offset;
            local v55 = v53[2];
            local v56 = v53[3];
            if v52.props.viewSetting ~= v6.ColorPickerViewSettings.AdvancedView then
                v55 = 0;
            end;
            return UDim2.new(1, 0, 1, -v9.getBodyColorsSliderFrameHeight(v6.BodyColorsSliderFrameHeight, l_Offset_0, v56, v55));
        end);
    end;
end;
v30.renderBodyColorButtons = function(v57, v58, v59)
    return v3.createElement(l_DefaultMetricsGridView_0, {
        renderItem = v57.renderItem,
        getItemHeight = v8.GridItemHeightGetter(v7.ItemTileType.BodyColorButton),
        getItemMetrics = l_GridMetrics_0.makeCustomMetricsGetter(v32),
        itemPadding = Vector2.new(10, 10),
        items = v58,
        maxHeight = math.huge,
        defaultChildIndex = 1,
        NextSelectionDown = v57.toggleViewButtonRef,
        NextSelectionUp = v57.props.NextSelectionUp,
        NextSelectionLeft = v59,
        [v3.Ref] = v57.bodyColorButtonsRef
    });
end;
v30.renderToggleButton = function(v60, v61, v62, v63, v64)
    return v3.createElement(l_Focusable_0.TextButton, {
        AnchorPoint = Vector2.new(1, 0),
        BackgroundTransparency = 1,
        LayoutOrder = 2,
        Position = UDim2.fromScale(1, 0),
        Size = UDim2.new(0, 100, 0, 30),
        Text = v61,
        Font = v62.Font.Header2.Font,
        TextSize = v62.Font.BaseSize * v62.Font.Header2.RelativeSize,
        TextColor3 = v62.Theme.TextEmphasis.Color,
        NextSelectionUp = v60.bodyColorButtonsRef,
        NextSelectionDown = not not v60.props.colorPickerSliderEnabled and v60.sliderRef or nil,
        SelectionImageObject = v63(l_CursorKind_0.RoundedRect),
        [v3.Ref] = v60.toggleViewButtonRef,
        [v3.Event.Activated] = v64
    });
end;
v30.renderUIListLayout = function(v65)
    return v3.createElement("UIListLayout", {
        FillDirection = Enum.FillDirection.Vertical,
        HorizontalAlignment = Enum.HorizontalAlignment.Right,
        SortOrder = Enum.SortOrder.LayoutOrder,
        Padding = UDim.new(0, 20),
        [v3.Change.AbsoluteContentSize] = v65.onUIListLayoutContentSizeChanged
    });
end;
v30.renderUIPadding = function(_)
    return v3.createElement("UIPadding", {
        PaddingTop = UDim.new(0, v6.SkinColorGridPadding),
        PaddingBottom = UDim.new(0, v6.SkinColorGridPadding),
        PaddingLeft = UDim.new(0, v6.SkinColorGridPadding),
        PaddingRight = UDim.new(0, v6.SkinColorGridPadding)
    });
end;
v30.renderBodyPartsList = function(v67, v68)
    local v69 = {};
    for v70 = 1, #v6.BodyPartButtonData do
        table.insert(v69, {
            label = v68["bodyPart" .. v70]
        });
    end;
    local l_colorPickerSliderEnabled_0 = v67.props.colorPickerSliderEnabled;
    return v3.createElement(l_Focusable_0.Frame, {
        AutomaticSize = if not l_colorPickerSliderEnabled_0 then nil else Enum.AutomaticSize.Y,
        Size = if not l_colorPickerSliderEnabled_0 then UDim2.new(0, 150, 1, 0) else UDim2.fromOffset(150, 0),
        BackgroundTransparency = 1,
        [v3.Change.AbsoluteSize] = if not l_colorPickerSliderEnabled_0 then nil else v67.onBodyPartsListAbsoluteSizeChanged
    }, {
        UIPadding = v3.createElement("UIPadding", {
            PaddingTop = UDim.new(0, v6.SkinColorGridPadding),
            PaddingBottom = if not l_colorPickerSliderEnabled_0 then nil else UDim.new(0, v6.SkinColorGridPadding)
        }),
        BodyPartRadioButtons = v3.createElement(l_Focusable_0[l_RadioButtonList_0], {
            radioButtons = v69,
            onActivated = function(v72)
                v67:setSelectedBodyPartIndex(v72);
            end,
            initialValue = not v67.props.colorPickerSliderEnabled and 1 or v67.props.selectedBodyPartIndex,
            elementSize = UDim2.new(1, -10, 0, 25),
            automaticSize = not not l_colorPickerSliderEnabled_0 or nil,
            padding = UDim.new(0, 10),
            NextSelectionRight = v67.bodyColorButtonsRef,
            NextSelectionUp = v67.props.NextSelectionUp,
            [v3.Ref] = v67.bodyPartButtonsRef
        })
    });
end;
v30.renderStandardView = function(v73)
    local v74 = v73.props.adaptiveScrolling or {};
    return l_withStyle_0(function(v75)
        return l_withSelectionCursorProvider_0(function(v76)
            return l_withLocalization_0({
                buttonText = "Feature.Avatar.Label.BodyColorAdvancedView"
            })(function(v77)
                local v78 = v73:getItems();
                local l_setViewSetting_0 = v73.props.setViewSetting;
                return v3.createElement(l_Focusable_0.ScrollingFrame, {
                    BackgroundTransparency = 1,
                    CanvasSize = v73.canvasSizeBinding,
                    ScrollBarThickness = 0,
                    ScrollingDirection = Enum.ScrollingDirection.Y,
                    Size = v73:getGridAndSidebarFrameSize(),
                    NextSelectionUp = v73.props.NextSelectionUp,
                    defaultChild = v73.bodyColorButtonsRef,
                    ScrollingEnabled = v74.scrollingEnabled,
                    [v3.Change.CanvasPosition] = v74.onCanvasPositionChanged
                }, {
                    UIListLayout = v73:renderUIListLayout(),
                    UIPadding = v73:renderUIPadding(),
                    BodyColorButtons = v73:renderBodyColorButtons(v78),
                    AdvancedViewButton = v73:renderToggleButton(v77.buttonText, v75, v76, function()
                        l_setViewSetting_0(v6.ColorPickerViewSettings.AdvancedView);
                    end)
                });
            end);
        end);
    end);
end;
v30.renderAdvancedView = function(v80)
    local v81 = v80.props.adaptiveScrolling or {};
    return l_withStyle_0(function(v82)
        return l_withSelectionCursorProvider_0(function(v83)
            local v84 = {
                standardButtonText = "Feature.Avatar.Label.BodyColorStandardView"
            };
            for v85, _ in v6.BodyPartButtonData, nil, nil do
                v84["bodyPart" .. v85] = v6.BodyPartButtonData[v85].textKey;
            end;
            return l_withLocalization_0(v84)(function(v87)
                local v88 = v80:getItems();
                local v89 = v80:getGridAndSidebarFrameSize();
                local l_setViewSetting_1 = v80.props.setViewSetting;
                return v3.createElement(l_Focusable_0.ScrollingFrame, {
                    BackgroundTransparency = 1,
                    Size = v89,
                    CanvasSize = v80.canvasSizeBinding,
                    ScrollBarThickness = 0,
                    ScrollingDirection = Enum.ScrollingDirection.Y,
                    Position = UDim2.fromScale(0, 0),
                    AutomaticCanvasSize = Enum.AutomaticSize.Y,
                    defaultChild = v80.bodyColorButtonsRef,
                    ScrollingEnabled = v81.scrollingEnabled,
                    [v3.Change.CanvasPosition] = v81.onCanvasPositionChanged
                }, {
                    BodyPartsList = v80:renderBodyPartsList(v87),
                    BodyColorsGrid = v3.createElement(l_Focusable_0.Frame, {
                        BackgroundTransparency = 1,
                        Position = UDim2.new(0, 150, 0, 0),
                        Size = UDim2.new(1, -150, 1, 0),
                        defaultChild = v80.bodyColorButtonsRef
                    }, {
                        UIPadding = v80:renderUIPadding(),
                        UIListLayout = v80:renderUIListLayout(),
                        BodyColorButtons = v80:renderBodyColorButtons(v88, v80.bodyPartButtonsRef),
                        StandardViewButton = v80:renderToggleButton(v87.standardButtonText, v82, v83, function()
                            v80:setSelectedBodyPartIndex(1);
                            l_setViewSetting_1(v6.ColorPickerViewSettings.StandardView);
                        end)
                    })
                });
            end);
        end);
    end);
end;
v30.shouldRenderSliderBar = function(v91)
    if v91.props.colorPickerSliderEnabled then
        if v91.props.rangeIdForSelectedBodyParts then
            local l_bodyPartForSkinColoringIds_0 = v6.BodyPartButtonData[v91.props.selectedBodyPartIndex].bodyPartForSkinColoringIds;
            if (l_bodyPartForSkinColoringIds_0 and #l_bodyPartForSkinColoringIds_0 > 1) and v91.props.rangeIdForSelectedBodyParts == nil then
                return false;
            else
                return true;
            end;
        else
            return false;
        end;
    else
        return false;
    end;
end;
v30.render = function(v93)
    local _ = nil;
    return v3.createElement(l_Focusable_0.Frame, {
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        Size = v93.props.Size,
        Position = UDim2.fromOffset(0, 0),
        defaultChild = v93.bodyColorButtonsRef,
        [v3.Change.AbsoluteSize] = v93.onBodyColorsFrameAbsoluteSizeChanged
    }, {
        BodyColorsView = if v93.props.viewSetting == v6.ColorPickerViewSettings.AdvancedView then v93:renderAdvancedView() else v93:renderStandardView(),
        BodyColorsSliderFrame = if not v93:shouldRenderSliderBar() then nil else v3.createElement(v20, {
            sliderRef = v93.sliderRef,
            NextSelectionUp = v93.toggleViewButtonRef,
            gridAndSidebarFrameSizeBinding = v93:getGridAndSidebarFrameSize(),
            rangeIdForSelectedBodyParts = if not v29 then nil else v93.props.rangeIdForSelectedBodyParts,
            defaultBodyColorRanges = if not v29 then nil else v93.props.defaultBodyColorRanges
        })
    });
end;
v30.didMount = function(v95)
    if v95.props.colorPickerSliderEnabled then
        local l_bodyColor3s_0 = v95.props.bodyColor3s;
        local l_bodyPartRangeIds_0 = v95.props.bodyPartRangeIds;
        local v98 = {};
        local v99 = false;
        for v100, v101 in l_bodyColor3s_0, nil, nil do
            if l_bodyPartRangeIds_0[v100] == nil then
                v99 = true;
                local v102, _ = v9.findRangeAndSliderValueForColor3(v101, v95.props.defaultBodyColorRanges);
                v98[v100] = v102;
            else
                v98[v100] = l_bodyPartRangeIds_0[v100];
            end;
        end;
        if v99 then
            v95.props.setBodyPartRangeIds(v98);
        end;
    end;
end;
return (v27((v25.connectTestVariables({
    colorPickerSliderEnabled = v28.EnabledForUser
})((v4.connect(function(v104, v105)
    local v106 = nil;
    local v107 = nil;
    local v108 = nil;
    local v109 = nil;
    local v110 = nil;
    local v111 = nil;
    if not v105.colorPickerSliderEnabled then
        v111 = v104.AvatarExperience.AvatarEditor.DefaultBodyColors;
    else
        v106 = v104.AvatarExperience.AvatarEditor.DefaultBodyColorRanges;
        v107 = v104.AvatarExperience.AvatarEditor.Character.BodyPartRangeIds;
        v108 = v104.AvatarExperience.AvatarEditor.Character.BodyColor3s;
        v109 = v104.AvatarExperience.AvatarEditor.BodyColorPickerSettings.selectedBodyPartIndex;
        v110 = v26(v104);
    end;
    return {
        defaultBodyColors = v111,
        viewSetting = v104.AvatarExperience.AvatarEditor.BodyColorPickerSettings.viewSetting,
        rangeIdForSelectedBodyParts = v110,
        defaultBodyColorRanges = v106,
        bodyColor3s = v108,
        bodyPartRangeIds = v107,
        selectedBodyPartIndex = v109
    };
end, function(v112)
    local v113 = v25.readTestVariable(v28.EnabledForUser);
    return {
        setViewSetting = function(v114)
            v112(v21(v114));
        end,
        setSelectedBodyPartColorIds = if v113 then nil else function(v115)
            v112(v22(v115));
        end,
        setBodyPartRangeIds = if not v113 then nil else function(v116)
            v112(v23(v116));
        end,
        setSelectedBodyPartIndex = if not v113 then nil else function(v117)
            v112(v24(v117));
        end
    };
end)(v30))))));


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 v5 = require(l_CorePackages_0.Packages.React);
local v6 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v7 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectButtonSliderValue);
local v11 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.SetBodyColor3);
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.selectRangeIdForSelectedBodyParts);
local v13 = require(l_Modules_0.AvatarExperience.Common.Context.useBodyDataCallbacksContext);
local v14 = require(l_CorePackages_0.Cryo);
local v15 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v15.Core.Style.withStyle;
local l_SystemSlider_0 = v15.App.Slider.SystemSlider;
local v18 = v2.PureComponent:extend("BodyColorsSliderFrame");
local v19 = Color3.new(0.75, 0.75, 0.75);
local v20 = game:DefineFastFlag("SendColorPickerAnalytics", false);
local l_GetFFlagColorPickerSliderOptimization_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagColorPickerSliderOptimization;
local v22 = require(l_Modules_0.AvatarExperience.Flags.FFlagColorPickerUseParentProps);
local v23 = game:DefineFastFlag("ColorPickerOnDragWhenMounted", false);
v18.validateProps = v4.strictInterface({
    selectedBodyPartIndex = if not v20 then nil else v4.optional(v4.number),
    sliderValue = v4.number,
    rangeStruct = v4.optional(v4.table),
    setBodyColor3 = v4.optional(v4.callback),
    setBodyColors = if not l_GetFFlagColorPickerSliderOptimization_0() then nil else v4.optional(v4.callback),
    NextSelectionUp = v4.optional(v4.table),
    sliderRef = v4.optional(v4.table),
    gridAndSidebarFrameSizeBinding = v4.union(v4.UDim2, v4.table),
    rangeIdForSelectedBodyParts = v4.optional(v4.string),
    defaultBodyColorRanges = v4.optional(v4.table),
    analytics = v4.table
});
v18.init = function(v24)
    if l_GetFFlagColorPickerSliderOptimization_0() then
        v24.state = {
            sliderValue = v24.props.sliderValue
        };
    end;
    v24.onSliderChanged = function(v25)
        local v26 = v7.getColor3AtValueForRangeId(v24.props.rangeIdForSelectedBodyParts, v25, v24.props.defaultBodyColorRanges);
        if not l_GetFFlagColorPickerSliderOptimization_0() then
            v24.props.setBodyColor3(v26, v24.props.rangeIdForSelectedBodyParts, v25, v24.props.analytics);
            return ;
        else
            v24:setState({
                sliderValue = v25
            });
            v24.props.setBodyColors(v26);
            return ;
        end;
    end;
    v24.onDragEnd = function()
        if not (not (v23 and v24.isMounted) and v23) then
            local l_sliderValue_0 = v24.state.sliderValue;
            local v28 = v7.getColor3AtValueForRangeId(v24.props.rangeIdForSelectedBodyParts, l_sliderValue_0, v24.props.defaultBodyColorRanges);
            if v20 then
                v24.props.analytics.colorPickerChanged(v24.props.rangeIdForSelectedBodyParts, v28, v24.props.selectedBodyPartIndex);
            end;
            if l_GetFFlagColorPickerSliderOptimization_0() then
                v24.props.setBodyColors(nil);
                v24.props.setBodyColor3(v28, v24.props.rangeIdForSelectedBodyParts, l_sliderValue_0, v24.props.analytics);
            end;
        end;
    end;
end;
if l_GetFFlagColorPickerSliderOptimization_0() then
    v18.didMount = function(v29)
        v29:setState({
            sliderValue = v29.props.sliderValue
        });
        if v23 then
            v29.isMounted = true;
        end;
    end;
    v18.didUpdate = function(v30, v31)
        if v31.sliderValue ~= v30.props.sliderValue then
            v30:setState({
                sliderValue = v30.props.sliderValue
            });
        end;
    end;
end;
v18.getCustomKnobColorLower = function(v32)
    return (v7.getColor3AtValueForRangeId(v32.props.rangeIdForSelectedBodyParts, if not l_GetFFlagColorPickerSliderOptimization_0() then v32.props.sliderValue else v32.state.sliderValue, v32.props.defaultBodyColorRanges));
end;
v18.renderTrack = function(v33)
    local l_rangeStruct_0 = v33.props.rangeStruct;
    if l_rangeStruct_0 then
        local v35 = {};
        for v36, v37 in l_rangeStruct_0.range, nil, nil do
            table.insert(v35, (ColorSequenceKeypoint.new((v36 - 1) / (#l_rangeStruct_0.range - 1), v37)));
        end;
        return v2.createElement("Frame", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Size = UDim2.new(1, 0, 0, v6.BodyColorsSliderTrackHeight),
            Position = UDim2.fromScale(0.5, 0.5),
            BackgroundColor3 = v19
        }, {
            UICorner = v2.createElement("UICorner", {
                CornerRadius = UDim.new(0.5, 0)
            }),
            TrackContent = v2.createElement("Frame", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Size = UDim2.new(1, -2, 0, v6.BodyColorsSliderTrackHeight - 2),
                Position = UDim2.fromScale(0.5, 0.5),
                BackgroundColor3 = Color3.new(1, 1, 1)
            }, {
                UICorner = v2.createElement("UICorner", {
                    CornerRadius = UDim.new(0.5, 0)
                }),
                UIGradient = v2.createElement("UIGradient", {
                    Color = ColorSequence.new(v35)
                })
            })
        });
    else
        return nil;
    end;
end;
v18.render = function(v38)
    return l_withStyle_0(function(v39)
        return v38:renderWithProviders(v39);
    end);
end;
v18.renderWithProviders = function(v40, v41)
    local l_Theme_0 = v41.Theme;
    return v2.createElement("Frame", {
        Size = v40.props.gridAndSidebarFrameSizeBinding:map(function(v43)
            return UDim2.new(1, -2 * v6.SkinColorSliderPadding, 0, -v43.Y.Offset);
        end),
        Position = v40.props.gridAndSidebarFrameSizeBinding:map(function(v44)
            return UDim2.new(0, v6.SkinColorSliderPadding, 1, v44.Y.Offset);
        end),
        BorderSizePixel = 0,
        BackgroundColor3 = l_Theme_0.BackgroundDefault.Color
    }, {
        Divider1 = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 1),
            BackgroundColor3 = l_Theme_0.Divider.Color,
            BackgroundTransparency = l_Theme_0.Divider.Transparency
        }),
        SliderBar = v2.createElement(l_SystemSlider_0, {
            min = 0,
            max = 1,
            stepInterval = 0.01,
            value = if not l_GetFFlagColorPickerSliderOptimization_0() then v40.props.sliderValue else v40.state.sliderValue,
            onValueChanged = v40.onSliderChanged,
            onDragEnd = if v20 or l_GetFFlagColorPickerSliderOptimization_0() then v40.onDragEnd else nil,
            width = UDim.new(1, 0),
            position = UDim2.new(0.5, 0, 0, v6.BodyColorsSliderFrameHeight / 2),
            anchorPoint = Vector2.new(0.5, 0.5),
            customTrack = v40:renderTrack(),
            customKnobColorLower = v40:getCustomKnobColorLower(),
            customPressedKnobShadowTransparencyLower = 0.5,
            customKnobBorderSize = 1,
            customKnobBorderColor = v19,
            [v2.Ref] = v40.props.sliderRef,
            NextSelectionUp = v40.props.NextSelectionUp
        })
    });
end;
if v23 then
    v18.willUnmount = function(v45)
        v45.isMounted = false;
    end;
end;
v18 = v3.connect(function(v46, _)
    local l_AvatarExperience_0 = v46.AvatarExperience;
    local l_DefaultBodyColorRanges_0 = l_AvatarExperience_0.AvatarEditor.DefaultBodyColorRanges;
    local v50 = v12(v46);
    assert(v50, "rangeIdForSelectedBodyParts ~= nil.");
    local v51 = v7.getRangeStructForRangeId(v50, l_DefaultBodyColorRanges_0);
    assert(v51, "rangeStruct ~= nil.");
    return {
        rangeIdForSelectedBodyParts = if not v22 then v50 else nil,
        defaultBodyColorRanges = if not v22 then l_DefaultBodyColorRanges_0 else nil,
        selectedBodyPartIndex = if not v20 then nil else l_AvatarExperience_0.AvatarEditor.BodyColorPickerSettings.selectedBodyPartIndex,
        rangeStruct = v51,
        sliderValue = v10(l_AvatarExperience_0, v50)
    };
end, function(v52)
    return {
        setBodyColor3 = function(v53, v54, v55, v56)
            v52(v11(v53, v54, v55, v56));
        end
    };
end)((l_RoactServices_0.connect({
    analytics = v9
})(v18)));
if not l_GetFFlagColorPickerSliderOptimization_0() then
    return v18;
else
    return function(v57)
        return v5.createElement(v18, (v14.Dictionary.join(v13(), v57)));
    end;
end;


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 v4 = require(l_CorePackages_0.UIBlox);
local l_FitFrameVertical_0 = require(l_CorePackages_0.AvatarExperienceDeps).RoactFitComponents.FitFrameVertical;
local l_withStyle_0 = v4.Style.withStyle;
local l_ImageSetLabel_0 = v4.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v4.App.ImageSet.Images;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.BodySizeSlider);
local v11 = l_Images_0["icons/menu/body_tall"];
local v12 = l_Images_0["icons/menu/body_thin"];
local v13 = l_Images_0["icons/menu/body_heavy"];
local v14 = l_Images_0["icons/menu/body_short"];
local v15 = v3.PureComponent:extend("BodySizeRadar");
v15.render = function(v16)
    return l_withStyle_0(function(v17)
        return l_withLocalization_0({
            bodySize = "Feature.Avatar.Label.BodySize"
        })(function(v18)
            local l_lockNavigationCallback_0 = v16.props.lockNavigationCallback;
            local l_unlockNavigationCallback_0 = v16.props.unlockNavigationCallback;
            local l_LayoutOrder_0 = v16.props.LayoutOrder;
            local l_isDisabled_0 = v16.props.isDisabled;
            local l_Font_0 = v17.Font;
            local l_Theme_0 = v17.Theme;
            local l_Font_1 = l_Font_0.Header2.Font;
            local v26 = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize;
            return v3.createElement(l_FitFrameVertical_0, {
                width = UDim.new(1, 0),
                contentPadding = UDim.new(0, 24),
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                BackgroundTransparency = 1,
                LayoutOrder = l_LayoutOrder_0
            }, {
                BodySizeLabel = v3.createElement("TextLabel", {
                    Size = UDim2.new(1, 0, 0, v26),
                    BackgroundTransparency = 1,
                    Text = v18.bodySize,
                    TextSize = v26,
                    TextColor3 = l_Theme_0.TextDefault.Color,
                    TextTransparency = l_Theme_0.TextDefault.TextTransparency,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    LayoutOrder = 1,
                    Font = l_Font_1
                }),
                BodySizeContainer = v3.createElement(l_FitFrameVertical_0, {
                    width = UDim.new(1, 0),
                    contentPadding = UDim.new(0, 8),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    BackgroundTransparency = 1,
                    LayoutOrder = 2
                }, {
                    TallIcon = v3.createElement(l_ImageSetLabel_0, {
                        AnchorPoint = Vector2.new(0, 0.5),
                        LayoutOrder = 1,
                        Size = UDim2.new(0, 36, 0, 36),
                        BackgroundTransparency = 1,
                        ImageColor3 = l_Theme_0.IconEmphasis.Color,
                        ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                        Image = v11
                    }),
                    Wrapper = v3.createElement(l_FitFrameVertical_0, {
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        BackgroundTransparency = 1,
                        LayoutOrder = 2
                    }, {
                        ThinIcon = v3.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0, 0.5),
                            LayoutOrder = 1,
                            Size = UDim2.new(0, 36, 0, 36),
                            BackgroundTransparency = 1,
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                            Image = v12
                        }),
                        BodySize = v3.createElement(v10, {
                            LayoutOrder = 2,
                            lockNavigationCallback = l_lockNavigationCallback_0,
                            unlockNavigationCallback = l_unlockNavigationCallback_0,
                            isDisabled = l_isDisabled_0,
                            NextSelectionLeft = v16.props.NextSelectionLeft,
                            NextSelectionRight = v16.props.NextSelectionRight,
                            NextSelectionUp = v16.props.NextSelectionUp,
                            NextSelectionDown = v16.props.NextSelectionDown,
                            [v3.Ref] = v16.props.forwardRef
                        }),
                        HeavyIcon = v3.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0, 0.5),
                            LayoutOrder = 3,
                            Size = UDim2.new(0, 36, 0, 36),
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                            BackgroundTransparency = 1,
                            Image = v13
                        })
                    }),
                    ShortIcon = v3.createElement(l_ImageSetLabel_0, {
                        AnchorPoint = Vector2.new(0, 0.5),
                        LayoutOrder = 3,
                        Size = UDim2.new(0, 36, 0, 36),
                        BackgroundTransparency = 1,
                        ImageColor3 = l_Theme_0.IconEmphasis.Color,
                        ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                        Image = v14
                    })
                })
            });
        end);
    end);
end;
return v3.forwardRef(function(v27, v28)
    return v3.createElement(v15, v2.Dictionary.join(v27, {
        forwardRef = v28
    }));
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.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.UIBlox);
local v6 = require(l_CorePackages_0.Cryo);
local v7 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v8 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetAvatarScales);
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.TwoAxisSlider);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_withStyle_0 = v5.Style.withStyle;
local l_ImageSetLabel_0 = v5.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v5.App.ImageSet.Images;
local v14 = Vector2.new(224, 224);
local v15 = l_Images_0["component_assets/circle_17"];
local v16 = v3.PureComponent:extend("BodySizeSlider");
v16.init = function(v17)
    local l_forwardRef_0 = v17.props.forwardRef;
    v17.mapPositionToScales = function(v19)
        local l_widthRules_0 = v17.props.widthRules;
        local v21 = math.clamp(v19.X * (l_widthRules_0.max - l_widthRules_0.min) + l_widthRules_0.min, l_widthRules_0.min, l_widthRules_0.max);
        local l_heightRules_0 = v17.props.heightRules;
        return v21, (math.clamp((1 - v19.Y) * (l_heightRules_0.max - l_heightRules_0.min) + l_heightRules_0.min, l_heightRules_0.min, l_heightRules_0.max));
    end;
    v17.mapScalesToPosition = function(v23, v24)
        local l_widthRules_1 = v17.props.widthRules;
        local v26 = (v23 - l_widthRules_1.min) / (l_widthRules_1.max - l_widthRules_1.min);
        local l_heightRules_1 = v17.props.heightRules;
        return Vector2.new(v26, 1 - (v24 - l_heightRules_1.min) / (l_heightRules_1.max - l_heightRules_1.min));
    end;
    v17.setScales = function(v28, v29)
        v17.props.setScales({
            width = v28,
            height = v29
        });
    end;
    v17.getBackgroundAbsolutePosition = function()
        local v30 = l_forwardRef_0:getValue();
        if not v30 then
            return nil;
        else
            return v30.AbsolutePosition;
        end;
    end;
    v17.getBackgroundAbsoluteSize = function()
        local v31 = l_forwardRef_0:getValue();
        if not v31 then
            return nil;
        else
            return v31.AbsoluteSize;
        end;
    end;
end;
v16.render = function(v32)
    local l_width_0 = v32.props.width;
    local l_height_0 = v32.props.height;
    local l_widthRules_2 = v32.props.widthRules;
    local l_heightRules_2 = v32.props.heightRules;
    local l_LayoutOrder_0 = v32.props.LayoutOrder;
    local l_lockNavigationCallback_0 = v32.props.lockNavigationCallback;
    local l_unlockNavigationCallback_0 = v32.props.unlockNavigationCallback;
    local l_isDisabled_0 = v32.props.isDisabled;
    local l_forwardRef_1 = v32.props.forwardRef;
    return l_withStyle_0(function(v42)
        local l_Theme_0 = v42.Theme;
        return v3.createElement(l_ImageSetLabel_0, {
            Image = v15,
            Size = UDim2.new(0, v14.X, 0, v14.Y),
            BackgroundTransparency = 1,
            ImageColor3 = l_Theme_0.BackgroundUIDefault.Color,
            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.BackgroundUIDefault.Transparency else 0.5,
            LayoutOrder = l_LayoutOrder_0,
            ScaleType = Enum.ScaleType.Slice,
            SliceCenter = Rect.new(9, 9, 9, 9),
            ZIndex = 2,
            [v3.Ref] = l_forwardRef_1
        }, {
            TwoAxisSlider = v3.createElement(v9, {
                mapPositionToScales = v32.mapPositionToScales,
                mapScalesToPosition = v32.mapScalesToPosition,
                setScales = v32.setScales,
                xScaleRules = l_widthRules_2,
                yScaleRules = l_heightRules_2,
                xScale = l_width_0,
                yScale = l_height_0,
                getBackgroundAbsolutePosition = v32.getBackgroundAbsolutePosition,
                getBackgroundAbsoluteSize = v32.getBackgroundAbsoluteSize,
                isDisabled = l_isDisabled_0,
                onDragStart = l_lockNavigationCallback_0,
                onDragEnd = l_unlockNavigationCallback_0
            })
        });
    end);
end;
v16 = v4.connect(function(v44, _)
    local l_AvatarScales_0 = v44.AvatarExperience.AvatarEditor.Character.AvatarScales;
    local v47 = v44.AvatarExperience.AvatarEditor.AvatarSettings[v7.AvatarSettings.scalesRules];
    return {
        height = l_AvatarScales_0.height,
        width = l_AvatarScales_0.width,
        heightRules = v47.height,
        widthRules = v47.width,
        avatarType = v44.AvatarExperience.AvatarEditor.Character.AvatarType
    };
end, function(v48)
    return {
        setScales = function(v49)
            v48(v8(v49));
        end
    };
end)(v16);
return v3.forwardRef(function(v50, v51)
    return v3.createElement(v16, v6.Dictionary.join(v50, {
        forwardRef = v51
    }));
end);