local v0 = require(game:GetService("CorePackages").Cryo);
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v3 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v4 = require(l_Modules_0.LuaApp.TestHelpers.MockRequest);
local v5 = {
    dummyAssetId = "0",
    dummyBundleId = "0",
    dummyProductId = "0",
    dummyUserId = "0",
    dummyUniverseId = "0",
    dummyCollectibleItemId = "0",
    isLimited = false,
    isLimitedUnique = false,
    emptyRecommendations = false,
    hasAttribution = false
};
local v6 = "model.assetTypeIds=8&model.assetTypeIds=41&model.assetTypeIds=42&model.assetTypeIds=43" .. "&model.assetTypeIds=44&model.assetTypeIds=45&model.assetTypeIds=46&model.assetTypeIds=47&model.assetTypeIds=18" .. "&model.assetTypeIds=19&model.assetTypeIds=61";
local v7 = "model.assetTypeIds=8&model.assetTypeIds=41&model.assetTypeIds=42&model.assetTypeIds=43" .. "&model.assetTypeIds=44&model.assetTypeIds=45&model.assetTypeIds=46&model.assetTypeIds=47&model.assetTypeIds=18" .. "&model.assetTypeIds=19";
return function(v8)
    local v9 = v0.Dictionary.join(v5, v8 or {});
    local v10 = {};
    if not v9.isLimited then
        if v9.isLimitedUnique then
            v10 = {
                v2.ItemRestrictions.LimitedUnique
            };
        end;
    else
        v10 = {
            v2.ItemRestrictions.Limited
        };
    end;
    local v11 = v4.simpleSuccessRequest({
        keyword = "Tie",
        previousPageCursor = nil,
        nextPageCursor = "testcursorstring",
        data = {
            {
                id = 1818,
                itemType = "Asset",
                assetType = 43,
                name = "Space Tie",
                description = "For a look that's out of this world",
                productId = 95344840,
                genres = {
                    "TownAndCity"
                },
                itemStatus = {},
                itemRestrictions = v10,
                creatorType = "User",
                creatorTargetId = 1,
                creatorName = "ROBLOX",
                price = 30,
                favoriteCount = 1985
            }
        }
    });
    local v12 = {
        userAssetId = 12321,
        seller = {
            id = 261,
            type = "User",
            name = "Shedletsky"
        },
        price = 10000,
        serialNumber = 101
    };
    local v13 = {
        item = {
            assetId = 71037101,
            name = "Dagger of Shattered Dimensions",
            price = 10294,
            absoluteUrl = "https://www.roblox.com/catalog/71037101/Dagger-of-Shattered-Dimensions"
        },
        creator = {
            creatorId = 1,
            creatorType = "User",
            name = "ROBLOX",
            creatorProfileLink = "https://www.roblox.com/users/1/profile/"
        },
        product = {
            id = 11008410,
            priceInRobux = nil,
            isForSale = false,
            isPublicDomain = false,
            isResellable = false,
            isLimited = false,
            isLimitedUnique = true,
            isRental = false,
            bcRequirement = 0,
            totalPrivateSales = 0,
            sellerId = 0,
            sellerName = nil,
            lowestPrivateSaleUserAssetId = nil,
            isXboxExclusiveItem = false,
            offsaleDeadline = nil,
            noPriceText = "",
            isFree = false
        }
    };
    local v14 = {
        id = 70386604,
        itemType = "Asset",
        assetType = 19,
        name = "Limited Skeleton Bomb",
        description = "It's a limited item.",
        productId = 10912719,
        genres = {
            "All"
        },
        itemStatus = {},
        itemRestrictions = {
            "LimitedUnique"
        },
        creatorType = "User",
        creatorTargetId = 1,
        creatorName = "ROBLOX",
        unitsAvailableForConsumption = 19195,
        favoriteCount = 3
    };
    local v15 = v4.simpleSuccessRequest({
        previousPageCursor = nil,
        nextPageCursor = "testCursor",
        data = {
            {
                name = "Nec Protec",
                userAssetId = 61105953107,
                assetId = 4911671338,
                assetType = "NeckAccessory",
                owner = {
                    userId = 2231221,
                    username = "TheGamer101",
                    buildersClubMembershipType = 0
                },
                created = "2020-04-19T13:41:06.37",
                updated = "2020-04-19T13:41:06.37"
            }
        }
    });
    return {
        {
            url = "/v1/catalog/sponsored-items?model.placementLocation=AvatarShop" .. "&model.catalogCategoryType=Recommended&model.count=10",
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = "/v1/search/items/details?limit=30&model.category=Featured&model.sortType=Relevance",
            request = v11
        },
        {
            url = "/v1/search/items/details?limit=30&model.category=All&model.sortType=Relevance",
            request = v11
        },
        {
            url = "/v1/search/items/details?category=Featured&limit=30",
            request = v11
        },
        {
            url = "/v1/recommendations/asset/61?numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v13,
                    v13
                }
            })
        },
        {
            url = "/v1/recommendations/asset/46?contextAssetId=1818&numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v13,
                    v13
                }
            })
        },
        {
            url = string.format("/v1/favorites/users/%s/assets/1818/favorite", v9.dummyUserId),
            request = v4.simpleSuccessRequest({
                data = 100
            })
        },
        {
            url = "v2/recommendations/user-inventory?bundleTypeId=1&details=true&numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "v2/recommendations/user-inventory?bundleTypeId=2&details=true&numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "v2/recommendations/assets?assetTypeId=0&assetId=1818&details=true&numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "v2/recommendations/user-inventory?assetTypeId=64&details=true&numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "v2/recommendations/user-inventory?assetTypeId=61&details=true&numItems=6",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "v2/recommendations/user-inventory/details?limit=120&bundleTypeId=",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "v2/recommendations/user-inventory/details?limit=120&assetTypeId=",
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v14,
                    v14,
                    v14,
                    v14,
                    v14,
                    v14
                }
            })
        },
        {
            url = "/v2/search/items/details?model.categoryFilter=None&limit=30&model.bundleTypeIds=1",
            request = v11
        },
        {
            url = "/v2/search/items/details?model.categoryFilter=Recommended&limit=28&model.sortType=Relevance",
            request = v11
        },
        {
            url = "/v2/search/items/details%?model.categoryFilter=Recommended&limit=30[&model.assetTypeIds=%d+]+" .. "&model.bundleTypeIds=2&model.bundleTypeIds=1&model.sortType=Relevance",
            usePatterns = true,
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = "/v2/search/items/details%?model.categoryFilter=Recommended&limit=120[&model.assetTypeIds=%d+]+",
            usePatterns = true,
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = "v2/search/items/details?model.categoryFilter=Recommended&limit=30&model.keyword=&model.sortType=Relevance",
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = "/v2/search/items/details?model.categoryFilter=Recommended&limit=30&model.sortType=Relevance",
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = string.format("/v2/search/items/details?model.categoryFilter=Recommended&limit=30&%s&model.sortType=Relevance", v7),
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = "/v1/users//outfits?page=1&itemsPerPage=25&isEditable=",
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = string.format("/v2/search/items/details?model.categoryFilter=Recommended&limit=30&%s&%s&model.sortType=Relevance", v6, "model.bundleTypeIds=2&model.bundleTypeIds=1"),
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = string.format("/v2/search/items/details?model.categoryFilter=Recommended&limit=30&%s&model.sortType=Relevance", v6),
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = "/v2/users//inventory/61/?sortOrder=Desc&limit=25&cursor=",
            request = v15
        },
        {
            url = "/v2/users//inventory/?sortOrder=Desc&cursor=&limit=25" .. "&assetTypes=ShirtAccessory&assetTypes=TShirtAccessory&assetTypes=SweaterAccessory",
            request = v15
        },
        {
            url = "/v2/users//inventory/?sortOrder=Desc&cursor=testCursor&limit=25" .. "&assetTypes=ShirtAccessory&assetTypes=TShirtAccessory&assetTypes=SweaterAccessory",
            request = v15
        },
        {
            url = "/v2/users//inventory/?sortOrder=Desc&cursor=&limit=25&assetTypes=IdleAnimation",
            request = v15
        },
        {
            url = "/v2/users//inventory/?sortOrder=Desc&cursor=testCursor&limit=25&assetTypes=IdleAnimation",
            request = v15
        },
        {
            url = "/v2/users//inventory/?sortOrder=Desc&cursor=&limit=25&assetTypes=EmoteAnimation",
            request = v15
        },
        {
            url = "/v2/users//inventory/?sortOrder=Desc&cursor=testCursor&limit=25&assetTypes=EmoteAnimation",
            request = v15
        },
        {
            url = "/v2/users/2231221/inventory/?sortOrder=Desc&cursor=&limit=25&assetTypes=EmoteAnimation",
            request = v15
        },
        {
            url = "/v1/search/items/details?limit=30&model.category=Featured&model.sortType=Relevance",
            request = v11
        },
        {
            url = "/v1/catalog/items",
            request = v4.simpleSuccessRequest({
                isForRent = false,
                expectedSellerId = 1,
                owned = false,
                isPurchasable = true,
                id = v9.dummyAssetId,
                itemType = v3.ItemType.Asset,
                assetType = 46,
                name = "Test Asset",
                description = "Test Description",
                productId = 50,
                genres = {
                    "All"
                },
                creatorType = "User",
                creatorTargetId = 1,
                creatorName = "ROBLOX",
                itemRestrictions = v10,
                price = 100,
                favoriteCount = 100
            })
        },
        {
            url = string.format("/v1/catalog/items/%s/details?itemType=%s", v9.dummyBundleId, v3.ItemType.Bundle),
            request = v4.simpleSuccessRequest({
                isForRent = false,
                expectedSellerId = 1,
                owned = false,
                isPurchasable = true,
                id = v9.dummyBundleId,
                itemType = v3.ItemType.Bundle,
                assetType = 10,
                name = "Test Bundle",
                description = "Test Description",
                productId = 100,
                genres = {
                    "All"
                },
                creatorType = "User",
                creatorTargetId = 1,
                creatorName = "ROBLOX",
                price = 100,
                itemRestrictions = v10,
                favoriteCount = 100
            })
        },
        {
            url = string.format("/v1/assets/%s/resale-data", v9.dummyAssetId),
            request = v4.simpleSuccessRequest({
                assetStock = 500,
                sales = 500,
                numberRemaining = 0,
                recentAveragePrice = 2237,
                originalPrice = 1500
            })
        },
        {
            url = string.format("/v1/assets/%s/resellers?limit=10", v9.dummyAssetId),
            request = v4.simpleSuccessRequest({
                data = {
                    v12,
                    v12
                }
            })
        },
        {
            url = string.format("/v1/recommendations/asset/0?contextAssetId=%s&numItems=6", v9.dummyAssetId),
            request = v4.simpleSuccessRequest({
                data = not not v9.emptyRecommendations and {} or {
                    v13,
                    v13
                }
            })
        },
        {
            url = "/v1/search/items/details?limit=30&model.keyword=Tie&model.category=All&model.sortType=Relevance",
            request = v11
        },
        {
            url = "/v2/search/items/details?model.categoryFilter=None&limit=30&model.keyword=Tie&model.sortType=Relevance",
            request = v11
        },
        {
            url = "/v1/resale-tax-rate",
            request = v4.simpleSuccessRequest({
                taxRate = 0.3,
                minimumFee = 1
            })
        },
        {
            url = "/v1/assets/2929/users//resellable-copies",
            request = v4.simpleSuccessRequest({
                data = {
                    v12,
                    {
                        userAssetId = 12321,
                        seller = {
                            id = 261,
                            type = "User",
                            name = "Shedletsky"
                        },
                        serialNumber = 101
                    }
                }
            })
        },
        {
            url = "/v1/assets/1818/users//resellable-copies",
            request = v4.simpleSuccessRequest({
                data = {
                    v12
                }
            })
        },
        {
            url = string.format("/v1/assets/%s/resellers", v9.dummyAssetId),
            request = v4.simpleSuccessRequest({
                data = {
                    v12
                }
            })
        },
        {
            url = "/v1/catalog/metadata",
            request = v4.simpleSuccessRequest({
                LCEnabledInEditorAndCatalog = true
            })
        },
        {
            url = "/v1/avatar/thumbnail-customizations",
            request = v4.simpleSuccessRequest({
                avatarThumbnailCustomizations = {
                    {
                        thumbnailType = 1,
                        emoteAssetId = 4689362868,
                        camera = {
                            fieldOfViewDeg = 30,
                            xRotDeg = 0,
                            yRotDeg = 20,
                            distanceScale = 1
                        }
                    },
                    {
                        thumbnailType = 2,
                        emoteAssetId = 4689362868,
                        camera = {
                            fieldOfViewDeg = 30,
                            xRotDeg = 0,
                            yRotDeg = 20,
                            distanceScale = 1
                        }
                    }
                }
            })
        },
        {
            url = "/v1/avatar",
            request = v4.simpleSuccessRequest({
                scales = {
                    height = 1.05,
                    width = 1,
                    head = 1,
                    depth = 1,
                    proportion = 0,
                    bodyType = 0
                },
                playerAvatarType = "R15",
                bodyColors = {
                    headColorId = 24,
                    torsoColorId = 24,
                    rightArmColorId = 24,
                    leftArmColorId = 24,
                    rightLegColorId = 24,
                    leftLegColorId = 24
                },
                assets = {
                    {
                        id = 44179202,
                        name = "TheGamer101 Name tag.",
                        assetType = {
                            id = 2,
                            name = "T-Shirt"
                        }
                    },
                    {
                        id = 106690045,
                        name = "Classic Swordpack Throwback",
                        assetType = {
                            id = 46,
                            name = "Back Accessory"
                        }
                    }
                }
            })
        },
        {
            url = "/v2/avatar/avatar",
            request = v4.simpleSuccessRequest({
                scales = {
                    height = 1.05,
                    width = 1,
                    head = 1,
                    depth = 1,
                    proportion = 0,
                    bodyType = 0
                },
                playerAvatarType = "R15",
                bodyColor3s = {
                    headColor3 = "112233",
                    torsoColor3 = "223344",
                    rightArmColor3 = "334455",
                    leftArmColor3 = "445566",
                    rightLegColor3 = "556677",
                    leftLegColor3 = "778899"
                },
                assets = {
                    {
                        id = 44179202,
                        name = "TheGamer101 Name tag.",
                        assetType = {
                            id = 2,
                            name = "T-Shirt"
                        }
                    },
                    {
                        id = 106690045,
                        name = "Classic Swordpack Throwback",
                        assetType = {
                            id = 46,
                            name = "Back Accessory"
                        }
                    }
                }
            })
        },
        {
            url = "/account-security-service/v1/prompt-assignments",
            request = v4.simpleSuccessRequest({})
        },
        {
            url = string.format("/v1/purchases/products/%s", v9.dummyProductId),
            request = v4.simpleSuccessRequest({
                purchased = v9.failedPurchaseReason == nil,
                reason = v9.failedPurchaseReason
            })
        },
        {
            url = string.format("/v1/users/%s/configuration", v9.dummyUserId),
            request = v4.simpleSuccessRequest({
                methods = {
                    {
                        enabled = true
                    }
                }
            })
        },
        {
            url = "/v2/spend-friction/two-step-verification/generate",
            request = v4.simpleSuccessRequest("GENERATED_CHALLENGE_ID")
        },
        {
            url = string.format("/v1/users/%s/currency", v9.dummyUserId),
            request = v4.simpleSuccessRequest({
                robux = 0
            })
        },
        {
            url = "/v1/users//currency",
            request = v4.simpleSuccessRequest({
                robux = 0
            })
        },
        {
            url = "/marketplace-widgets/v1/widgets",
            request = v4.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = string.format("/v1/assets/%s/saved-versions", v9.dummyAssetId),
            request = v4.simpleSuccessRequest({
                data = {
                    {
                        creatingUniverseId = if not v9.hasAttribution then nil else 17
                    }
                }
            })
        },
        {
            url = string.format("//v1/settings/verify/show-age-verification-overlay/%s", v9.dummyUniverseId),
            request = v4.simpleSuccessRequest({
                showAgeVerificationOverlay = false,
                showVoiceOptInOverlay = false,
                universePlaceVoiceEnabledSettings = {
                    isUniverseEnabledForVoice = false,
                    isUniverseEnabledForAvatarVideo = false
                },
                voiceSettings = {
                    isVoiceEnabled = false
                }
            })
        },
        {
            url = "/v1/private-servers/enabled-in-universe/56",
            request = v4.simpleSuccessRequest({
                privateServersEnabled = false
            })
        },
        {
            url = "/marketplace-items/v1/items/details",
            request = v4.simpleSuccessRequest({
                {}
            })
        },
        {
            url = "/v1/topic/get-topics",
            request = v4.simpleSuccessRequest({
                topics = {}
            })
        }
    };
end;


local function v5(v0)
    local v1 = {};
    for v2 = 1, #v0 do
        local v3 = {};
        for v4 = 1, v2 do
            table.insert(v3, v0[v4]);
        end;
        table.insert(v1, v3);
    end;
    return v1;
end;
return function(...)
    local v6 = {};
    for _, v8 in {
        ...
    }, nil, nil do
        table.insert(v6, {
            name = v8
        });
    end;
    return {
        history = v5(v6),
        lockNavigationActions = false,
        backNavigationDisableCounter = 0
    };
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local _ = require(l_Modules_0.AvatarExperience.Catalog.Reducers.SortAndFilters);
local function _()
    return {
        minPrice = v1.MinPriceFilter,
        maxPrice = v1.MaxPriceFilter
    };
end;
return function(v4)
    local v5 = v4 or {};
    v5.PriceRange = v5.PriceRange or {
        minPrice = v1.MinPriceFilter,
        maxPrice = v1.MaxPriceFilter
    };
    return {
        AvatarExperience = {
            Catalog = {
                SortAndFilters = v5
            }
        }
    };
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_Modules_0.AvatarExperience.Common.Debug.dumpInstanceTree);
return function(v4, v5)
    local l_ScreenGui_0 = Instance.new("ScreenGui");
    l_ScreenGui_0.Parent = game:GetService("CoreGui");
    local v7 = v2.mount(v4, l_ScreenGui_0);
    local l_status_0, l_result_0 = pcall(v5, l_ScreenGui_0, v7);
    local v10 = nil;
    if not l_status_0 then
        v10 = string.format("%s\n\nInstance Tree:\n\n%s", tostring(l_result_0), v3(l_ScreenGui_0));
    end;
    v2.unmount(v7);
    if not l_status_0 then
        error(v10);
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(game:GetService("CoreGui").RobloxGui.Modules.LuaAppRhodiumTest.withServices);
local _ = require(l_CorePackages_0.Packages.Dash);
return function(v3, v4)
    v1(v4, v3.component, v3.initialStoreState, v3.props, v3.extraServices, v3.extraArgs);
end;


local l_GuiService_0 = game:GetService("GuiService");
local v1 = require(game:GetService("CorePackages").Packages.ReactRoblox);
return function(v2)
    local function _(v3)
        return function()
            v1.act(function()
                v2:hitButton(v3);
                wait();
            end);
        end;
    end;
    local function v6()
        for _ = 1, 60 do
            if l_GuiService_0.SelectedCoreObject ~= nil then
                return ;
            else
                v1.act(function()
                    task.wait();
                end);
            end;
        end;
    end;
    local v7 = {};
    local l_DPadDown_0 = Enum.KeyCode.DPadDown;
    local l_l_DPadDown_0_0 = l_DPadDown_0 --[[ copy: 5 -> 6 ]];
    v7.down = function()
        v1.act(function()
            v2:hitButton(l_l_DPadDown_0_0);
            wait();
        end);
    end;
    l_DPadDown_0 = Enum.KeyCode.DPadUp;
    local l_l_DPadDown_0_1 = l_DPadDown_0 --[[ copy: 5 -> 7 ]];
    v7.up = function()
        v1.act(function()
            v2:hitButton(l_l_DPadDown_0_1);
            wait();
        end);
    end;
    l_DPadDown_0 = Enum.KeyCode.DPadLeft;
    local l_l_DPadDown_0_2 = l_DPadDown_0 --[[ copy: 5 -> 8 ]];
    v7.left = function()
        v1.act(function()
            v2:hitButton(l_l_DPadDown_0_2);
            wait();
        end);
    end;
    l_DPadDown_0 = Enum.KeyCode.DPadRight;
    local l_l_DPadDown_0_3 = l_DPadDown_0 --[[ copy: 5 -> 9 ]];
    v7.right = function()
        v1.act(function()
            v2:hitButton(l_l_DPadDown_0_3);
            wait();
        end);
    end;
    l_DPadDown_0 = Enum.KeyCode.ButtonA;
    v7.buttonA = function()
        v1.act(function()
            v2:hitButton(l_DPadDown_0);
            wait();
        end);
    end;
    v7.waitForFocus = v6;
    return v7;
end;


local v0 = require(game:GetService("CorePackages").Roact);
return function(v1, v2)
    return function(v3)
        return v0.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = v2
        }, {
            component = v0.createElement(v1, v3)
        });
    end;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.withAvatarRouteProvider);
local v2 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.withSceneInteractionProvider);
local v3 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.withPageObjectManagerProvider);
return function(v4, v5)
    local v6 = v5 or {};
    return (v3(v2((v1(v4, v6.avatarRoute))), v6.pageObjectManager));
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarRouteContext);
local v2 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v3 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.withContextProvider);
local v4 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarRoute);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local function v8(v6)
    local v7 = {
        name = v6,
        key = v6,
        params = {}
    };
    return v4.new({
        current = v7,
        previousPages = {
            v7
        },
        opaque = v7,
        isVisible = true,
        isOverlayVisible = false
    });
end;
local function v16(v9)
    v9 = v9 or {};
    local v10 = v9.current or {};
    local v11 = v9.previous or {};
    local v12 = v9.opaque or {};
    local v13 = v10.name or v2.None;
    local v14 = v11.name or v2.None;
    local v15 = v12.name or v2.None;
    return v4.new({
        current = {
            name = v13,
            key = v10.key or v13,
            params = v10.params or {}
        },
        previousPages = {
            {
                name = v14,
                key = v11.key or v14,
                params = v11.params or {}
            }
        },
        opaque = {
            name = v15,
            key = v12.key or v15,
            params = v12.params or {}
        },
        isVisible = v9.isVisible ~= false,
        isOverlayVisible = v9.isOverlayVisible == true
    });
end;
return function(v17, v18)
    return v3(v17, v1.Provider, if type(v18) == "string" then v8(v18) else v16(v18));
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.Cryo);
return function(v3, v4, v5)
    return v1.forwardRef(function(v6, v7)
        return v1.createElement(v4, {
            value = v5
        }, {
            component = v1.createElement(v3, v2.Dictionary.join(v6, {
                [v1.Ref] = v7
            }))
        });
    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.Roact);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_Modules_0.AvatarExperience.Common.Context.PageObjectManagerContext);
local v6 = require(l_Modules_0.AvatarExperience.Common.Managers.PageObjectManager);
return function(v7, v8)
    return v3.forwardRef(function(v9, v10)
        return v3.createElement(v5.Provider, {
            pageObjectManager = v8 or v6.new()
        }, {
            Component = v3.createElement(v7, v4.Dictionary.join(v9, {
                [v3.Ref] = v10
            }))
        });
    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.Roact);
local v4 = require(l_CorePackages_0.Cryo);
local v5 = require(l_Modules_0.AvatarExperience.Common.Context.SceneInteractionProvider);
return function(v6)
    return v3.forwardRef(function(v7, v8)
        return v3.createElement(v5, nil, {
            Component = v3.createElement(v6, v4.Dictionary.join(v7, {
                [v3.Ref] = v8
            }))
        });
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_GuiService_0 = game:GetService("GuiService");
local l_expect_0 = require(l_CorePackages_0.JestGlobals).expect;
local v4 = require(l_Modules_0.LuaApp.TestHelpers.MockStore);
local v5 = require(l_CorePackages_0.Cryo);
local v6 = require(l_CorePackages_0.Rhodium);
local l_Element_0 = v6.Element;
local l_XPath_0 = v6.XPath;
local v9 = require(l_Modules_0.LuaAppRhodiumTest.withServices);
local v10 = require(l_Modules_0.act);
local v11 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local l_RetrievalStatus_0 = require(l_CorePackages_0.Workspace.Packages.Http).Enum.RetrievalStatus;
local v13 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.adjustScreenPath);
local v14 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.FakeNavigation);
local v15 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.withAvatarProviders);
beforeAll = nil;
afterAll = nil;
describe = nil;
it = nil;
itSKIP = nil;
return function(v16, v17, v18, v19)
    local v20 = {
        FetchingStatus = {
            [v18] = l_RetrievalStatus_0.NotStarted
        },
        ScreenSize = Vector2.new(500, 500)
    };
    v16 = v15(v16);
    local v21 = v4.new(v20);
    v19 = v5.Dictionary.join(v19 or {}, {
        navigation = v14.new({
            routeName = v17
        })
    });
    describe(v17, function()
        it("should mount the component", function()
            v9(function(v22)
                l_expect_0(l_Element_0.new((v13(l_XPath_0.new(v22)))):waitForRbxInstance(1)).toBeDefined();
            end, v16, v21, v19);
        end);
        it("should disable the Save button if there is no user input", function()
            v9(function(v23)
                v23 = v13(l_XPath_0.new(v23)):cat(l_XPath_0.new("Alert"));
                local v24 = v23:cat(l_XPath_0.new("AlertContents.MiddleContent.Content.CustomContent.Content")):cat(l_XPath_0.new("TextboxContainer.Textbox"));
                local v25 = v23:cat(l_XPath_0.new("AlertContents.Footer.Buttons"));
                local v26 = v25:cat(l_XPath_0.new("2"));
                l_expect_0(l_Element_0.new(v24):waitForRbxInstance(1)).toBeDefined();
                l_expect_0(l_Element_0.new(v25):waitForRbxInstance(1)).toBeDefined();
                local v27 = l_Element_0.new(v26);
                l_expect_0(v27:waitForRbxInstance(1)).toBeDefined();
                l_expect_0(v27:getAttribute("ImageTransparency")).toBe(v11.ActionBar.DisabledButtonTransparency);
            end, v16, v21, v19);
        end);
        it("should disable the Save button if the outfit's name is invalid", function(v28)
            v9(function(v29)
                v29 = v13(l_XPath_0.new(v29)):cat(l_XPath_0.new("Alert"));
                local v30 = v29:cat(l_XPath_0.new("AlertContents.MiddleContent.Content.CustomContent.Content"));
                local v31 = v30:cat(l_XPath_0.new("TextboxContainer.Textbox"));
                local v32 = v30:cat(l_XPath_0.new("WarningText"));
                local v33 = v29:cat(l_XPath_0.new("AlertContents.Footer.Buttons"));
                local v34 = v33:cat(l_XPath_0.new("2"));
                local v35 = l_Element_0.new(v31);
                l_expect_0(v35:waitForRbxInstance(1)).toBeDefined();
                v10(function()
                    wait(0.3);
                end);
                v28.actSendText(v35, "#abc", 0.3);
                l_expect_0(v35:getAttribute("Text")).toBe("#abc");
                l_expect_0(l_Element_0.new(v32):waitForRbxInstance(1)).toBeDefined();
                l_expect_0(l_Element_0.new(v33):waitForRbxInstance(1)).toBeDefined();
                local v36 = l_Element_0.new(v34);
                l_expect_0(v36:waitForRbxInstance(1)).toBeDefined();
                l_expect_0(v36:getAttribute("ImageTransparency")).toBe(v11.ActionBar.DisabledButtonTransparency);
            end, v16, v21, v19);
        end);
        it("should enable the Save button if the outfit's name is valid", function(v37)
            v9(function(v38)
                v38 = v13(l_XPath_0.new(v38)):cat(l_XPath_0.new("Alert"));
                local v39 = v38:cat(l_XPath_0.new("AlertContents.MiddleContent.Content.CustomContent.Content"));
                local v40 = v39:cat(l_XPath_0.new("TextboxContainer.Textbox"));
                local v41 = v39:cat(l_XPath_0.new("WarningText"));
                local v42 = v38:cat(l_XPath_0.new("AlertContents.Footer.Buttons"));
                local v43 = v42:cat(l_XPath_0.new("2"));
                local v44 = l_Element_0.new(v40);
                l_expect_0(v44:waitForRbxInstance(1)).toBeDefined();
                v10(function()
                    wait(0.3);
                end);
                v37.actSendText(v44, "abc", 0.3);
                l_expect_0(v44:getAttribute("Text")).toBe("abc");
                l_expect_0(l_Element_0.new(v41):waitForRbxInstance(1)).toBeNil();
                l_expect_0(l_Element_0.new(v42):waitForRbxInstance(1)).toBeDefined();
                local v45 = l_Element_0.new(v43);
                l_expect_0(v45:waitForRbxInstance(1)).toBeDefined();
                l_expect_0(v45:getAttribute("ImageTransparency")).never.toBe(v11.ActionBar.DisabledButtonTransparency);
            end, v16, v21, v19);
        end);
    end);
    describe(v17 .. "Gamepad", function()
        local v46 = {
            navigation = v14.new({
                routeName = v17
            })
        };
        it("should navigate the component with gamepad", function(v47)
            local v48 = v6.VirtualInput.GamePad.new();
            v48:hitButton(Enum.KeyCode.DPadUp);
            if not game:GetEngineFeature("VirtualInputEventsProcessed") then
                wait();
            else
                v6.VirtualInput.waitForInputEventsProcessed();
            end;
            v9(function(v49)
                v49 = v13(l_XPath_0.new(v49)):cat(l_XPath_0.new("Alert"));
                local v50 = l_Element_0.new(v49:cat(l_XPath_0.new("AlertContents.Footer.Buttons.1")));
                l_expect_0(v50:waitForRbxInstance(1)).toBeDefined();
                local v51 = l_Element_0.new(v49:cat(l_XPath_0.new("AlertContents.Footer.Buttons.2")));
                local v52 = l_Element_0.new((v49:cat(l_XPath_0.new("AlertContents.MiddleContent.Content.CustomContent.Content.TextboxContainer.Textbox"))));
                v10(function()
                    task.wait(0);
                end);
                l_expect_0(v50:getRbxInstance()).toBe(l_GuiService_0.SelectedCoreObject);
                v47.actGamepadInput(v48, Enum.KeyCode.DPadRight);
                l_expect_0(v51:getRbxInstance()).toBe(l_GuiService_0.SelectedCoreObject);
                v47.actGamepadInput(v48, Enum.KeyCode.DPadUp);
                l_expect_0(v52:getRbxInstance()).toBe(l_GuiService_0.SelectedCoreObject);
                v47.actGamepadInput(v48, Enum.KeyCode.DPadDown);
                l_expect_0(v50:getRbxInstance()).toBe(l_GuiService_0.SelectedCoreObject);
                v48:disconnect();
            end, v16, v21, v19, nil, v46);
        end);
    end);
end;