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.Packages.t);
local v7 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_getRbxthumbWithTypeSizeAndOptions_0 = require(l_CorePackages_0.Workspace.Packages.UserLib).Utils.getRbxthumbWithTypeSizeAndOptions;
local v11 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v12 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v13 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableFixBundleItemDetailDeepLinkHydrationBug);
local l_ItemTile_0 = v5.Tile.ItemTile;
local v15 = v3.PureComponent:extend("BaseItemCard");
v15.validateProps = v6.strictInterface({
    itemId = v6.optional(v6.string),
    itemType = v6.optional(v6.string),
    onActivated = v6.callback,
    hideItemTitle = v6.optional(v6.boolean),
    DEPRECATED_itemData = if not v12 then v6.optional(v6.table) else nil,
    itemInfo = if not v12 then nil else v6.optional(v6.table)
});
v15.render = function(v16)
    local l_DEPRECATED_itemData_0 = v16.props.DEPRECATED_itemData;
    local l_itemInfo_0 = v16.props.itemInfo;
    local l_itemId_0 = v16.props.itemId;
    local l_itemType_0 = v16.props.itemType;
    local v21 = nil;
    if v16.props.hideItemTitle then
        v21 = 0;
    end;
    local v22 = nil;
    local v23 = nil;
    local v24 = nil;
    if not v12 then
        if not v13() then
            if l_DEPRECATED_itemData_0 then
                v22 = l_getRbxthumbWithTypeSizeAndOptions_0(l_itemId_0, v8.GetRbxThumbType(l_itemType_0), 150);
                v23 = l_DEPRECATED_itemData_0.name;
                v24 = v8.DEPRECATED_HasPremiumBenefits(l_DEPRECATED_itemData_0);
            end;
        else
            if not (not l_itemType_0 or not l_itemId_0) then
                v22 = l_getRbxthumbWithTypeSizeAndOptions_0(l_itemId_0, v8.GetRbxThumbType(l_itemType_0), 150);
            end;
            if l_DEPRECATED_itemData_0 then
                v23 = l_DEPRECATED_itemData_0.name;
                v24 = v8.DEPRECATED_HasPremiumBenefits(l_DEPRECATED_itemData_0);
            end;
        end;
    elseif not v13() then
        if l_itemInfo_0 then
            v22 = l_getRbxthumbWithTypeSizeAndOptions_0(l_itemId_0, v8.GetRbxThumbType(l_itemType_0), 150);
            v23 = l_itemInfo_0.name;
            v24 = l_itemInfo_0.hasPremiumBenefits;
        end;
    else
        if not (not l_itemType_0 or not l_itemId_0) then
            v22 = l_getRbxthumbWithTypeSizeAndOptions_0(l_itemId_0, v8.GetRbxThumbType(l_itemType_0), 150);
        end;
        if l_itemInfo_0 then
            v23 = l_itemInfo_0.name;
            v24 = l_itemInfo_0.hasPremiumBenefits;
        end;
    end;
    return v3.createElement(l_ItemTile_0, {
        footer = v16.props.footer,
        onActivated = v16.props.onActivated,
        name = v23,
        thumbnail = v22,
        isPremium = v24,
        titleTextLineCount = v21
    });
end;
return (v4.connect(function(v25, v26)
    local v27 = nil;
    local v28 = nil;
    if not v12 then
        v27 = v7(v25.AvatarExperience.Common, v26.itemId, v26.itemType);
    else
        v28 = v11(v25.AvatarExperience, v26.itemId, v26.itemType);
    end;
    return {
        itemInfo = v28,
        DEPRECATED_itemData = v27
    };
end)(v15));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.UIBlox);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v6 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_Images_0 = v4.App.ImageSet.Images;
local l_NumberLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).NumberLocalization;
local l_ShimmerPanel_0 = v4.App.Loading.ShimmerPanel;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_withStyle_0 = v4.Style.withStyle;
local l_ImageSetLabel_0 = v4.Core.ImageSet.ImageSetLabel;
local v13 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagCollectiblesCatalogFollowUpForSaleLocation);
local v14 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagSupportLooksTileFooter);
local v15 = l_Images_0["icons/common/robux"];
local v16 = v3.PureComponent:extend("ItemCardFooter");
v16.render = function(v17)
    local l_localization_0 = v17.props.localization;
    local l_price_0 = v17.props.price;
    local l_isPriceLoaded_0 = v17.props.isPriceLoaded;
    local l_isSellableInShop_0 = v17.props.isSellableInShop;
    local l_fitContentHeight_0 = v17.props.fitContentHeight;
    return l_withStyle_0(function(v23)
        return l_withLocalization_0({
            freeText = "Feature.Catalog.LabelFree",
            offSaleText = "Feature.Catalog.LabelOffSale",
            noResellerText = "Feature.Catalog.LabelNoResellers"
        })(function(v24)
            local l_Font_0 = v23.Font.SubHeader1.Font;
            local v26 = v23.Font.BaseSize * v23.Font.SubHeader1.RelativeSize;
            local l_Theme_0 = v23.Theme;
            local v28 = nil;
            local v29 = nil;
            local v30 = Vector2.new(v26, v26);
            if not v13() or l_isSellableInShop_0 then
                if l_price_0 == 0 then
                    v29 = v24.freeText;
                elseif not l_price_0 then
                    if l_isPriceLoaded_0 then
                        v29 = v24.offSaleText;
                    end;
                else
                    v28 = v15;
                    v29 = l_NumberLocalization_0.localize(string.format("%.0f", l_price_0), l_localization_0:GetLocale());
                end;
            else
                v29 = v24.noResellerText;
            end;
            local v31 = 0;
            if v28 then
                v31 = v30.X + 4;
            end;
            return v3.createElement("Frame", {
                Size = if not not v14() and l_fitContentHeight_0 then UDim2.new(1, 0, 0, 0) else UDim2.new(1, 0, 1, 0),
                BackgroundTransparency = 1,
                AutomaticSize = if not not v14() and l_fitContentHeight_0 then Enum.AutomaticSize.Y else nil,
                AnchorPoint = if not not v14() and l_fitContentHeight_0 then Vector2.new(0, 0.5) else nil,
                Position = if not not v14() and l_fitContentHeight_0 then UDim2.new(0, 0, 0.5, 0) else nil
            }, {
                Shimmer = not l_isPriceLoaded_0 and v3.createElement(l_ShimmerPanel_0, {
                    Size = UDim2.new(0.8, 0, 0, v26)
                }),
                Icon = v28 and v3.createElement(l_ImageSetLabel_0, {
                    BackgroundTransparency = 1,
                    Image = v28,
                    ImageColor3 = l_Theme_0.IconEmphasis.Color,
                    ImageTransparency = l_Theme_0.IconEmphasis.Transparency,
                    Size = UDim2.new(0, v30.X, 0, v30.Y)
                }),
                TextLabel = v29 and v3.createElement("TextLabel", {
                    AnchorPoint = Vector2.new(1, 0),
                    BackgroundTransparency = 1,
                    Position = UDim2.new(1, 0, 0, 0),
                    Size = UDim2.new(1, -v31, 1, 0),
                    Font = l_Font_0,
                    TextColor3 = l_Theme_0.SecondaryContent.Color,
                    TextTransparency = l_Theme_0.SecondaryContent.Transparency,
                    TextSize = v26,
                    Text = v29,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Top
                })
            });
        end);
    end);
end;
return (l_RoactServices_0.connect({
    localization = v6
})(v16));


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.RoactNavigation);
local v5 = require(l_CorePackages_0.RoactRodux);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v7 = require(l_CorePackages_0.Packages.t);
local v8 = require(l_Modules_0.AvatarExperience.Common.Thunks.Exit3DFullView);
local v9 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v10 = require(l_Modules_0.AvatarExperience.Catalog.GetCatalogCategories);
local v11 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.SetCategoryAndSubcategory);
local v12 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetSearchCategoryAndSubcategory);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.NavBar.NavigationFrame);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v15 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXSearchResultsCategories);
local v16 = v3.PureComponent:extend("CatalogNavigation");
v16.validateProps = v7.strictInterface({
    analytics = v7.table,
    axAnalytics = v7.table,
    layoutOrderMain = v7.number,
    layoutOrderSub = v7.number,
    navHeightMain = v7.number,
    navHeightSub = v7.number,
    absoluteSizeChanged = v7.callback,
    navBarRef = v7.table,
    NextSelectionDown = v7.optional(v7.table),
    NextSelectionUp = v7.optional(v7.table),
    backToTopSignal = v7.optional(v7.table),
    showingTopics = v7.optional(v7.boolean),
    fromSearch = if not v15() then nil else v7.optional(v7.boolean),
    onCategoryOrSubcategoryChange = if not v15() then nil else v7.optional(v7.callback),
    selectedCategoryIndex = v7.number,
    selectedSubcategoryIndex = v7.number,
    setCategoryAndSubcategory = v7.callback,
    setSearchCategoryAndSubcategory = if not v15() then nil else v7.callback,
    exit3DFullView = v7.callback,
    hideCommunityCategory = v7.boolean,
    hidePremiumCategory = v7.boolean,
    navigation = v7.table,
    enableSearchResultsCategories = if not v15() then nil else v7.optional(v7.boolean)
});
v16.init = function(v17)
    v17.selectCategory = function(v18)
        if not (not v15() or not v17.props.enableSearchResultsCategories) then
            if v18 == v17.props.selectedCategoryIndex then
                return ;
            else
                local l_onCategoryOrSubcategoryChange_0 = v17.props.onCategoryOrSubcategoryChange;
                if l_onCategoryOrSubcategoryChange_0 then
                    l_onCategoryOrSubcategoryChange_0(v18, 0);
                end;
            end;
        end;
        v17:setCategoryAndSubcategory(v18, nil);
    end;
    v17.selectSubcategory = function(_, v21)
        if not (not v15() or not v17.props.enableSearchResultsCategories) then
            if v21 == v17.props.selectedSubcategoryIndex then
                return ;
            else
                local l_onCategoryOrSubcategoryChange_1 = v17.props.onCategoryOrSubcategoryChange;
                if l_onCategoryOrSubcategoryChange_1 then
                    l_onCategoryOrSubcategoryChange_1(v17.props.selectedCategoryIndex, v21);
                end;
            end;
        end;
        v17:setCategoryAndSubcategory(nil, v21);
    end;
    v17.onSubNavigationPropsDidUpdate = function(v23, v24)
        if not (not (v17.props.selectedCategoryIndex ~= v23.selectedCategoryIndex) or not v24.current) then
            v24.current.CanvasPosition = Vector2.new();
        end;
    end;
end;
v16.setCategoryAndSubcategory = function(v25, v26, v27)
    local l_analytics_0 = v25.props.analytics;
    local l_axAnalytics_0 = v25.props.axAnalytics;
    local l_navigation_0 = v25.props.navigation;
    local l_backToTopSignal_0 = v25.props.backToTopSignal;
    if (l_backToTopSignal_0 and (not (v26 ~= nil) or v26 == v25.props.selectedCategoryIndex)) and (not (v27 ~= nil) or v27 == v25.props.selectedSubcategoryIndex) then
        l_backToTopSignal_0:fire();
    end;
    if ((not v15() or not v25.props.enableSearchResultsCategories) or not v25.props.fromSearch) or not v25.props.setSearchCategoryAndSubcategory then
        v25.props.setCategoryAndSubcategory(v26, v27, l_analytics_0);
    else
        v25.props.setSearchCategoryAndSubcategory(v26, v27);
    end;
    v25.props.exit3DFullView(l_axAnalytics_0, l_navigation_0.state.routeName);
end;
v16.render = function(v32)
    local l_layoutOrderMain_0 = v32.props.layoutOrderMain;
    local l_layoutOrderSub_0 = v32.props.layoutOrderSub;
    local l_navHeightMain_0 = v32.props.navHeightMain;
    local l_navHeightSub_0 = v32.props.navHeightSub;
    local l_selectedCategoryIndex_0 = v32.props.selectedCategoryIndex;
    local l_selectedSubcategoryIndex_0 = v32.props.selectedSubcategoryIndex;
    local l_absoluteSizeChanged_0 = v32.props.absoluteSizeChanged;
    local l_showingTopics_0 = v32.props.showingTopics;
    local l_hideCommunityCategory_0 = v32.props.hideCommunityCategory;
    local l_hidePremiumCategory_0 = v32.props.hidePremiumCategory;
    local l_selectCategory_0 = v32.selectCategory;
    local l_selectSubcategory_0 = v32.selectSubcategory;
    local v45 = v9.filterCategories(v10(), l_hideCommunityCategory_0, l_hidePremiumCategory_0);
    return v3.createElement(v13, {
        layoutOrderMain = l_layoutOrderMain_0,
        navHeightMain = l_navHeightMain_0,
        layoutOrderSub = l_layoutOrderSub_0,
        navHeightSub = l_navHeightSub_0,
        categoryTable = v45,
        selectedCategoryIndex = l_selectedCategoryIndex_0,
        selectCategory = l_selectCategory_0,
        selectedSubcategoryIndex = l_selectedSubcategoryIndex_0,
        subcategoryTable = v45[l_selectedCategoryIndex_0].Subcategories,
        onSubNavigationPropsDidUpdate = v32.onSubNavigationPropsDidUpdate,
        selectSubcategory = l_selectSubcategory_0,
        absoluteSizeChanged = l_absoluteSizeChanged_0,
        showingTopics = l_showingTopics_0,
        navigationFrameRef = v32.props.navBarRef,
        NextSelectionUp = v32.props.NextSelectionUp,
        NextSelectionDown = v32.props.NextSelectionDown
    });
end;
return v5.connect(function(v46, v47)
    local v48 = nil;
    local v49 = nil;
    if ((not v15() or not v47.enableSearchResultsCategories) or not v47.fromSearch) or not v46.AvatarExperience.Catalog.SearchCategories then
        v48 = v46.AvatarExperience.Catalog.Categories.category;
        v49 = v46.AvatarExperience.Catalog.Categories.subcategory;
    else
        v48 = v46.AvatarExperience.Catalog.SearchCategories.category;
        v49 = v46.AvatarExperience.Catalog.SearchCategories.subcategory;
    end;
    return {
        selectedCategoryIndex = v48,
        selectedSubcategoryIndex = v49
    };
end, function(v50)
    return {
        setCategoryAndSubcategory = function(v51, v52, v53)
            v50(v11(v51, v52, v53));
        end,
        setSearchCategoryAndSubcategory = if not v15() then nil else function(v54, v55)
            v50(v12(v54, v55));
        end,
        exit3DFullView = function(v56, v57)
            v50(v8(v56, v57));
        end
    };
end)((v4.withNavigation((l_RoactAppPolicy_0.connect(function(v58, _)
    return {
        hideCommunityCategory = not v58.getCatalogCommunityCreations(),
        hidePremiumCategory = not v58.getCatalogPremiumCategory()
    };
end)(v16)))));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Packages.React);
local l_NavigationEvents_0 = require(l_CorePackages_0.RoactNavigation).NavigationEvents;
local v5 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
return function(v6)
    local v7 = v5.useLogExposureOnce(v6.ixpTest);
    if v6.ixpTest.isEnabled() then
        return v3.createElement(l_NavigationEvents_0, {
            onDidFocus = v7
        });
    else
        return nil;
    end;
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.Cryo);
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.Packages.t);
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local v7 = require(l_CorePackages_0.UIBlox);
local l_RoactFitComponents_0 = require(l_CorePackages_0.AvatarExperienceDeps).RoactFitComponents;
local l_FitFrameHorizontal_0 = l_RoactFitComponents_0.FitFrameHorizontal;
local l_withStyle_0 = v7.Style.withStyle;
local v11 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v12 = v4.PureComponent:extend("PillBar");
v12.validateProps = v5.strictInterface({
    layoutOrder = v5.optional(v5.number),
    [v4.Children] = v5.optional(v5.table),
    height = v5.optional(v5.number),
    forwardRef = v5.optional(v5.table),
    NextSelectionUp = v5.optional(v5.table),
    NextSelectionDown = v5.optional(v5.table),
    NextSelectionLeft = v5.optional(v5.table),
    NextSelectionRight = v5.optional(v5.table)
});
v12.init = function(v13)
    v13.gradientFrameRef = v4.createRef();
    v13.scrollingFrameRef = v4.createRef();
    v13.categoryButtonRefs = {};
    local v14, v15 = v4.createBinding(false);
    v13.showLeftGradientBinding = v14;
    v13.updateShowLeftGradient = v15;
    v14, v15 = v4.createBinding(false);
    v13.showRightGradientBinding = v14;
    v13.updateShowRightGradient = v15;
    v13.checkShowGradient = function(v16)
        local v17, v18, v19 = v11.shouldShowGradientForScrollingFrame(v16);
        v18 = v17 and v18;
        v19 = v17 and v19;
        v13.updateShowLeftGradient(v18);
        v13.updateShowRightGradient(v19);
    end;
    v13.onNavFrameSizeChanged = function(v20)
        if v13.scrollingFrameRef.current then
            v13.scrollingFrameRef.current.CanvasSize = UDim2.new(0, v20.AbsoluteSize.X, 1, 0);
        end;
    end;
end;
local function v23(v21, v22)
    return v4.createElement("UIGradient", {
        Rotation = v22,
        Color = ColorSequence.new(v21.BackgroundDefault.Color),
        Transparency = NumberSequence.new({
            NumberSequenceKeypoint.new(0, 0),
            NumberSequenceKeypoint.new(0.666, 1),
            NumberSequenceKeypoint.new(1, 1)
        })
    });
end;
v12.render = function(v24)
    local l_layoutOrder_0 = v24.props.layoutOrder;
    return l_withStyle_0(function(v26)
        local l_Theme_0 = v26.Theme;
        local l_forwardRef_0 = v24.props.forwardRef;
        local l_height_0 = v24.props.height;
        return v4.createElement(l_Focusable_0.Frame, {
            Size = if not l_height_0 then UDim2.fromScale(1, 1) else UDim2.new(1, 0, 0, l_height_0),
            BackgroundColor3 = l_Theme_0.BackgroundDefault.Color,
            BackgroundTransparency = l_Theme_0.BackgroundDefault.Transparency,
            BorderSizePixel = 0,
            LayoutOrder = l_layoutOrder_0,
            [v4.Ref] = l_forwardRef_0,
            NextSelectionUp = v24.props.NextSelectionUp,
            NextSelectionDown = v24.props.NextSelectionDown
        }, {
            Left = v4.createElement("Frame", {
                AnchorPoint = Vector2.new(0, 0),
                Position = UDim2.new(0, 0, 0, 0),
                Size = UDim2.new(0, 50, 1, 0),
                BackgroundColor3 = Color3.new(1, 1, 1),
                BorderSizePixel = 0,
                ZIndex = 2,
                Visible = v24.showLeftGradientBinding
            }, {
                Gradient = v23(l_Theme_0, 0)
            }),
            Right = v4.createElement("Frame", {
                AnchorPoint = Vector2.new(1, 0),
                Position = UDim2.new(1, 0, 0, 0),
                Size = UDim2.new(0, 50, 1, 0),
                BackgroundColor3 = Color3.new(1, 1, 1),
                BorderSizePixel = 0,
                ZIndex = 2,
                Visible = v24.showRightGradientBinding
            }, {
                Gradient = v23(l_Theme_0, 180)
            }),
            ScrollingList = v4.createElement("ScrollingFrame", {
                Size = UDim2.new(1, 0, 1, 0),
                ScrollBarThickness = 0,
                BackgroundTransparency = 1,
                ZIndex = 1,
                ElasticBehavior = Enum.ElasticBehavior.Always,
                ScrollingDirection = Enum.ScrollingDirection.X,
                [v4.Change.AbsoluteSize] = v24.checkShowGradient,
                [v4.Change.CanvasSize] = v24.checkShowGradient,
                [v4.Change.CanvasPosition] = v24.checkShowGradient,
                [v4.Ref] = v24.scrollingFrameRef
            }, {
                SubNavFrame = v4.createElement(l_FitFrameHorizontal_0, {
                    height = UDim.new(1, 0),
                    contentPadding = UDim.new(0, 15),
                    margin = l_RoactFitComponents_0.Rect.rectangle(15, 0),
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    FillDirection = Enum.FillDirection.Horizontal,
                    BackgroundTransparency = 1,
                    [v4.Change.AbsoluteSize] = v24.onNavFrameSizeChanged
                }, v24.props[v4.Children])
            })
        });
    end);
end;
return v4.forwardRef(function(v30, v31)
    return v4.createElement(v12, v3.Dictionary.join(v30, {
        forwardRef = v31
    }));
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.Cryo);
local v5 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v5.Focusable;
local l_withNavigation_0 = require(l_CorePackages_0.RoactNavigation).withNavigation;
local v8 = require(l_CorePackages_0.UIBlox);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v10 = require(l_CorePackages_0.AvatarExperienceDeps);
local v11 = require(l_CorePackages_0.Packages.t);
local l_withSelectionCursorProvider_0 = v8.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = v8.App.SelectionImage.CursorKind;
local l_RoactFitComponents_0 = v10.RoactFitComponents;
local l_FitFrameOnAxis_0 = l_RoactFitComponents_0.FitFrameOnAxis;
local l_IconSize_0 = v8.App.Constant.IconSize;
local l_ImageSetButton_0 = v8.Core.ImageSet.ImageSetButton;
local l_withStyle_0 = v8.Style.withStyle;
local l_FitTextLabel_0 = l_RoactFitComponents_0.FitTextLabel;
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v21 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.Debug.logOnOverlayClosed);
local v22 = {
    left = 4,
    right = 0,
    top = 0,
    bottom = 0
};
local v23 = v3.PureComponent:extend("QuickMenuToolTip");
v23.validateProps = v11.strictInterface({
    forwardRef = v11.optional(v11.table),
    NextSelectionRight = v11.optional(v11.table),
    navigation = v11.table
});
v23.makeOnOverlayClosed = function(_, v25)
    return function()
        v21("QuickMenuToolTip");
        v25.captureFocus();
    end;
end;
v23.openQuickMenu = function(v26, v27)
    v26.props.navigation.navigate(v20.AvatarExperienceQuickMenu, {
        onOverlayClosed = v26:makeOnOverlayClosed(v27)
    });
end;
v23.render = function(v28)
    return l_withLocalization_0({
        quickMenu = "Feature.Catalog.Heading.QuickMenu"
    })(function(v29)
        return l_withStyle_0(function(v30)
            local l_Font_0 = v30.Font;
            local l_Theme_0 = v30.Theme;
            local l_Font_1 = l_Font_0.Header1.Font;
            local v34 = l_Font_0.BaseSize * l_Font_0.Header1.RelativeSize;
            return l_withSelectionCursorProvider_0(function(v35)
                return v5.withFocusController(function(v36)
                    local function v37()
                        v28:openQuickMenu(v36);
                    end;
                    return v3.createElement(l_Focusable_0[l_FitFrameOnAxis_0], {
                        axis = l_FitFrameOnAxis_0.Axis.Horizontal,
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Right,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        BackgroundTransparency = 1,
                        minimumSize = UDim2.new(0, 0, 0, 36),
                        margin = v22,
                        LayoutOrder = 1,
                        [v3.Ref] = v28.props.forwardRef,
                        NextSelectionRight = v28.props.NextSelectionRight,
                        SelectionImageObject = v35(l_CursorKind_0.RoundedRectNoInset),
                        inputBindings = {
                            OpenQuickMenu = v5.Input.onBegin(Enum.KeyCode.ButtonA, v37)
                        }
                    }, {
                        QuickMenuText = v3.createElement(l_FitTextLabel_0, {
                            width = l_FitTextLabel_0.Width.FitToText,
                            Size = UDim2.fromOffset(l_IconSize_0.Regular, l_IconSize_0.Regular),
                            BackgroundTransparency = 1,
                            Text = v29.quickMenu,
                            Font = l_Font_1,
                            TextSize = v34,
                            TextColor3 = l_Theme_0.TextEmphasis.Color,
                            TextTransparency = l_Theme_0.TextEmphasis.Transparency,
                            LayoutOrder = 1
                        }),
                        QuickMenuIcon = v3.createElement(l_ImageSetButton_0, {
                            Size = UDim2.fromOffset(l_IconSize_0.Regular, l_IconSize_0.Regular),
                            BackgroundTransparency = 1,
                            Image = "rbxasset://textures/ui/Controls/DesignSystem/ButtonStart.png",
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = l_Theme_0.IconEmphasis.Transparency,
                            LayoutOrder = 2,
                            Selectable = false,
                            [v3.Event.Activated] = v37
                        })
                    });
                end);
            end);
        end);
    end);
end;
v23 = l_withNavigation_0(v23);
return v3.forwardRef(function(v38, v39)
    return v3.createElement(v23, v4.Dictionary.join(v38, {
        forwardRef = v39
    }));
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 l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v6 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_withNavigation_0 = require(l_CorePackages_0.RoactNavigation).withNavigation;
local v8 = require(l_CorePackages_0.UIBlox);
local v9 = require(l_CorePackages_0.AvatarExperienceDeps);
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local l_withSelectionCursorProvider_0 = v8.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = v8.App.SelectionImage.CursorKind;
local v13 = require(l_CorePackages_0.Workspace.Packages.VerifiedBadges);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_RoactFitComponents_0 = v9.RoactFitComponents;
local l_FitFrameOnAxis_0 = l_RoactFitComponents_0.FitFrameOnAxis;
local l_FitFrameVertical_0 = l_RoactFitComponents_0.FitFrameVertical;
local l_Images_0 = v8.App.ImageSet.Images;
local l_ImageSetLabel_0 = v8.Core.ImageSet.ImageSetLabel;
local l_ImageSetButton_0 = v8.Core.ImageSet.ImageSetButton;
local v21 = require(l_Modules_0.LuaApp.AppPage);
local v22 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v23 = require(l_Modules_0.LuaApp.Constants);
local l_FitTextLabel_0 = l_RoactFitComponents_0.FitTextLabel;
local v25 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.Debug.logOnOverlayClosed);
local v26 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local v27 = require(l_Modules_0.LuaApp.Http.UrlBuilder);
local l_NumberLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).NumberLocalization;
local v29 = require(l_CorePackages_0.Workspace.Packages.UserLib);
local l_Constants_0 = v29.Utils.Constants;
local l_getRbxthumbWithTypeSizeAndOptions_0 = v29.Utils.getRbxthumbWithTypeSizeAndOptions;
local l_withStyle_0 = v8.Style.withStyle;
local l_AVATAR_PLACEHOLDER_IMAGE_0 = v23.AVATAR_PLACEHOLDER_IMAGE;
local v34 = l_Images_0["component_assets/circle_17"];
local v35 = nil;
local l_ImageRectSize_0 = v34.ImageRectSize;
local v37 = 8 * l_Images_0.ImagesResolutionScale;
local v38 = 8 * l_Images_0.ImagesResolutionScale;
v35 = Rect.new(v37, v38, l_ImageRectSize_0.x - v37, l_ImageRectSize_0.y - v38);
l_ImageRectSize_0 = l_Images_0["icons/status/item/limited"];
v37 = l_Images_0["icons/common/robux"];
v38 = l_Constants_0.RbxthumbTypes.AvatarHeadShot;
local v39 = v3.PureComponent:extend("ResellerCard");
v39.init = function(v40)
    v40.viewProfile = function()
        v40.props.navigateDown({
            name = v21.GenericWebPage,
            detail = v27.user.profile({
                userId = v40.props.sellerId
            }),
            extraProps = {
                titleKey = "CommonUI.Features.Label.Profile"
            }
        });
    end;
    v40.openPurchasePrompt = function()
        local l_userRobux_0 = v40.props.userRobux;
        local l_itemId_0 = v40.props.itemId;
        local l_itemType_0 = v40.props.itemType;
        local l_productId_0 = v40.props.productId;
        local l_itemPrice_0 = v40.props.itemPrice;
        local l_sellerId_0 = v40.props.sellerId;
        local l_sellerName_0 = v40.props.sellerName;
        local l_userAssetId_0 = v40.props.userAssetId;
        local l_collectibleInstanceId_0 = v40.props.collectibleInstanceId;
        local l_navigation_0 = v40.props.navigation;
        local v51 = v40.onOverlayClosed();
        local v52 = l_navigation_0.getParam("fromProfile");
        if not (not l_itemPrice_0 or not l_userRobux_0) and l_itemPrice_0 <= l_userRobux_0 then
            l_navigation_0.navigate(v22.PurchaseCatalogItem, {
                itemId = l_itemId_0,
                itemType = l_itemType_0,
                productId = l_productId_0,
                priceInRobux = l_itemPrice_0,
                sellerId = l_sellerId_0,
                sellerName = l_sellerName_0,
                userAssetId = l_userAssetId_0,
                collectibleInstanceId = l_collectibleInstanceId_0,
                onOverlayClosed = v51,
                fromProfile = v52
            });
            return ;
        else
            l_navigation_0.navigate(v22.InsufficientRobuxPrompt, {
                onOverlayClosed = v51
            });
            return ;
        end;
    end;
    v40.onOverlayClosed = function()
        return function()
            v25("ResellerCard");
            v40.props.focusController.captureFocus();
        end;
    end;
end;
v39.render = function(v53)
    local l_serialNumber_0 = v53.props.serialNumber;
    local l_sellerId_1 = v53.props.sellerId;
    local l_sellerName_1 = v53.props.sellerName;
    local l_itemPrice_1 = v53.props.itemPrice;
    local l_LayoutOrder_0 = v53.props.LayoutOrder;
    local l_localization_0 = v53.props.localization;
    local v60 = l_getRbxthumbWithTypeSizeAndOptions_0(l_sellerId_1, v38, 48);
    return l_withStyle_0(function(v61)
        local l_Theme_0 = v61.Theme;
        local l_Font_0 = v61.Font;
        local l_Color_0 = l_Theme_0.BackgroundDefault.Color;
        local l_Footer_0 = l_Font_0.Footer;
        local v66 = l_Footer_0.RelativeSize * l_Font_0.BaseSize;
        local v67 = l_NumberLocalization_0.localize(string.format("%.0f", l_itemPrice_1), l_localization_0:GetLocale());
        return l_withSelectionCursorProvider_0(function(v68)
            return v3.createElement(l_FitFrameVertical_0, {
                width = UDim.new(1, 0),
                contentPadding = UDim.new(0, 8),
                margin = l_RoactFitComponents_0.Rect.rectangle(24, 0),
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                LayoutOrder = l_LayoutOrder_0,
                BorderSizePixel = 0,
                BackgroundColor3 = l_Theme_0.BackgroundDefault.Color
            }, {
                ProfileButton = v3.createElement(l_FitFrameVertical_0, {
                    width = UDim.new(1, 0),
                    onActivated = v53.viewProfile,
                    BackgroundTransparency = 1,
                    LayoutOrder = 1
                }, {
                    UserAndStatsFrame = v3.createElement(l_FitFrameVertical_0, {
                        width = UDim.new(1, 0),
                        contentPadding = UDim.new(0, 12),
                        FillDirection = Enum.FillDirection.Horizontal,
                        VerticalAlignment = not not l_serialNumber_0 and Enum.VerticalAlignment.Bottom or Enum.VerticalAlignment.Center,
                        AnchorPoint = Vector2.new(0.5, 0),
                        Position = UDim2.new(0.5, 0, 0, 0),
                        BackgroundTransparency = 1
                    }, {
                        UserThumbnail = v3.createElement(l_ImageSetLabel_0, {
                            Size = UDim2.new(0, 48, 0, 48),
                            BackgroundTransparency = 1,
                            Image = v60 or l_AVATAR_PLACEHOLDER_IMAGE_0,
                            LayoutOrder = 1
                        }, {
                            MaskFrame = v3.createElement(l_ImageSetLabel_0, {
                                Size = UDim2.new(1, 0, 1, 0),
                                BackgroundTransparency = 1,
                                Image = "rbxasset://textures/ui/LuaApp/graphic/profilemask.png",
                                ImageColor3 = l_Color_0
                            })
                        }),
                        SerialAndUsernameFrame = v3.createElement(l_FitFrameOnAxis_0, {
                            axis = l_FitFrameOnAxis_0.Axis.Both,
                            contentPadding = UDim.new(0, 3),
                            FillDirection = Enum.FillDirection.Vertical,
                            BackgroundTransparency = 1,
                            LayoutOrder = 2
                        }, {
                            Username = v3.createElement(v13.EmojiWrapper, {
                                emoji = not v53.props.sellerHasVerifiedBadge and "" or v13.emoji.verified
                            }, {
                                UsernameLabel = v3.createElement("TextLabel", {
                                    AutomaticSize = Enum.AutomaticSize.XY,
                                    BackgroundTransparency = 1,
                                    Font = l_Font_0.Header2.Font,
                                    TextColor3 = l_Theme_0.TextEmphasis.Color,
                                    TextSize = l_Font_0.Header2.RelativeSize * l_Font_0.BaseSize,
                                    Text = l_sellerName_1,
                                    LayoutOrder = 1
                                })
                            }),
                            SerialNumberLabel = l_serialNumber_0 and v3.createElement(l_FitFrameOnAxis_0, {
                                axis = l_FitFrameOnAxis_0.Axis.Both,
                                contentPadding = UDim.new(0, 1),
                                margin = l_RoactFitComponents_0.Rect.square(4),
                                FillDirection = Enum.FillDirection.Horizontal,
                                VerticalAlignment = Enum.VerticalAlignment.Center,
                                ImageSet = v34,
                                BackgroundTransparency = 1,
                                ImageColor3 = l_Theme_0.UIDefault.Color,
                                ImageTransparency = l_Theme_0.UIDefault.Transparency,
                                ScaleType = Enum.ScaleType.Slice,
                                SliceCenter = v35,
                                LayoutOrder = 2
                            }, {
                                LimitedIcon = v3.createElement(l_ImageSetLabel_0, {
                                    Size = UDim2.new(0, v66, 0, v66),
                                    BackgroundTransparency = 1,
                                    Image = l_ImageRectSize_0,
                                    ImageColor3 = l_Theme_0.TextEmphasis.Color,
                                    LayoutOrder = 1
                                }),
                                SerialNumberText = v3.createElement(l_FitTextLabel_0, {
                                    width = l_FitTextLabel_0.Width.FitToText,
                                    Size = UDim2.new(0, 0, 0, v66),
                                    BackgroundTransparency = 1,
                                    Font = l_Footer_0.Font,
                                    TextColor3 = l_Theme_0.TextEmphasis.Color,
                                    TextSize = v66,
                                    Text = "#" .. l_serialNumber_0,
                                    LayoutOrder = 2
                                })
                            })
                        })
                    })
                }),
                BuyButton = v3.createElement(l_Focusable_0[l_ImageSetButton_0], {
                    Size = UDim2.new(1, 0, 0, 44),
                    BackgroundTransparency = 1,
                    Image = v34,
                    ImageColor3 = l_Theme_0.ContextualPrimaryDefault.Color,
                    ScaleType = Enum.ScaleType.Slice,
                    SliceCenter = Rect.new(8, 8, 9, 9),
                    LayoutOrder = 2,
                    SelectionImageObject = v68(l_CursorKind_0.RoundedRectNoInset),
                    [v3.Event.Activated] = v53.openPurchasePrompt
                }, {
                    PriceFrame = v3.createElement(l_FitFrameOnAxis_0, {
                        axis = l_FitFrameOnAxis_0.Axis.Both,
                        contentPadding = UDim.new(0, 4),
                        FillDirection = Enum.FillDirection.Horizontal,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        Position = UDim2.new(0.5, 0, 0.5, 0),
                        BackgroundTransparency = 1
                    }, {
                        RobuxIcon = v3.createElement(l_ImageSetLabel_0, {
                            Size = UDim2.new(0, 25, 0, 25),
                            BackgroundTransparency = 1,
                            Image = v37,
                            ImageColor3 = l_Theme_0.ContextualPrimaryContent.Color,
                            ImageTransparency = l_Theme_0.ContextualPrimaryContent.Transparency,
                            LayoutOrder = 1
                        }),
                        Price = v3.createElement(l_FitTextLabel_0, {
                            width = l_FitTextLabel_0.Width.FitToText,
                            BackgroundTransparency = 1,
                            Font = l_Font_0.Header2.Font,
                            TextColor3 = l_Theme_0.ContextualPrimaryContent.Color,
                            TextTransparency = l_Theme_0.ContextualPrimaryContent.Transparency,
                            TextSize = l_Font_0.Header2.RelativeSize * l_Font_0.BaseSize,
                            Text = v67,
                            LayoutOrder = 2
                        })
                    })
                })
            });
        end);
    end);
end;
return (l_withNavigation_0((l_RoactServices_0.connect({
    localization = v6
})((v4.connect(function(v69, v70)
    local v71 = v69.Users[v70.sellerId];
    return {
        userRobux = v69.UserRobux[v69.LocalUserId],
        userName = v71 and v71.name
    };
end, function(v72)
    return {
        navigateDown = function(v73)
            v72(v26(v73));
        end
    };
end or nil)(v39))))));


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_Modules_0.AvatarExperience.Catalog.Components.ResellerCard);
local v6 = v3.PureComponent:extend("AssetResellerCard");
v6.render = function(v7)
    local l_userAssetInfo_0 = v7.props.userAssetInfo;
    if l_userAssetInfo_0 then
        return v3.createElement(v5, {
            LayoutOrder = v7.props.LayoutOrder,
            itemId = v7.props.itemId,
            itemType = v7.props.itemType,
            itemPrice = l_userAssetInfo_0.priceInRobux,
            productId = v7.props.productId,
            sellerId = l_userAssetInfo_0.userId,
            sellerName = l_userAssetInfo_0.userName,
            sellerHasVerifiedBadge = l_userAssetInfo_0.sellerHasVerifiedBadge,
            serialNumber = l_userAssetInfo_0.serialNumber,
            userAssetId = v7.props.userAssetId,
            hasDivider = v7.props.hasDivider,
            horizontalPadding = v7.props.horizontalPadding,
            focusController = v7.props.focusController
        });
    else
        return ;
    end;
end;
return v4.connect(function(v9, v10)
    return {
        userAssetInfo = v9.AvatarExperience.Catalog.UserAssets[v10.userAssetId]
    };
end)(v6);


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_Modules_0.AvatarExperience.Catalog.Components.ResellerCard);
local v6 = v3.PureComponent:extend("CollectibleResellerCard");
local v7 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXLimitedBundlesHandleNewData);
v6.render = function(v8)
    local l_collectibleInstance_0 = v8.props.collectibleInstance;
    if l_collectibleInstance_0 then
        return v3.createElement(v5, {
            LayoutOrder = v8.props.LayoutOrder,
            itemId = v8.props.itemId,
            itemType = v8.props.itemType,
            itemPrice = l_collectibleInstance_0.price,
            productId = l_collectibleInstance_0.collectibleProductId,
            sellerId = tostring(l_collectibleInstance_0.seller.sellerId),
            sellerName = l_collectibleInstance_0.seller.name,
            sellerHasVerifiedBadge = l_collectibleInstance_0.seller.hasVerifiedBadge,
            serialNumber = l_collectibleInstance_0.serialNumber,
            hasDivider = v8.props.hasDivider,
            horizontalPadding = v8.props.horizontalPadding,
            focusController = v8.props.focusController,
            collectibleInstanceId = l_collectibleInstance_0.collectibleInstanceId
        });
    else
        return ;
    end;
end;
return v4.connect(function(v10, v11)
    if not v7() then
        return {
            collectibleInstance = v10.AvatarExperience.Common.Collectibles.CollectiblesResellersInstances[v11.collectibleItemId].Instances[v11.collectibleInstanceId]
        };
    else
        local v12 = if not v11.collectibleItemId then nil else v10.AvatarExperience.Common.Collectibles.CollectiblesResellersInstances[v11.collectibleItemId];
        return {
            collectibleInstance = if not not v12 and v11.collectibleInstanceId then v12.Instances[v11.collectibleInstanceId] else nil
        };
    end;
end)(v6);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Promise);
local v6 = require(l_CorePackages_0.Cryo);
local v7 = require(l_CorePackages_0.AvatarExperienceDeps);
local v8 = require(l_Modules_0.AvatarExperience.Common.Components.CenteredModalView);
local l_FitFrameVertical_0 = v7.RoactFitComponents.FitFrameVertical;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v11 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v12 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar);
local l_RetrievalStatus_0 = require(l_CorePackages_0.Workspace.Packages.Http).Enum.RetrievalStatus;
local l_isGamepadInput_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).isGamepadInput;
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local v16 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v16.Focusable;
local v18 = require(l_Modules_0.AvatarExperience.Common.Components.GamepadFocusHandlerForPage);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v21 = require(l_Modules_0.AvatarExperience.Common.Thunks.CloseFocusedScreen);
local v22 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v23 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v24 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v26 = require(l_Modules_0.AvatarExperience.Catalog.Components.Resellers.AssetResellerCard);
local v27 = require(l_Modules_0.AvatarExperience.Catalog.Components.Resellers.CollectibleResellerCard);
local v28 = require(l_Modules_0.LuaApp.Components.RefreshScrollingFrameWithLoadMore);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v30 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withStackVisibilityWrapper);
local v31 = require(l_Modules_0.AvatarExperience.Catalog.CatalogUtils);
local v32 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchAssetResellers);
local v33 = require(l_Modules_0.AvatarExperience.Catalog.Thunks.FetchCollectibResellersInstances);
local v34 = require(l_Modules_0.AvatarExperience.Catalog.Actions.SetResellerCursor);
local v35 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXLimitedBundlesHandleNewData);
local v36 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v36.Style.withStyle;
local l_DefaultMetricsGridView_0 = v36.App.Grid.DefaultMetricsGridView;
local l_GridMetrics_0 = v36.App.Grid.GridMetrics;
local l_LoadingStateContainer_0 = v36.App.Container.LoadingStateContainer;
local l_RetrievalStatus_1 = v36.App.Loading.Enum.RetrievalStatus;
local l_EmptyState_0 = v36.App.Indicator.EmptyState;
local v43 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v44 = v3.PureComponent:extend("ResellersPage");
v44.init = function(v45)
    v45.nextPageCursor = nil;
    v45.gridViewRef = v3.createRef();
    v45.topBarRef = v3.createRef();
    v45.focusController = v45.props.focusController or v16.createFocusController();
    v45.fetchAssetResellers = function()
        local l_networking_0 = v45.props.networking;
        local l_itemId_0 = v45.props.itemId;
        local l_collectibleItemId_0 = v45.props.collectibleItemId;
        if not l_collectibleItemId_0 then
            return v45.props.fetchAssetResellers(l_networking_0, l_itemId_0);
        else
            return v45.props.fetchCollectibleResellers(l_networking_0, l_collectibleItemId_0, nil);
        end;
    end;
    v45.loadMoreItems = function()
        local l_networking_1 = v45.props.networking;
        local l_itemId_1 = v45.props.itemId;
        local l_collectibleItemId_1 = v45.props.collectibleItemId;
        local l_resellerCursor_0 = v45.props.resellerCursor;
        if v45.props.fetchingStatus == l_RetrievalStatus_0.Fetching then
            return v5.resolve("Currently fetching");
        elseif not l_collectibleItemId_1 then
            return v45.props.loadMoreItems(l_networking_1, l_itemId_1, l_resellerCursor_0);
        else
            return v45.props.fetchCollectibleResellers(l_networking_1, l_collectibleItemId_1, l_resellerCursor_0);
        end;
    end;
    v45.renderCard = function(v53, _, v55)
        return l_withStyle_0(function(v56)
            local l_Theme_0 = v56.Theme;
            return v3.createElement(l_FitFrameVertical_0, {
                width = UDim.new(1, 0),
                contentPadding = UDim.new(0, 8),
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                BackgroundTransparency = 1,
                LayoutOrder = v55
            }, {
                AssetResellerCard = v3.createElement(v26, {
                    LayoutOrder = 1,
                    itemId = v45.props.itemId,
                    itemType = v45.props.itemType,
                    productId = v45.props.productId,
                    userAssetId = v53,
                    horizontalPadding = 24,
                    focusController = v45.focusController
                }),
                Divider = v3.createElement("Frame", {
                    BackgroundColor3 = l_Theme_0.Divider.Color,
                    BackgroundTransparency = l_Theme_0.Divider.Transparency,
                    BorderSizePixel = 0,
                    LayoutOrder = 2,
                    Size = UDim2.new(1, -24, 0, 1)
                })
            });
        end);
    end;
    v45.renderCollectibleCard = function(v58, _, v60)
        local l_collectibleItemId_2 = v45.props.collectibleItemId;
        return l_withStyle_0(function(v62)
            local l_Theme_1 = v62.Theme;
            return v3.createElement("Frame", {
                BackgroundTransparency = 1,
                LayoutOrder = v60,
                AutomaticSize = Enum.AutomaticSize.Y,
                Size = UDim2.fromScale(1, 0)
            }, {
                UIListLayout = v3.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    VerticalAlignment = Enum.VerticalAlignment.Top,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, 8)
                }),
                CollectibleResellerCard = v3.createElement(v27, {
                    LayoutOrder = 1,
                    itemId = v45.props.itemId,
                    collectibleItemId = l_collectibleItemId_2,
                    collectibleInstanceId = v58,
                    itemType = v45.props.itemType,
                    horizontalPadding = 24,
                    focusController = v45.focusController
                }),
                Divider = v3.createElement("Frame", {
                    BackgroundColor3 = l_Theme_1.Divider.Color,
                    BackgroundTransparency = l_Theme_1.Divider.Transparency,
                    BorderSizePixel = 0,
                    LayoutOrder = 2,
                    Size = UDim2.new(1, 0, 0, 1)
                })
            });
        end);
    end;
    v45.goBack = function()
        v45.props.closeFocusedScreen(v45.props.navigation);
    end;
end;
v44.didMount = function(v64)
    v64.fetchAssetResellers();
    local l_l_UserInputService_0_LastInputType_0 = l_UserInputService_0:GetLastInputType();
    if l_l_UserInputService_0_LastInputType_0 then
        v64:setState({
            lastInputType = l_l_UserInputService_0_LastInputType_0
        });
    end;
    if l_isGamepadInput_0(l_l_UserInputService_0_LastInputType_0) then
        v64.focusController.captureFocus();
    end;
end;
v44.willUpdate = function(v66, v67, _)
    local v69 = v66.props.purchaseFetchingState == l_RetrievalStatus_0.Fetching;
    local v70 = true;
    if v67.purchaseFetchingState ~= l_RetrievalStatus_0.Done then
        v70 = v67.purchaseFetchingState == l_RetrievalStatus_0.Failed;
    end;
    if not (not v69 or not v70) then
        v66.fetchAssetResellers();
    end;
end;
v44.didUpdate = function(v71, v72)
    local l_fetchingStatus_0 = v71.props.fetchingStatus;
    if (l_isGamepadInput_0(v71.state.lastInputType) and l_fetchingStatus_0 == l_RetrievalStatus_0.Done) and v72.fetchingStatus ~= l_RetrievalStatus_0.Done then
        v71.focusController.captureFocus();
    end;
end;
v44.willUnmount = function(v74)
    v74.props.clearResellerCursor();
end;
v44.renderOnLoaded = function(v75)
    return v3.createElement(v12.PageContent, {}, {
        Content = v75:renderContent()
    });
end;
v44.renderContent = function(v76)
    local l_screenSize_0 = v76.props.screenSize;
    local l_globalGuiInset_0 = v76.props.globalGuiInset;
    local l_resellerUserAssetIds_0 = v76.props.resellerUserAssetIds;
    local l_hasMoreRows_0 = v76.props.hasMoreRows;
    local l_collectibleResellersInstancesIds_0 = v76.props.collectibleResellersInstancesIds;
    if l_resellerUserAssetIds_0 or l_collectibleResellersInstancesIds_0 then
        local v82 = l_getSafeAreaSize_0(l_screenSize_0, l_globalGuiInset_0);
        return v3.createElement(v28, {
            Position = UDim2.fromScale(0, 0),
            Size = UDim2.fromScale(1, 1),
            CanvasSize = UDim2.new(1, 0, 0, 0),
            refresh = v76.fetchAssetResellers,
            onLoadMore = l_hasMoreRows_0 and v76.loadMoreItems,
            createEndOfScrollElement = not l_hasMoreRows_0,
            hasMoreRows = l_hasMoreRows_0
        }, {
            UIPadding = v3.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 24)
            }),
            ResellerGridView = v3.createElement(l_Focusable_0[l_DefaultMetricsGridView_0], {
                renderItem = if not l_collectibleResellersInstancesIds_0 then v76.renderCard else v76.renderCollectibleCard,
                windowHeight = v82.Y.Offset,
                getItemHeight = function(_)
                    return 100;
                end,
                getItemMetrics = l_GridMetrics_0.makeCustomMetricsGetter({
                    minimumItemsPerRow = 1,
                    minimumItemWidth = v82.X.Offset
                }),
                itemPadding = Vector2.new(0, 12),
                items = l_collectibleResellersInstancesIds_0 or l_resellerUserAssetIds_0,
                maxHeight = math.huge,
                LayoutOrder = 1,
                defaultChildIndex = 1,
                inputBindings = {
                    NavigateBack = v16.Input.onBegin(Enum.KeyCode.ButtonB, v76.goBack)
                },
                [v3.Ref] = v76.gridViewRef,
                NextSelectionUp = v76.topBarRef
            })
        });
    else
        return ;
    end;
end;
v44.renderOnFailed = function(v84, v85)
    return v3.createElement(l_EmptyState_0, {
        onActivated = v84.fetchAssetResellers,
        text = v85.failedMessage
    });
end;
v44.render = function(v86)
    return v3.createElement(v8, {}, {
        Content = v86:renderContents()
    });
end;
v44.renderContents = function(v87)
    local l_globalGuiInset_1 = v87.props.globalGuiInset;
    local l_fetchingStatus_1 = v87.props.fetchingStatus;
    local v90 = not not v87.props.resellerUserAssetIds and not v6.isEmpty(v87.props.resellerUserAssetIds) or v87.props.collectibleResellersInstancesIds and not v6.isEmpty(v87.props.collectibleResellersInstancesIds);
    if not (not (l_fetchingStatus_1 == l_RetrievalStatus_0.Fetching) or not v90) then
        l_fetchingStatus_1 = l_RetrievalStatus_0.Done;
    end;
    return l_withStyle_0(function(v91)
        return l_withLocalization_0({
            title = "Feature.Catalog.Heading.Sellers",
            failedMessage = "Feature.EmptyStatePage.Message.NoInternet"
        })(function(v92)
            local l_Theme_2 = v91.Theme;
            return v3.createElement(l_Focusable_0.Frame, {
                BackgroundColor3 = l_Theme_2.BackgroundDefault.Color,
                BackgroundTransparency = l_Theme_2.BackgroundDefault.Transparency,
                BorderSizePixel = 0,
                Size = UDim2.fromScale(1, 1),
                Position = UDim2.new(0, l_globalGuiInset_1.left, 0, l_globalGuiInset_1.top),
                Active = true,
                focusController = v87.focusController
            }, {
                TopBar = v3.createElement(v12.Container, {
                    ZIndex = 2,
                    titleText = v92.title,
                    [v3.Ref] = v87.topBarRef,
                    NextSelectionDown = l_fetchingStatus_1 == l_RetrievalStatus_0.Done and v87.gridViewRef or nil,
                    leftItem = v12.BackButton
                }),
                GamepadFocusHandlerForPage = v3.createElement(v18, {
                    focusController = v87.focusController
                }),
                LastInputTypeChangedConnection = v3.createElement(l_ExternalEventConnection_0, {
                    event = l_UserInputService_0.LastInputTypeChanged,
                    callback = function(v94)
                        if v94 then
                            v87:setState({
                                lastInputType = v94
                            });
                        end;
                    end
                }),
                LoadingStateContainer = v3.createElement(l_LoadingStateContainer_0, {
                    dataStatus = l_RetrievalStatus_1.fromRawValue(l_fetchingStatus_1),
                    renderOnLoaded = function()
                        return v87:renderOnLoaded();
                    end,
                    renderOnFailed = function()
                        return v87:renderOnFailed(v92);
                    end
                })
            });
        end);
    end);
end;
return (v20((v30((l_RoactServices_0.connect({
    networking = v11
})((v4.connect(function(v95, v96)
    local l_itemId_2 = v96.itemId;
    local l_itemType_0 = v96.itemType;
    local v99 = nil;
    local v100 = nil;
    local v101 = nil;
    if not v43 then
        local v102 = v22(v95.AvatarExperience.Common, l_itemId_2, l_itemType_0);
        v99 = (v102 and v102.product) and v102.product.id;
        v100 = v102 and v102.resellerUserAssetIds;
        v101 = if not v35() then v96.collectibleItemId ~= nil else v31.DEPRECATED_isLimitedCollectible(v102);
    else
        local v103 = v23(v95.AvatarExperience, l_itemId_2, l_itemType_0);
        v99 = v103 and v103.productId;
        v100 = v103 and v103.resellerUserAssetIds;
        v101 = if not v35() then v96.collectibleItemId ~= nil else v103 and v103.isLimitedCollectible;
    end;
    local l_collectibleItemId_3 = v96.collectibleItemId;
    local v105 = nil;
    if not (not v101 or not l_collectibleItemId_3) then
        local l_CollectiblesResellersInstances_0 = v95.AvatarExperience.Common.Collectibles.CollectiblesResellersInstances;
        v105 = if not v35() then l_CollectiblesResellersInstances_0[l_collectibleItemId_3].InstanceIdsList else (l_CollectiblesResellersInstances_0 and l_CollectiblesResellersInstances_0[l_collectibleItemId_3]) and l_CollectiblesResellersInstances_0[l_collectibleItemId_3].InstanceIdsList;
    end;
    return {
        globalGuiInset = v95.GlobalGuiInset,
        hasMoreRows = v95.AvatarExperience.Catalog.ResellerCursor.hasMoreRows,
        fetchingStatus = l_PerformFetch_0.GetStatus(v95, v24.GetResellersKey .. tostring(l_collectibleItemId_3 or l_itemId_2)),
        productId = v99,
        purchaseFetchingState = l_PerformFetch_0.GetStatus(v95, v24.PurchaseProductKey .. tostring(v99)),
        resellerCursor = v95.AvatarExperience.Catalog.ResellerCursor.nextPageCursor,
        resellerUserAssetIds = v100,
        screenSize = v95.ScreenSize,
        collectibleResellersInstancesIds = v105
    };
end, function(v107)
    return {
        fetchAssetResellers = function(v108, v109)
            return v107(v32(v108, v109, nil, v24.MaxResellersPerPage, true));
        end,
        fetchCollectibleResellers = function(v110, v111, v112)
            return v107(v33(v110, v111, v112, v24.MaxResellersPerPage));
        end,
        loadMoreItems = function(v113, v114, v115)
            return v107(v32(v113, v114, v115, v24.MaxResellersPerPage, false));
        end,
        clearResellerCursor = function()
            return v107(v34(nil));
        end,
        closeFocusedScreen = function(v116)
            v107(v21(v116));
        end
    };
end)(v44))))))));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_TextService_0 = game:GetService("TextService");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_CorePackages_0.Roact);
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local v7 = require(l_CorePackages_0.RoactRodux);
local l_withNavigation_0 = require(l_CorePackages_0.RoactNavigation).withNavigation;
local v9 = require(l_CorePackages_0.UIBlox);
local l_withSelectionCursorProvider_0 = v9.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = v9.App.SelectionImage.CursorKind;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_NumberLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).NumberLocalization;
local l_Images_0 = v9.App.ImageSet.Images;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v17 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local v18 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v19 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withAvatarRoute);
local l_withStyle_0 = v9.Style.withStyle;
local l_ImageSetLabel_0 = v9.Core.ImageSet.ImageSetLabel;
local l_ImageSetButton_0 = v9.Core.ImageSet.ImageSetButton;
local v23 = require(l_Modules_0.LuaApp.Thunks.ApiFetchEconomyCurrency);
local v24 = require(l_Modules_0.LuaApp.AppPage);
local v25 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v26 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local l_GetFFlagOpenVngShopForVngRobuxPurchase_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagOpenVngShopForVngRobuxPurchase;
local v28 = require(l_Modules_0.LuaApp.Thunks.OpenPurchaseRobuxPage);
local v29 = l_Images_0["component_assets/circle_17"];
local v30 = l_Images_0["component_assets/circle_17_stroke_1"];
local v31 = l_Images_0["icons/common/goldrobux"];
local v32 = v5.PureComponent:extend("RobuxBalance");
local v33 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v34 = require(l_Modules_0.LuaApp.Constants);
v32.defaultProps = {
    LayoutOrder = 1
};
v32.init = function(v35)
    v35.fetchRobuxBalance = function()
        local l_localUserId_0 = v35.props.localUserId;
        local l_networking_0 = v35.props.networking;
        if typeof(l_localUserId_0) == "string" and l_localUserId_0 ~= "" then
            v35.props.requestRobuxInfo(l_networking_0, l_localUserId_0);
        end;
    end;
    v35.openPurchaseRobuxPage = function()
        v35.props.openPurchaseRobuxPage(v35.props.navigation, v35.props.disableIAPEntryPoint);
    end;
end;
v32.didMount = function(v38)
    v38.fetchRobuxBalance();
end;
local function _(v39)
    return v39.avatarRoute.opaque.name == v25.Catalog;
end;
v32.didUpdate = function(v41, v42, _)
    if v42.localUserId ~= v41.props.localUserId then
        v41.fetchRobuxBalance();
        return ;
    else
        local v44 = v41.props.avatarRoute.opaque.name == v25.Catalog;
        if not (v42.avatarRoute.opaque.name == v25.Catalog or not v44) then
            v41.fetchRobuxBalance();
        end;
        return ;
    end;
end;
v32.render = function(v45)
    local l_userRobuxBalance_0 = v45.props.userRobuxBalance;
    local v47 = not not l_userRobuxBalance_0 and l_NumberLocalization_0.abbreviate(l_userRobuxBalance_0, v45.props.localization:GetLocale()) or "-";
    return l_withStyle_0(function(v48)
        local l_Font_0 = v48.Font;
        local l_Theme_0 = v48.Theme;
        local l_Font_1 = l_Font_0.CaptionHeader.Font;
        local v52 = l_Font_0.BaseSize * l_Font_0.CaptionHeader.RelativeSize;
        local v53 = (40 + l_TextService_0:GetTextSize(v47, v52, l_Font_1, Vector2.new(math.huge, v52)).X) + 8;
        return l_withSelectionCursorProvider_0(function(v54)
            return v5.createElement(l_Focusable_0[l_ImageSetButton_0], {
                BackgroundTransparency = 1,
                Image = v29,
                ImageColor3 = l_Theme_0.BackgroundUIDefault.Color,
                ImageTransparency = l_Theme_0.BackgroundUIDefault.Transparency,
                ScaleType = Enum.ScaleType.Slice,
                SliceCenter = Rect.new(8, 8, 9, 9),
                Size = UDim2.new(0, v53, 0, 40),
                [v5.Event.Activated] = v45.openPurchaseRobuxPage,
                [v5.Ref] = v45.props.forwardRef,
                NextSelectionLeft = v45.props.NextSelectionLeft,
                SelectionImageObject = v54(l_CursorKind_0.RoundedRectNoInset)
            }, {
                Border = v5.createElement(l_ImageSetLabel_0, {
                    BackgroundTransparency = 1,
                    Image = v30,
                    ImageColor3 = l_Theme_0.Divider.Color,
                    ImageTransparency = l_Theme_0.Divider.Transparency,
                    ScaleType = Enum.ScaleType.Slice,
                    SliceCenter = Rect.new(8, 8, 9, 9),
                    Size = UDim2.new(1, 0, 1, 0)
                }),
                Content = v5.createElement("Frame", {
                    BackgroundTransparency = 1,
                    Size = UDim2.new(1, 0, 1, 0)
                }, {
                    UIListLayout = v5.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Horizontal,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        Padding = UDim.new(0, 4)
                    }),
                    RobuxIcon = v5.createElement(l_ImageSetLabel_0, {
                        Size = UDim2.new(0, 28, 0, 28),
                        BackgroundTransparency = 1,
                        Image = v31,
                        LayoutOrder = 1
                    }),
                    RobuxInfo = v5.createElement("TextLabel", {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        BackgroundTransparency = 1,
                        Text = v47,
                        Font = l_Font_1,
                        TextSize = v52,
                        TextColor3 = l_Theme_0.TextEmphasis.Color,
                        TextTransparency = l_Theme_0.TextEmphasis.Transparency,
                        LayoutOrder = 2
                    })
                })
            });
        end);
    end);
end;
v32 = v19((l_withNavigation_0((v7.connect(function(v55, _)
    local l_LocalUserId_0 = v55.LocalUserId;
    return {
        localUserId = l_LocalUserId_0,
        userRobuxBalance = v55.UserRobux[l_LocalUserId_0]
    };
end, function(v58, _)
    return {
        openPurchaseRobuxPage = function(_, v61)
            if not v61 then
                if not l_GetFFlagOpenVngShopForVngRobuxPurchase_0() then
                    return v58(v26({
                        name = v24.PurchaseRobux
                    }));
                else
                    return v58(v28());
                end;
            else
                v58(v33(v34.WEBVIEWS_UNAVAILABLE_TOAST));
                return ;
            end;
        end,
        requestRobuxInfo = function(v62, v63)
            return v58(v23(v62, v63, false));
        end
    };
end)((l_RoactAppPolicy_0.connect(function(v64)
    return {
        disableIAPEntryPoint = v64.getDisableIAPEntryPoint()
    };
end)((l_RoactServices_0.connect({
    localization = v17,
    networking = v18
})(v32)))))))));
return v5.forwardRef(function(v65, v66)
    return v5.createElement(v32, v4.Dictionary.join(v65, {
        forwardRef = v66
    }));
end);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_CorePackages_0.Roact);
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.RoactNavigation);
local l_withNavigation_0 = v8.withNavigation;
local v10 = require(l_CorePackages_0.RoactRodux);
local v11 = require(l_CorePackages_0.Packages.t);
local v12 = require(l_CorePackages_0.Cryo);
local v13 = require(l_CorePackages_0.Packages.Dash);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local l_isGamepadInput_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).isGamepadInput;
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
local v17 = require(l_Modules_0.LuaApp.Services.RoactAnalytics);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v19 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v20 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local v21 = require(l_Modules_0.LuaApp.Constants);
local v22 = require(l_Modules_0.LuaApp.SearchUuid);
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local v24 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar);
local v25 = require(l_Modules_0.LuaApp.Components.SearchBar);
local v26 = require(l_Modules_0.LuaApp.Actions.SetSearchParameters);
local v27 = require(l_Modules_0.LuaApp.Actions.SetSearchType);
local v28 = require(l_Modules_0.LuaApp.Analytics.Events.catalogSearchEvent);
local l_HorizontalPageMargin_0 = require(l_CorePackages_0.UIBlox).App.Container.HorizontalPageMargin;
local _ = require(l_Modules_0.AvatarExperience.Common.CategoryTypes);
local l_Common_0 = l_Modules_0.AvatarExperience.Common;
local _ = require(l_Common_0.AvatarExperienceState);
local v33 = require(l_Common_0.Components.RoactNavigation.NavigationUtils);
local v34 = require(l_Common_0.withContextValue);
local v35 = require(l_Common_0.Context.PageObjectManagerContext);
local v36 = require(l_Common_0.Utils);
local v37 = require(l_Common_0.NamedRefConstants);
local v38 = require(l_Common_0.Components.RoactNavigation.AvatarScreen);
local v39 = require(l_Common_0.Components.RoactNavigation.AvatarScreenProperties);
local v40 = require(l_Common_0.Components.RoactNavigation.withAvatarRoute);
local v41 = require(l_Common_0.Context.withNamedRefs);
local v42 = require(l_Common_0.Components.RoactNavigation.AvatarRoute);
local v43 = require(l_Common_0.Services.Analytics);
local v44 = require(l_Common_0.Components.AvatarExperienceView);
local v45 = require(l_Common_0.Components.BoundInputsUpdater);
local v46 = require(l_Common_0.Components.GamepadFocusHandlerForPage);
local v47 = require(l_Common_0.Components.RoactNavigation.Debug.NavigationEventsLogger);
local v48 = require(l_Common_0.Selectors.selectIsFullView);
local l_PeekViewState_0 = require(l_CorePackages_0.Workspace.Packages.PeekView).PeekViewState;
local v50 = require(l_Common_0.Actions.SetItemDetailsPeekViewState);
local v51 = require(l_Common_0.Thunks.OpenItemPrompt);
local v52 = require(l_Common_0.Thunks.OpenQuickMenu);
local v53 = require(l_Common_0.Thunks.SetFullView);
local v54 = require(l_Common_0.Enum.FullView);
local v55 = require(l_Common_0.Hooks.useAvatarExperienceFocusNavigationBindings);
local v56 = require(l_Common_0.Hooks.useOverlayClosedCallback);
local v57 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
local l_Catalog_0 = l_Modules_0.AvatarExperience.Catalog;
local v59 = require(l_Catalog_0.Services.Analytics);
local v60 = require(l_Catalog_0.CatalogConstants);
local v61 = require(l_Catalog_0.Components.Search.ResultsList);
local v62 = require(l_Catalog_0.CatalogUtils);
local v63 = require(l_Catalog_0.Actions.RemoveSearchInCatalog);
local v64 = require(l_Catalog_0.Actions.SetSortAndFilters);
local v65 = require(l_Catalog_0.Actions.ResetSortAndFilters);
local v66 = require(l_Catalog_0.Actions.SetTryOnManagerPeekViewState);
local v67 = require(l_Catalog_0.Thunks.FetchWidgetInfo);
local v68 = require(l_Catalog_0.Thunks.ApiFetchCatalogSearch);
local v69 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAvatarAutocompleteEnabledForAll);
local v70 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXSearchResultsCategories);
local v71 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXRemoveYButtonCatalogPage);
local v72 = require(l_Modules_0.AvatarExperience.Flags.AXSearchResultsCategoriesIXPTest);
local v73 = v4.PureComponent:extend("CatalogSearch");
v73.validateProps = v11.strictInterface({
    searchUuid = v11.string,
    searchParameters = v11.table,
    isVisible = v11.optional(v11.boolean),
    fullView = v11.optional(v11.userdata),
    topBarHeight = v11.number,
    dataStatus = v11.string,
    hasEntries = v11.boolean,
    itemDetailsExpanded = v11.optional(v11.boolean),
    isPortrait = v11.boolean,
    tryOnManagerPeekViewState = v11.optional(v11.valueOf(l_PeekViewState_0)),
    tryOnItems = v11.optional(v11.table),
    categoryInfo = if not v70() then nil else v11.optional(v11.table),
    dispatchSearch = v11.callback,
    dispatchRemoveSearch = v11.callback,
    setSearchType = v11.callback,
    setSearchParameters = v11.callback,
    setSortAndFilters = v11.callback,
    openItemPrompt = v11.callback,
    setItemDetailsPeekViewState = v11.callback,
    setFullView = v11.callback,
    navigateIntoQuickMenu = v11.callback,
    resetSortAndFilters = v11.callback,
    setTryOnManagerPeekViewState = v11.callback,
    fetchWidgetInfo = v11.callback,
    pageObjectManager = v11.optional(v11.table),
    namedRefs = v11.table,
    navigation = v11.table,
    avatarRoute = v42.Interface,
    analytics = v11.table,
    avatarExperienceAnalytics = v11.table,
    catalogAnalytics = v11.table,
    networking = v11.callback,
    eventIngest = v11.table,
    overlayClosedCallback = v11.callback,
    focusController = v11.table,
    localized = v11.table,
    enableSearchResultsCategories = if not v70() then nil else v11.optional(v11.boolean)
});
v73.init = function(v74)
    local v75, v76 = v4.createBinding(0);
    v74.pillBarScrollOffset = v75;
    v74.updatePillBarScrollOffset = v76;
    v74.searchBarRef = v4.createRef();
    v74.sceneUIContainerRef = v4.createRef();
    v74.resultsListRef = v74.props.namedRefs[v38.CatalogSearch .. v37.ItemsList];
    v74.refinementButtonsRef = v4.createRef();
    v74.multiTryOnBottomBarRef = v4.createRef();
    v74.isMounted = false;
    v74:setState({
        isSearching = false
    });
    v74.onNavBarSizeChanged = function(v77)
        if v74.resultsListRef.current then
            v74.resultsListRef.current.Size = UDim2.new(1, 0, 1, -v77.Y);
        end;
    end;
    v74.dispatchInitialSearch = function()
        local l_searchUuid_0 = v74.props.searchUuid;
        local l_searchParameters_0 = v74.props.searchParameters;
        local l_dispatchSearch_0 = v74.props.dispatchSearch;
        local v81 = v74.props.fullView == v54.SceneFullView;
        local l_avatarExperienceAnalytics_0 = v74.props.avatarExperienceAnalytics;
        if v81 then
            v74.props.setFullView(l_avatarExperienceAnalytics_0, v74.props.avatarRoute.opaque.name, v54.None);
        end;
        local l_fetchWidgetInfo_0 = v74.props.fetchWidgetInfo;
        local l_networking_0 = v74.props.networking;
        local v85 = v62.getQueryStringForSearchWidgets(l_searchParameters_0);
        if v85 then
            l_fetchWidgetInfo_0(l_networking_0, v85);
        end;
        if not (not v70() or not v74.props.enableSearchResultsCategories) then
            local l_categoryInfo_0 = v74.props.categoryInfo;
            if not l_searchParameters_0.categoryInfo then
                l_searchParameters_0 = v13.join(l_searchParameters_0, {
                    categoryInfo = l_categoryInfo_0
                });
                v74.props.setSearchParameters(l_searchUuid_0, l_searchParameters_0);
            end;
        end;
        return l_dispatchSearch_0(l_searchParameters_0.searchKeyword, l_searchUuid_0, if not not v70() and v74.props.enableSearchResultsCategories then v74.props.categoryInfo else nil);
    end;
    v74.setUIFullView = function()
        v74.props.setFullView(v74.props.avatarExperienceAnalytics, v74.props.avatarRoute.opaque.name, v54.UIFullView);
    end;
    v74.confirmSearchCallback = function(v87, v88, v89)
        local v90 = v22();
        local v91 = if not not v70() and v74.props.enableSearchResultsCategories then v74.props.categoryInfo else nil;
        local v92 = nil;
        v92 = v13.join(v74.props.navigation.getParam("searchParams") or {}, {
            searchKeyword = v87,
            isKeywordSuggestionEnabled = true,
            categoryInfo = if not not v70() and v74.props.enableSearchResultsCategories then v91 else nil
        });
        v74.props.setSearchType(v90, v21.SearchTypes.Catalog);
        v74.props.setSearchParameters(v90, v92);
        if v69() then
            if v74.props.isPortrait then
                v74.setUIFullView();
            end;
            v28(v74.props.eventIngest, "catalog", v87, v88, v38.CatalogSearch, v89);
        end;
        v33.navigateToSearch(v74.props.navigation, v90, v92);
    end;
    v74.cancelSearchCallback = function()
        v74.props.navigation.navigate(v38.Catalog);
        if v74.isMounted then
            v74:setState({
                isSearching = false
            });
        end;
    end;
    v74.onSearchBarFocused = function()
        if v74.isMounted then
            v74:setState({
                isSearching = true
            });
            return ;
        else
            return ;
        end;
    end;
    v74.changeView = function()
        v74.props.setFullView(v74.props.avatarExperienceAnalytics, v74.props.avatarRoute.opaque.name, (v36.getNewFullViewEnum(v74.props.fullView)));
    end;
    v74.clearSearchState = if not v70() then nil else function(v93)
        v74.props.dispatchRemoveSearch(v93);
        v74.props.pageObjectManager:storePageObject(v93, nil);
    end;
    v74.dispatchWidgetSearch = if not v70() then nil else function()
        local l_searchParameters_1 = v74.props.searchParameters;
        local l_fetchWidgetInfo_1 = v74.props.fetchWidgetInfo;
        local l_networking_1 = v74.props.networking;
        local v97 = v62.getQueryStringForSearchWidgets(l_searchParameters_1);
        if v97 then
            l_fetchWidgetInfo_1(l_networking_1, v97);
        end;
    end;
    v74.onCategoryOrSubcategoryChange = if not v70() then nil else function(v98, v99)
        local v100 = v36.getCatalogCategoryInfo(v98, v99);
        if v100 ~= v74.props.categoryInfo then
            v74.dispatchSearchOnCategoryOrSubcategoryChange(v100);
        end;
    end;
    v74.dispatchSearchOnCategoryOrSubcategoryChange = if not v70() then nil else function(v101)
        local l_searchUuid_1 = v74.props.searchUuid;
        local l_searchParameters_2 = v74.props.searchParameters;
        local l_dispatchSearch_1 = v74.props.dispatchSearch;
        v74.props.setSearchParameters(l_searchUuid_1, (v13.join(l_searchParameters_2, {
            categoryInfo = v13.join({}, v101)
        })));
        v74.clearSearchState(l_searchUuid_1);
        if not (not v101 or not v101.ShowWidgets) then
            v74.dispatchWidgetSearch();
        end;
        return l_dispatchSearch_1(l_searchParameters_2.searchKeyword, l_searchUuid_1, v101);
    end;
end;
v73.getInputBindings = function(v105)
    local l_avatarRoute_0 = v105.props.avatarRoute;
    local l_name_0 = l_avatarRoute_0.current.name;
    local l_isMultiTryOn_0 = v39[l_avatarRoute_0.opaque.name].isMultiTryOn;
    local v109 = {
        NavigateBack = v5.Input.onBegin(Enum.KeyCode.ButtonB, function()
            v33.closeFocusedScreen(v105.props.navigation);
        end),
        OpenTryOnManager = if (l_name_0 ~= v38.TryOnManager and l_isMultiTryOn_0) and #v12.Dictionary.values(v105.props.tryOnItems) > 1 then v5.Input.onBegin(Enum.KeyCode.ButtonY, function()
            v33.closeFiltersAndItemDetails(v105.props.navigation);
            v105.props.navigation.navigate(v38.TryOnManager);
        end, {
            key = "Feature.Catalog.Label.TryOns"
        }) else nil
    };
    if l_name_0 == v38.ItemDetails then
        return (v12.Dictionary.join(v109, {
            OpenItemPrompt = v5.Input.onBegin(Enum.KeyCode.ButtonX, function()
                v105.props.openItemPrompt(v105.props.networking, v105.props.catalogAnalytics, v105.props.overlayClosedCallback, v105.props.navigation, l_avatarRoute_0);
            end, {
                key = "Feature.Catalog.Action.Buy"
            }),
            OpenClosePeekView = if l_isMultiTryOn_0 or v71() then nil else v5.Input.onBegin(Enum.KeyCode.ButtonY, function()
                if not v105.props.itemDetailsExpanded then
                    v105.props.setItemDetailsPeekViewState(l_PeekViewState_0.Full);
                    return ;
                else
                    v105.props.setItemDetailsPeekViewState(l_PeekViewState_0.Brief);
                    return ;
                end;
            end, {
                key = not v105.props.itemDetailsExpanded and "Feature.Catalog.Action.OpenDetails" or "Feature.Catalog.Action.CloseDetails"
            }),
            OpenCatalogContextMenu = v5.Input.onBegin(Enum.KeyCode.ButtonL3, function()
                v105.props.navigation.navigate(v38.CatalogContextMenu, {
                    itemId = l_avatarRoute_0.current.params.itemId,
                    itemType = l_avatarRoute_0.current.params.itemType,
                    onOverlayClosed = v105.props.overlayClosedCallback
                });
            end, {
                key = "Feature.Catalog.Action.ItemOptions"
            })
        }));
    else
        if l_name_0 == v38.TryOnManager then
            v109 = v12.Dictionary.join(v109, {
                OpenCloseTryOnManager = v5.Input.onBegin(Enum.KeyCode.ButtonY, function()
                    local l_tryOnManagerPeekViewState_0 = v105.props.tryOnManagerPeekViewState;
                    if not (l_tryOnManagerPeekViewState_0 ~= l_PeekViewState_0.Full) or l_tryOnManagerPeekViewState_0 == l_PeekViewState_0.Extended then
                        v105.props.setTryOnManagerPeekViewState(l_PeekViewState_0.Brief);
                        return ;
                    else
                        v105.props.setTryOnManagerPeekViewState(l_PeekViewState_0.Full);
                        return ;
                    end;
                end, {
                    key = "Feature.Catalog.Label.TryOns"
                })
            });
        end;
        return v109;
    end;
end;
v73.renderSearchBar = function(v111)
    return v4.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, v111.props.topBarHeight),
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        ZIndex = if not v69() then nil else 3
    }, {
        PaddedFrame = v4.createElement("Frame", {
            AnchorPoint = Vector2.new(0, 1),
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 1, 0),
            Size = UDim2.new(1, 0, 1, -20)
        }, {
            SearchBar = v4.createElement(l_HorizontalPageMargin_0, {
                backgroundTransparency = 1,
                backgroundColor3 = Color3.fromRGB(0, 0, 0)
            }, {
                v4.createElement(v25, {
                    cancelSearch = v111.cancelSearchCallback,
                    confirmSearch = v111.confirmSearchCallback,
                    onFocused = v111.onSearchBarFocused,
                    placeholderText = v111.props.localized.searchPlaceholder,
                    isCompactView = true,
                    modernUI = true,
                    autocomplete = v69(),
                    isSearching = v111.state.isSearching,
                    searchType = v21.SearchTypes.Catalog,
                    initialSearchText = v111.props.searchParameters.searchKeyword,
                    [v4.Ref] = v111.searchBarRef,
                    NextSelectionDown = v111.resultsListRef,
                    focusController = v111.props.focusController,
                    forceShowCancelButton = v69()
                })
            })
        })
    });
end;
v73.render = function(v112)
    local l_hasEntries_0 = v112.props.hasEntries;
    local v114 = v112.props.fullView == v54.SceneFullView;
    local v115 = v112.props.fullView == v54.UIFullView;
    local l_searchUuid_2 = v112.props.searchUuid;
    local l_refinementButtonsRef_0 = v112.refinementButtonsRef;
    if v112.props.avatarRoute.current.name == v38.TryOnManager then
        l_refinementButtonsRef_0 = v112.props.namedRefs[v38.TryOnManager];
    end;
    return v4.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 1, 0),
        focusController = v112.props.focusController,
        defaultChild = not not l_hasEntries_0 and v112.resultsListRef or v112.searchBarRef,
        inputBindings = v112:getInputBindings()
    }, {
        BoundInputsUpdater = v4.createElement(v45),
        NavigationEvents = v4.createElement(v8.NavigationEvents, {
            onDidFocus = function()
                local l_sortAndFilters_0 = (v112.props.navigation.getParam("searchParams") or {}).sortAndFilters;
                if not l_sortAndFilters_0 then
                    v112.props.resetSortAndFilters();
                    return ;
                else
                    v112.props.setSortAndFilters(l_sortAndFilters_0);
                    return ;
                end;
            end
        }),
        NavigationEventsLogger = v4.createElement(v47, {
            pageName = "CatalogSearch"
        }),
        AvatarExperienceView = v4.createElement(v44, {
            changeViewFunction = v112.changeView,
            allowAdaptiveScrolling = true,
            isSceneFullView = v114,
            isUIFullView = v115,
            topBar = v112:renderSearchBar(),
            [v4.Ref] = v112.sceneUIContainerRef,
            NextSelectionLeft = v112.searchBarRef,
            refinementButtonsRef = v112.refinementButtonsRef,
            defaultChildRef = not not l_hasEntries_0 and v112.resultsListRef or v112.searchBarRef,
            multiTryOnBottomBarRef = v112.multiTryOnBottomBarRef
        }, {
            GamepadFocusHandlerForPage = v4.createElement(v46, {
                focusController = v112.props.focusController
            }),
            ResultsList = v4.createElement(v61, {
                analyticsContext = v60.AnalyticsContext.CatalogSearch,
                fromSearch = true,
                searchUuid = l_searchUuid_2,
                onRetry = v112.dispatchInitialSearch,
                frameRef = v112.resultsListRef,
                NextSelectionUp = v112.searchBarRef,
                NextSelectionRight = l_refinementButtonsRef_0,
                multiTryOnBottomBarRef = v112.multiTryOnBottomBarRef,
                onCategoryOrSubcategoryChange = if not not v70() and v112.props.enableSearchResultsCategories then v112.onCategoryOrSubcategoryChange else nil,
                categoryInfo = if not not v70() and v112.props.enableSearchResultsCategories then v112.props.categoryInfo else nil,
                enableSearchResultsCategories = if not v70() then nil else v112.props.enableSearchResultsCategories
            })
        })
    });
end;
v73.didMount = function(v119)
    v119.isMounted = true;
    v119.dispatchInitialSearch():catch(function(v120)
        if not _G.__TESTEZ_RUNNING_TEST__ then
            warn("Error fetching CatalogSearch results:\n" .. tostring(v120));
        end;
    end);
    local l_l_UserInputService_0_LastInputType_0 = l_UserInputService_0:GetLastInputType();
    if l_l_UserInputService_0_LastInputType_0 and l_isGamepadInput_0(l_l_UserInputService_0_LastInputType_0) then
        v119.props.focusController.captureFocus();
    end;
end;
v73.willUnmount = function(v122)
    v122.isMounted = false;
    local l_searchUuid_3 = v122.props.searchUuid;
    v122.props.dispatchRemoveSearch(l_searchUuid_3);
    v122.props.pageObjectManager:storePageObject(l_searchUuid_3, nil);
    v122.props.resetSortAndFilters();
end;
v73.didUpdate = function(v124, v125)
    if v125.searchUuid ~= v124.props.searchUuid then
        if v125.searchUuid ~= nil then
            v124.props.dispatchRemoveSearch(v125.searchUuid);
            v124.props.pageObjectManager:storePageObject(v125.searchUuid, nil);
        end;
        v124.dispatchInitialSearch();
    end;
end;
v73 = v34(v41((v40((l_withNavigation_0((v10.connect(function(v126, v127)
    local v128 = v126.Search.SearchesInCatalog[v127.searchUuid];
    local v129 = not not v128 and v128.items or nil;
    local v130;
    if v129 then
        v130 = true;
        if not (#v129 == 0) then
            goto label0;
        end;
    end;
    v130 = false;
    ::label0::;
    local v131 = v36.getSearchKey(v126, v127.searchUuid);
    local v132 = v126.DeviceOrientation == l_DeviceOrientationMode_0.Portrait;
    local v133 = nil;
    if v70() then
        local l_SearchCategories_0 = v126.AvatarExperience.Catalog.SearchCategories;
        if l_SearchCategories_0 then
            v133 = v36.getCatalogCategoryInfo(l_SearchCategories_0.category, l_SearchCategories_0.subcategory);
        end;
    end;
    return {
        categoryInfo = if not v70() then nil else v133,
        fullView = v48(v126, v38.CatalogSearch),
        hasEntries = v130,
        dataStatus = l_PerformFetch_0.GetStatus(v126, v131),
        topBarHeight = v24.selectTopBarHeightNoBanners(v126),
        itemDetailsExpanded = v126.AvatarExperience.Common.ItemDetailsExpanded,
        isPortrait = v132,
        tryOnManagerPeekViewState = v126.AvatarExperience.Common.ItemDetailsPeekView.tryOnManagerViewState,
        tryOnItems = v126.AvatarExperience.AvatarScene.OutfitTryOn.TryOnItems
    };
end, function(v135)
    return {
        dispatchSearch = function(v136, v137, v138)
            return v135(v68({
                searchKeyword = v136,
                searchUuid = v137,
                categoryInfo = if not v70() then nil else v138
            }));
        end,
        dispatchRemoveSearch = function(v139)
            v135(v63(v139));
        end,
        setSearchType = function(v140, v141)
            return v135(v27(v140, v141));
        end,
        setSearchParameters = function(v142, v143)
            return v135(v26(v142, v143));
        end,
        setSortAndFilters = function(v144)
            return v135(v64(v144));
        end,
        openItemPrompt = function(v145, v146, v147, v148, v149)
            v135(v51(v145, v146, v147, v148, v149));
        end,
        setItemDetailsPeekViewState = function(v150)
            v135(v50(v150));
        end,
        setFullView = function(v151, v152, v153)
            v135(v53(v151, v152, v153));
        end,
        navigateIntoQuickMenu = function(v154, v155)
            v135(v52(v154, v155));
        end,
        resetSortAndFilters = function()
            v135(v65());
        end,
        setTryOnManagerPeekViewState = function(v156)
            v135(v66(v156));
        end,
        fetchWidgetInfo = function(v157, v158)
            v135(v67(v157, v158));
        end
    };
end)(v73))))))), v35.Consumer, "pageObjectManager");
if v70() then
    v73 = v57.connectTestVariables({
        enableSearchResultsCategories = v72.EnableSearchResultsCategories
    })(v73);
end;
v73 = l_RoactServices_0.connect({
    analytics = v17,
    catalogAnalytics = v59,
    avatarExperienceAnalytics = v43,
    networking = v19,
    eventIngest = v20
})(v73);
return function(v159)
    local l_current_0 = v6.useRef(v5.createFocusController()).current;
    local v161 = v56(l_current_0);
    return v6.createElement("Frame", {
        ref = v55({
            overlayClosedCallback = v161
        }),
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1)
    }, v6.createElement(v73, (v12.Dictionary.join(v159, {
        focusController = l_current_0,
        overlayClosedCallback = v161,
        localized = l_useLocalization_0({
            searchPlaceholder = "Search.GlobalSearch.Example.SearchCatalog"
        })
    }))));
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 l_withNavigation_0 = require(l_CorePackages_0.RoactNavigation).withNavigation;
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.Packages.t);
local l_Focusable_0 = require(l_CorePackages_0.Packages.RoactGamepad).Focusable;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local v11 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v11.Style.withStyle;
local l_ButtonType_0 = v11.App.Button.Enum.ButtonType;
local l_PartialPageModal_0 = v11.App.Dialog.Modal.PartialPageModal;
local v15 = v3.PureComponent:extend("CatalogPrompt");
v15.init = function(v16)
    v16.state = {
        apply = false
    };
    v16.buttonStackRef = v3.createRef();
end;
v15.validateProps = v6.strictInterface({
    title = v6.string,
    onApply = v6.callback,
    contentPadding = v6.optional(v6.UDim),
    [v3.Children] = v6.table,
    secondaryButtonProps = v6.optional(v6.table),
    forwardRef = v6.optional(v6.table),
    NextSelectionUp = v6.optional(v6.table),
    NextSelectionDown = v6.optional(v6.table),
    NextSelectionLeft = v6.optional(v6.table),
    NextSelectionRight = v6.optional(v6.table),
    disablePrimaryButton = v6.optional(v6.boolean),
    overlayFocusController = v6.optional(v6.table),
    isPortrait = v6.boolean,
    screenSize = v6.Vector2,
    navigation = v6.table
});
v15.defaultProps = {
    contentPadding = UDim.new(0, 0),
    disablePrimaryButton = false
};
v15.onClose = function(v17, v18)
    if v18 then
        v17.props.onApply();
    end;
    v10.closeOverlay(v17.props.navigation);
end;
v15.render = function(v19)
    return l_withStyle_0(function(_)
        return l_withLocalization_0({
            apply = "CommonUI.Messages.Action.Apply"
        })(function(v21)
            local v22 = nil;
            local v23 = nil;
            if not v19.props.isPortrait then
                v22 = UDim2.new(0.5, 0, 0.5, 0);
                v23 = Vector2.new(0.5, 0.5);
            else
                v22 = UDim2.new(0.5, 0, 1, 0);
                v23 = Vector2.new(0.5, 1);
            end;
            local v24 = {};
            if v19.props.secondaryButtonProps then
                table.insert(v24, v19.props.secondaryButtonProps);
            end;
            table.insert(v24, {
                buttonType = l_ButtonType_0.PrimarySystem,
                props = {
                    isDisabled = v19.props.disablePrimaryButton,
                    onActivated = function()
                        v19:onClose(true);
                    end,
                    text = v21.apply
                }
            });
            return v3.createElement(l_Focusable_0.Frame, {
                Size = UDim2.fromScale(1, 1),
                BackgroundTransparency = 1,
                [v3.Ref] = v19.props.forwardRef,
                defaultChild = v19.buttonStackRef
            }, {
                PartialPageModal = v3.createElement(l_PartialPageModal_0, {
                    title = v19.props.title,
                    screenSize = v19.props.screenSize,
                    position = v22,
                    anchorPoint = v23,
                    contentPadding = v19.props.contentPadding,
                    buttonStackProps = {
                        buttons = v24,
                        frameRef = v19.buttonStackRef,
                        NextSelectionUp = v19.props.NextSelectionUp
                    },
                    onCloseClicked = function()
                        v19:onClose();
                    end
                }, v19.props[v3.Children])
            });
        end);
    end);
end;
v15 = l_withNavigation_0((v5.connect(function(v25)
    return {
        isPortrait = v25.DeviceOrientation == l_DeviceOrientationMode_0.Portrait,
        screenSize = v25.ScreenSize
    };
end, nil)(v15)));
return v3.forwardRef(function(v26, v27)
    return v3.createElement(v15, v2.Dictionary.join(v26, {
        forwardRef = v27
    }));
end);