local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local v5 = require(l_Packages_0.Dash);
local l_HoverArea_0 = v4.UI.HoverArea;
local l_withAbsoluteSizeAndPosition_0 = v4.Wrappers.withAbsoluteSizeAndPosition;
local l_Util_0 = l_script_FirstAncestor_0.Core.Util;
local v9 = require(l_Util_0.Constants);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v12 = require(l_script_FirstAncestor_0.Core.Util.Analytics.Analytics);
local _ = require(l_script_FirstAncestor_0.Core.Components.AssetLogicWrapper);
local v14 = require(l_Util_0.Analytics.AssetAnalyticsContextItem);
local v15 = require(l_script_FirstAncestor_0.Core.Networking.Requests.SearchWithOptions);
local v16 = require(l_script_FirstAncestor_0.Core.ContextServices.Settings);
local v17 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v18 = require(l_script_FirstAncestor_0.Core.Networking.Requests.PurchaseAssetRequest);
local v19 = require(l_script_FirstAncestor_0.Core.Util.getIsValidAudioAssetForInventoryGrant);
local v20 = require(l_script_FirstAncestor_0.Core.Components.ItemRow.ItemRow);
local v21 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioRowExpandedContent);
local v22 = require(l_script_FirstAncestor_0.Core.Util.Images);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local v24 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v25 = require(l_script_FirstAncestor_0.Core.Components.Audio.GetAudioTableSizes);
local v26 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxRefactorAudioConstantsForItemRow);
local v27 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxUpdateDisplayedAudioTags);
local v28 = require(l_script_FirstAncestor_0.Core.Flags.getFFlagToolboxShowArtistThenCreator);
local l_game_EngineFeature_0 = game:GetEngineFeature("ToolboxSampleProductMUS418");
local v30 = v2.PureComponent:extend("AudioRow");
secondsToMinuteString = function(v31)
    local v32 = tonumber(v31) or 0;
    return string.format("%d:%02d", math.floor(v32 / 60), v32 % 60);
end;
local v33 = {
    Artist = "---",
    MusicAlbum = "---"
};
audioDetailsWithDefaults = function(v34)
    return v5.join(v33, v34);
end;
v30.init = function(v35, v36)
    v35.wasAssetBoundsWithinScrollingBounds = false;
    v35.state = {
        isPlayButtonHovered = false,
        isExpanded = true,
        isPlaying = false
    };
    v35.onPlayButtonMouseEnter = function()
        v35:setState({
            isPlayButtonHovered = true
        });
    end;
    v35.onPlayButtonMouseLeave = function()
        v35:setState({
            isPlayButtonHovered = false
        });
    end;
    v35.toggleIsExpanded = function()
        v35.props.OnExpanded(v35.props.AssetInfo.Asset.Id);
    end;
    v35.stopPlaying = function()
        v35:setState({
            isPlaying = false
        });
    end;
    v35.toggleIsPlayer = function()
        v35:setState(function(v37)
            return {
                isPlaying = not v37.isPlaying
            };
        end);
    end;
    v35.onClick = function()
        if v35.props.CanInsertAsset() then
            if l_game_EngineFeature_0 then
                local l_AssetInfo_0 = v35.props.AssetInfo;
                local l_networkInterface_0 = v35.props.Network.networkInterface;
                v19(l_networkInterface_0, l_AssetInfo_0.Asset.Id):andThen(function(v40)
                    if v40 then
                        v35.props.purchaseAsset(l_networkInterface_0, l_AssetInfo_0.Asset.Id, l_AssetInfo_0.Product.ProductId, 0, 3, nil, {
                            currencyCode = "USD",
                            quantity = {
                                significand = 0,
                                exponent = 0
                            }
                        });
                        v12.onAudioAssetGrantedToUserInventoryEvent(l_AssetInfo_0.Asset.Id);
                    end;
                end):await();
            end;
            v35.props.InsertAsset(false);
        end;
    end;
    v35.searchBy = function(v41)
        v35.props.searchWithOptions(v35.props.Network.networkInterface, v35.props.Settings:get("Plugin"), {
            Creator = v35.props.creator,
            AudioSearch = v35.props.audioSearchInfo,
            AdditionalAudioSearch = v5.join(v36.additionalAudioSearchInfo, v41)
        });
    end;
    v35.onSearchByCreator = function()
        local l_props_0 = v35.props;
        l_props_0.searchWithOptions(l_props_0.Network.networkInterface, l_props_0.Settings:get("Plugin"), {
            Creator = if not l_props_0.AssetInfo.Creator then nil else l_props_0.AssetInfo.Creator.Name
        });
    end;
    v35.onSearchByArtist = function()
        v35.searchBy({
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.ARTIST] = v35.props.AssetInfo.AudioDetails.Artist
        });
    end;
    v35.onSearchByGenre = function()
        v35.searchBy({
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.GENRE] = v35.props.AssetInfo.AudioDetails.MusicGenre
        });
    end;
    v35.onSearchByCategories = function()
        local l_AudioDetails_0 = v35.props.AssetInfo.AudioDetails;
        local v44 = {};
        if l_AudioDetails_0.SoundEffectCategory then
            table.insert(v44, l_AudioDetails_0.SoundEffectCategory);
            if l_AudioDetails_0.SoundEffectSubcategory then
                table.insert(v44, l_AudioDetails_0.SoundEffectSubcategory);
            end;
        end;
        v35.searchBy({
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.CATEGORIES] = v44
        });
    end;
    v35.onSearchByAlbum = function()
        local l_AudioDetails_1 = v35.props.AssetInfo.AudioDetails;
        v35.searchBy({
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.ARTIST] = l_AudioDetails_1.Artist,
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.ALBUM] = l_AudioDetails_1.MusicAlbum
        });
    end;
    v35.onSearchByTags = function()
        local l_AudioDetails_2 = v35.props.AssetInfo.AudioDetails;
        if l_AudioDetails_2 then
            if not l_AudioDetails_2.SoundEffectCategory then
                v35.onSearchByGenre();
            else
                v35.onSearchByCategories();
                return ;
            end;
        end;
    end;
    v35.onAssetPreviewButtonClicked = function()
        local l_AssetInfo_1 = v35.props.AssetInfo;
        v35.stopPlaying();
        v35.props.OnAssetPreviewButtonClicked(l_AssetInfo_1);
    end;
    v35.onHoverChanged = function(v48)
        v35:setState(function(_)
            return {
                isHovered = v48
            };
        end);
    end;
    v35.isCapitalizedIgnoreLocale = function(v50)
        if not (v50 ~= nil) or string.len(v50) == 0 then
            return false;
        else
            local v51 = string.sub(v50 or "", 1, 1);
            return v51 == string.upper(v51);
        end;
    end;
    v35.getTags = function(v52)
        local l_Localization_0 = v35.props.Localization;
        if not v27() then
            if v52.Type == v24.MUSIC.name then
                if not v52.MusicGenre then
                    return "---";
                else
                    return (l_Localization_0:getText("Audio.Music.Genre", v52.MusicGenre));
                end;
            elseif v52.Type == v24.SOUND_EFFECTS.name then
                local l_SoundEffectCategory_0 = v52.SoundEffectCategory;
                local l_SoundEffectSubcategory_0 = v52.SoundEffectSubcategory;
                local v56 = not l_SoundEffectCategory_0 and "---" or l_Localization_0:getText("Audio.SoundEffect.Category", l_SoundEffectCategory_0);
                if l_SoundEffectSubcategory_0 then
                    v56 = v56 .. " - " .. l_Localization_0:getText("Audio.SoundEffect.Category", l_SoundEffectSubcategory_0);
                end;
                return v56;
            else
                return nil;
            end;
        else
            local v57 = nil;
            local v58 = nil;
            if not (v52.SoundEffectCategory ~= nil) or v35.isCapitalizedIgnoreLocale(v52.SoundEffectCategory) then
                if not (not (v52.MusicGenre ~= nil) or v35.isCapitalizedIgnoreLocale(v52.MusicGenre)) then
                    v57 = l_Localization_0:getText("Audio.Music.Genre", v52.MusicGenre);
                end;
            else
                v57 = l_Localization_0:getText("Audio.SoundEffect.Category", v52.SoundEffectCategory);
                if not (not (v52.SoundEffectSubcategory ~= nil) or not v35.isCapitalizedIgnoreLocale(v52.SoundEffectSubcategory)) then
                    v58 = l_Localization_0:getText("Audio.SoundEffect.Category", v52.SoundEffectSubcategory);
                end;
            end;
            local v59 = nil;
            if v57 then
                v59 = v57;
                if v58 then
                    v59 = v59 .. " - " .. v58;
                end;
            end;
            return v59;
        end;
    end;
    v35.getColumns = function()
        local l_props_1 = v35.props;
        local l_Asset_0 = l_props_1.AssetInfo.Asset;
        local v62 = audioDetailsWithDefaults(l_props_1.AssetInfo.AudioDetails);
        local v63 = v25(v62.Type, l_props_1.width or 0);
        local l_Creator_0 = l_props_1.AssetInfo.Creator;
        local v65 = "---";
        local v66 = nil;
        if not v28() then
            v65 = if not not l_Creator_0 and l_Creator_0.Name then l_Creator_0.Name else "---";
            v66 = if v65 ~= "---" then v35.onSearchByCreator else nil;
        else
            local v67 = if not l_props_1.AssetInfo.AudioDetails then nil else l_props_1.AssetInfo.AudioDetails.Artist;
            if v67 and string.len(v67) > 0 then
                v65 = v67;
                v66 = v35.onSearchByArtist;
            elseif not (not l_Creator_0 or not l_Creator_0.Name) then
                v65 = l_Creator_0.Name;
                v66 = v35.onSearchByCreator;
            end;
        end;
        return {
            {
                DevLabel = "Creator",
                OnClick = v66,
                Size = v63[v9.AUDIO_ROW.COLUMNS.CREATOR],
                Text = v65
            },
            {
                DevLabel = "Tags",
                OnClick = v35.onSearchByTags,
                Size = v63[v9.AUDIO_ROW.COLUMNS.TAGS],
                Text = v35.getTags(v62)
            },
            {
                DevLabel = "Duration",
                Padding = {
                    Left = if not v26() then v9.AUDIO_ROW.LEFT_RIGHT_PADDING else v9.ITEM_ROW.LEFT_RIGHT_PADDING
                },
                OnClick = nil,
                Size = v63[v9.AUDIO_ROW.COLUMNS.LENGTH],
                Text = secondsToMinuteString(l_Asset_0.Duration)
            }
        };
    end;
    v35.renderIcon = function()
        local l_props_2 = v35.props;
        local l_state_0 = v35.state;
        local l_IsExpanded_0 = l_props_2.IsExpanded;
        local l_itemRow_0 = l_props_2.Stylizer.itemRow;
        local l_isHovered_0 = l_state_0.isHovered;
        local l_isPlayButtonHovered_0 = l_state_0.isPlayButtonHovered;
        local l_isPlaying_0 = l_state_0.isPlaying;
        local v75 = audioDetailsWithDefaults(l_props_2.AssetInfo.AudioDetails).Type == v24.SOUND_EFFECTS.name;
        local v76 = {
            Size = UDim2.new(0, v9.AUDIO_ROW.ICON_SIZE, 0, v9.AUDIO_ROW.ICON_SIZE),
            [v2.Event.MouseEnter] = v35.onPlayButtonMouseEnter,
            [v2.Event.MouseLeave] = v35.onPlayButtonMouseLeave
        };
        return v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.new(0, v9.AUDIO_ROW.ICON_SIZE + if not v26() then v9.AUDIO_ROW.LEFT_RIGHT_PADDING * 2 else v9.ITEM_ROW.LEFT_RIGHT_PADDING * 2, 1, 0)
        }, {
            Button = v2.createElement("ImageButton", if (l_IsExpanded_0 or l_isHovered_0) or l_isPlaying_0 then v5.join(v76, {
                BackgroundColor3 = if l_isPlaying_0 or l_isPlayButtonHovered_0 then l_itemRow_0.pauseButtonColor else l_itemRow_0.playButtonColor,
                BackgroundTransparency = 0,
                Image = if not l_isPlaying_0 then v22.AUDIO_PREVIEW_PLAY else v22.AUDIO_PREVIEW_PAUSE,
                [v2.Event.MouseButton1Click] = v35.toggleIsPlayer
            }) else v5.join(v76, {
                BackgroundTransparency = 1,
                ImageColor3 = l_itemRow_0.primaryIconColor,
                Image = if not v75 then v22.MUSIC_ICON else v22.SOUND_EFFECT_ICON
            }), {
                UICorner = v2.createElement("UICorner", {
                    CornerRadius = UDim.new(0, 15)
                }),
                HoverArea = v2.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand"
                })
            })
        });
    end;
    v35.renderExpandedContent = function()
        local l_props_3 = v35.props;
        return v2.createElement(v21, {
            AudioDetails = audioDetailsWithDefaults(l_props_3.AssetInfo.AudioDetails),
            AssetInfo = l_props_3.AssetInfo,
            IsPlaying = v35.state.isPlaying,
            OnAssetPreviewButtonClicked = v35.onAssetPreviewButtonClicked,
            OnAudioEnd = v35.stopPlaying,
            OnInsertClicked = v35.onClick
        });
    end;
end;
v30.didUpdate = function(v78, v79, v80)
    local l_state_1 = v78.state;
    local l_props_4 = v78.props;
    if not ((not l_state_1.isPlaying or v80.isPlaying) or l_props_4.IsExpanded) then
        v78:toggleIsExpanded();
    end;
    if not ((l_props_4.IsExpanded or not v79.IsExpanded) or not l_state_1.isPlaying) then
        v78:toggleIsPlayer();
    end;
end;
v30.render = function(v83)
    local l_props_5 = v83.props;
    local _ = v83.state;
    local _ = l_props_5.AssetInfo.Asset;
    local v87 = audioDetailsWithDefaults(l_props_5.AssetInfo.AudioDetails);
    if not (l_props_5.AssetInfo.Creator and l_props_5.AssetInfo.Creator.Name) then
        local _ = "---";
    end;
    return v20.Generator({
        Columns = v83.getColumns(),
        ExpandedHeight = v9.AUDIO_ROW.EXPANDED_ROW_HEIGHT,
        OnHoverChanged = v83.onHoverChanged,
        RenderExpandedContent = v83.renderExpandedContent,
        RenderIcon = v83.renderIcon,
        TitleSize = v25(v87.Type, l_props_5.width or 0)[v9.AUDIO_ROW.COLUMNS.TITLE],
        AssetInfo = l_props_5.AssetInfo,
        CanInsertAsset = l_props_5.CanInsertAsset,
        InsertAsset = l_props_5.InsertAsset,
        IsExpanded = l_props_5.IsExpanded,
        LayoutOrder = l_props_5.LayoutOrder,
        LogImpression = l_props_5.LogImpression,
        OnExpanded = l_props_5.OnExpanded,
        OnAssetPreviewButtonClicked = l_props_5.OnAssetPreviewButtonClicked,
        ParentAbsoluteSize = l_props_5.ParentAbsoluteSize,
        TryOpenAssetConfig = l_props_5.TryOpenAssetConfig
    });
end;
v30 = l_withAbsoluteSizeAndPosition_0((v3.connect(function(v89, _)
    return {
        additionalAudioSearchInfo = v89.pageInfo and v89.pageInfo.additionalAudioSearchInfo,
        audioSearchInfo = v89.pageInfo and v89.pageInfo.audioSearchInfo,
        creator = v89.pageInfo and v89.pageInfo.creator
    };
end, function(v91)
    return {
        searchWithOptions = function(v92, v93, v94)
            v91(v15(v92, v93, v94));
        end,
        purchaseAsset = function(v95, v96, v97, v98, v99, v100, v101)
            v91(v18(v95, v96, v97, v98, v99, v100, v101));
        end
    };
end)((l_withContext_0({
    AssetAnalytics = v14,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Plugin = l_ContextServices_0.Plugin,
    Settings = v16,
    Network = v17
})(v30)))));
TypedAudioRow = function(v102, v103)
    return v2.createElement(v30, v102, v103);
end;
return {
    Component = v30,
    Generator = TypedAudioRow
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local _ = require(l_Packages_0.Framework);
local v4 = require(l_Packages_0.Dash);
local v5 = require(l_script_FirstAncestor_0.Core.Types.Category);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local v7 = require(script.Parent.AudioRow);
local v8 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v9 = v2.PureComponent:extend("AudioRowWrapper");
local v10 = {
    Asset = {
        Id = 142376088,
        Name = "Cascaded Drumming",
        AssetGenres = nil,
        TypeId = 10,
        IsEndorsed = false,
        Description = "High hat with various percussion sounds. Loud crashes.",
        Duration = "128",
        HasScripts = false
    },
    AudioDetails = {
        Artist = "OnlyTwentyCharacters",
        Type = v5.SOUND_EFFECTS.name,
        SoundEffectCategory = "instruments",
        SoundEffectSubcategory = "Drum"
    },
    Creator = {
        Id = 1,
        Name = "Rolbox",
        Type = "User"
    }
};
local v11 = {
    Asset = {
        Id = 142376088,
        Name = "Cascaded Drumming",
        AssetGenres = nil,
        TypeId = 10,
        IsEndorsed = false,
        Description = "High hat with various percussion sounds. Loud crashes.",
        Duration = "508",
        HasScripts = false
    },
    AudioDetails = {
        Type = v5.MUSIC.name,
        MusicGenre = "rock",
        Artist = "Artist",
        MusicAlbum = "asdf"
    },
    Creator = {
        Id = 1,
        Name = "Rolbox",
        Type = "User"
    }
};
local v12 = {
    Asset = {
        Id = 142376088,
        Name = "Cascaded Drumming",
        AssetGenres = nil,
        TypeId = 10,
        IsEndorsed = false,
        Description = "High hat with various percussion sounds. Loud crashes.",
        HasScripts = false
    }
};
local v13 = {
    Asset = {
        Id = 142376088,
        Name = "Cascaded Drumming",
        AssetGenres = nil,
        TypeId = 10,
        IsEndorsed = false,
        Description = "",
        HasScripts = false
    },
    AudioDetails = {
        Type = v5.MUSIC.name
    }
};
local v14 = {
    Asset = {
        Id = 142376088,
        Name = "Cascaded Drumming",
        AssetGenres = nil,
        TypeId = 10,
        IsEndorsed = false,
        Description = "",
        HasScripts = false
    },
    AudioDetails = {
        Type = v5.SOUND_EFFECTS.name
    }
};
v9.init = function(v15)
    v15.state = {
        expandedAssetId = nil
    };
    v15.toggleIsExpanded = function(v16)
        v15:setState(function(v17)
            return {
                expandedAssetId = if v16 == v17.expandedAssetId then v2.None else v16
            };
        end);
    end;
end;
v9.render = function(v18)
    return v2.createFragment({
        Player = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 116),
            BackgroundTransparency = 1
        }, {
            Player = v7.Generator(v4.join(v18.props, {
                LayoutOrder = 1,
                IsExpanded = v18.props.AssetInfo.Asset.Id == v18.state.expandedAssetId,
                OnExpanded = v18.toggleIsExpanded,
                ParentAbsoluteSize = UDim2.fromOffset(500, 500),
                CanInsertAsset = function()
                    return true;
                end,
                InsertAsset = function()
                    print("Insert Asset");
                end
            }))
        })
    });
end;
return {
    summary = "Audio Row",
    stories = {
        {
            name = "Soundeffect Odd",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v10,
                        LayoutOrder = 1
                    })
                });
            end
        },
        {
            name = "Soundeffect Even",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v10,
                        LayoutOrder = 2
                    })
                });
            end
        },
        {
            name = "Music Odd",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v11,
                        LayoutOrder = 1
                    })
                });
            end
        },
        {
            name = "Music Even",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v11,
                        LayoutOrder = 2
                    })
                });
            end
        },
        {
            name = "Empty Music",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v13,
                        LayoutOrder = 2
                    })
                });
            end
        },
        {
            name = "Empty SoundEffect",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v14,
                        LayoutOrder = 2
                    })
                });
            end
        },
        {
            name = "Uncategorized",
            story = function()
                return v2.createElement(v8, {}, {
                    AudioRow = v2.createElement(v9, {
                        AssetInfo = v12,
                        LayoutOrder = 2
                    })
                });
            end
        }
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local v5 = require(l_Packages_0.Dash);
local l_Pane_0 = v4.UI.Pane;
local l_TextLabel_0 = v4.UI.TextLabel;
local l_Util_0 = l_script_FirstAncestor_0.Core.Util;
local v9 = require(l_Util_0.Constants);
local v10 = require(l_Util_0.LayoutOrderIterator);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v13 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v14 = require(l_script_FirstAncestor_0.Core.ContextServices.Settings);
local v15 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v16 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioPlayer);
local v17 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioRowInsertButton);
local v18 = require(l_script_FirstAncestor_0.Core.Components.ItemRow.ItemRowMetadata);
local v19 = require(l_script_FirstAncestor_0.Core.Components.Asset.Preview.PopUpWrapperButton);
local v20 = require(l_script_FirstAncestor_0.Core.Networking.Requests.SearchWithOptions);
local v21 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxRefactorAudioConstantsForItemRow);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local v23 = v2.PureComponent:extend("AudioRowExpandedContent");
v23.defaultProps = {
    Size = UDim2.new(1, 0, 0, 26)
};
v23.init = function(v24)
    v24.searchBy = function(v25)
        local l_props_0 = v24.props;
        v24.props.searchWithOptions(l_props_0.Network.networkInterface, l_props_0.Settings:get("Plugin"), {
            Creator = l_props_0.creator,
            AudioSearch = l_props_0.audioSearchInfo,
            AdditionalAudioSearch = v5.join(l_props_0.additionalAudioSearchInfo, v25)
        });
    end;
    v24.onSearchByCategories = function()
        local l_AudioDetails_0 = v24.props.AssetInfo.AudioDetails;
        local v28 = {};
        if l_AudioDetails_0.SoundEffectCategory then
            table.insert(v28, l_AudioDetails_0.SoundEffectCategory);
            if l_AudioDetails_0.SoundEffectSubcategory then
                table.insert(v28, l_AudioDetails_0.SoundEffectSubcategory);
            end;
        end;
        v24.searchBy({
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.CATEGORIES] = v28
        });
    end;
    v24.onSearchByAlbum = function()
        local l_AudioDetails_1 = v24.props.AssetInfo.AudioDetails;
        v24.searchBy({
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.ARTIST] = l_AudioDetails_1.Artist,
            [v9.ADDITIONAL_AUDIO_SEARCH_KEYS.ALBUM] = l_AudioDetails_1.MusicAlbum
        });
    end;
    v24.onSearchByCreator = function()
        local l_props_1 = v24.props;
        l_props_1.searchWithOptions(l_props_1.Network.networkInterface, l_props_1.Settings:get("Plugin"), {
            Creator = if not l_props_1.AssetInfo.Creator then nil else l_props_1.AssetInfo.Creator.Name,
            AudioSearch = l_props_1.audioSearchInfo,
            AdditionalAudioSearch = l_props_1.additionalAudioSearchInfo
        });
    end;
end;
v23.render = function(v31)
    local l_props_2 = v31.props;
    local l_Localization_0 = l_props_2.Localization;
    local l_itemRow_0 = l_props_2.Stylizer.itemRow;
    local l_AudioDetails_2 = l_props_2.AudioDetails;
    local v36 = not l_props_2.AssetInfo.Creator and "---" or l_props_2.AssetInfo.Creator.Name;
    local l_IsPlaying_0 = l_props_2.IsPlaying;
    local l_Asset_0 = l_props_2.AssetInfo.Asset;
    local l_Id_0 = l_Asset_0.Id;
    local v40 = l_Asset_0.Description or "---";
    local l_SoundEffectCategory_0 = l_AudioDetails_2.SoundEffectCategory;
    local l_Type_0 = l_AudioDetails_2.Type;
    local v43 = l_Type_0 == v15.SOUND_EFFECTS.name;
    local v44 = l_Type_0 == v15.MUSIC.name;
    local l_Artist_0 = l_AudioDetails_2.Artist;
    local l_MusicAlbum_0 = l_AudioDetails_2.MusicAlbum;
    local v47 = "";
    if l_Artist_0 ~= "---" then
        v47 = l_Artist_0;
    end;
    if l_MusicAlbum_0 ~= "---" then
        if v47 ~= "" then
            v47 = v47 .. " - ";
        end;
        v47 = v47 .. l_MusicAlbum_0;
    end;
    local v48 = v10.new();
    return v2.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_2.LayoutOrder,
        Size = l_props_2.Size
    }, {
        AudioPlayerFrame = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            Layout = Enum.FillDirection.Horizontal,
            LayoutOrder = v48:getNextOrder(),
            Padding = {
                Left = 4,
                Right = if not v21() then v9.AUDIO_ROW.LEFT_RIGHT_PADDING else v9.ITEM_ROW.LEFT_RIGHT_PADDING
            },
            Size = UDim2.new(1, 0, 0, 26),
            VerticalAlignment = Enum.VerticalAlignment.Center
        }, {
            AudioPlayer = v2.createElement(v16, {
                SoundId = l_Id_0,
                IsPlaying = l_IsPlaying_0,
                OnEnd = l_props_2.OnAudioEnd
            })
        }),
        AdditionalMusicDetails = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = v48:getNextOrder(),
            Padding = {
                Left = 10,
                Right = 10
            }
        }, {
            DescriptionContainer = v2.createElement(l_Pane_0, {
                Layout = Enum.FillDirection.Horizontal,
                LayoutOrder = v48:getNextOrder(),
                Spacing = 10,
                Size = UDim2.new(1, 0, 0, 26)
            }, {
                Description = v2.createElement(l_TextLabel_0, {
                    LayoutOrder = v48:getNextOrder(),
                    Size = UDim2.new(1, -80, 1, 0),
                    Text = v40,
                    TextColor = l_itemRow_0.textColor,
                    TextSize = v9.FONT_SIZE_MEDIUM,
                    TextWrapped = true,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Center,
                    TextTruncate = Enum.TextTruncate.AtEnd
                }),
                AssetPreview = v2.createElement(l_Pane_0, {
                    Layout = Enum.FillDirection.Vertical,
                    LayoutOrder = v48:getNextOrder(),
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    Size = UDim2.new(0, 26, 0, 26),
                    VerticalAlignment = Enum.VerticalAlignment.Center
                }, {
                    PopUpWrapperButton = v2.createElement(v19, {
                        HoverSize = UDim2.new(0, 26, 0, 26),
                        onClick = l_props_2.OnAssetPreviewButtonClicked,
                        ShowIcon = true,
                        Size = UDim2.new(0, 20, 0, 20)
                    })
                }),
                Insert = v2.createElement(v17, {
                    LayoutOrder = v48:getNextOrder(),
                    OnClick = l_props_2.OnInsertClicked
                })
            }),
            AlbumContainer = v2.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Horizontal,
                LayoutOrder = v48:getNextOrder(),
                Spacing = 10,
                Padding = {
                    Left = 5,
                    Right = 5
                },
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                AlbumArist = if not v44 then nil else v2.createElement(v18, {
                    LayoutOrder = v48:getNextOrder(),
                    HeaderText = l_Localization_0:getText("AudioView", "AlbumArtist"):upper(),
                    Size = UDim2.new(0.5, 0, 1, 0),
                    Text = v47,
                    OnClick = v31.onSearchByAlbum
                }),
                Category = if not v43 then nil else v2.createElement(v18, {
                    LayoutOrder = v48:getNextOrder(),
                    HeaderText = l_Localization_0:getText("AudioView", "Category"):upper(),
                    Size = UDim2.new(0.5, 0, 1, 0),
                    Text = l_SoundEffectCategory_0,
                    OnClick = v31.onSearchByCategories
                }),
                UploadBy = v2.createElement(v18, {
                    LayoutOrder = v48:getNextOrder(),
                    HeaderText = l_Localization_0:getText("AudioView", "UploadedBy"):upper(),
                    Size = UDim2.new(0.5, 0, 1, 0),
                    Text = v36,
                    OnClick = v31.onSearchByCreator
                })
            })
        })
    });
end;
return (v3.connect(function(v49, _)
    return {
        additionalAudioSearchInfo = v49.pageInfo and v49.pageInfo.additionalAudioSearchInfo,
        audioSearchInfo = v49.pageInfo and v49.pageInfo.audioSearchInfo,
        creator = v49.pageInfo and v49.pageInfo.creator
    };
end, function(v51)
    return {
        searchWithOptions = function(v52, v53, v54)
            v51(v20(v52, v53, v54));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Network = v13,
    Settings = v14,
    Stylizer = l_ContextServices_0.Stylizer
})(v23))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(script.Parent.AudioRowExpandedContent);
local v2 = require(l_script_FirstAncestor_0.TestUtils.MockItems);
local v3 = require(l_script_FirstAncestor_0.Packages.Roact);
local v4 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v5 = v2.getSimpleAudioAsset(11322590111, "Roboto");
return {
    name = "AudioRowExpandedContent",
    summary = "Expanded content component used in the AudioRow",
    story = function()
        return v3.createElement(v4, {}, {
            Frame = v3.createElement("Frame", {
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                List = v3.createElement(v1, {
                    AudioDetails = v5.AudioDetails,
                    AssetInfo = v5,
                    IsPlaying = false,
                    OnAssetPreviewButtonClicked = function()
                        print("OnAssetPreviewButtonClicked");
                    end,
                    OnAudioEnd = function()
                        print("Audio End");
                    end,
                    OnInsertClicked = function()
                        print("Insert Asset");
                    end
                }),
                Padding = v3.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 10),
                    PaddingBottom = UDim.new(0, 10),
                    PaddingLeft = UDim.new(0, 10),
                    PaddingRight = UDim.new(0, 10)
                })
            })
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = v2.PureComponent:extend("AudioRowInsertButtonMetadata");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_OnClick_0 = l_props_0.OnClick;
    local l_itemRow_0 = l_props_0.Stylizer.itemRow;
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 50, 1, 0),
        LayoutOrder = l_LayoutOrder_0,
        BackgroundTransparency = 1
    }, {
        Layout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Center
        }),
        Button = v2.createElement("TextButton", {
            TextColor3 = l_itemRow_0.insertButtonTextColor,
            Font = v4.FONT,
            TextSize = 15,
            Text = l_Localization_0:getText("Common", "Insert"),
            Size = UDim2.new(1, 0, 0, 20),
            BackgroundColor3 = l_itemRow_0.insertButtonColor,
            [v2.Event.MouseButton1Click] = l_OnClick_0
        }, {
            UICorner = v2.createElement("UICorner", {
                CornerRadius = UDim.new(0, 5)
            })
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v7));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Core.Components.AssetLogicWrapper);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local _ = v3.UI.LoadingIndicator;
local v11 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioTable);
local _ = require(l_script_FirstAncestor_0.Core.Components.StyledScrollingFrame);
local v13 = require(l_script_FirstAncestor_0.Core.Components.LoadScroller);
local v14 = v2.PureComponent:extend("AudioScroller");
v14.defaultProps = {
    Size = UDim2.new(1, 0, 1, 0),
    PageSize = 20
};
v14.init = function(v15, _)
    v15.calculateCanvasHeight = function(_)
        local _ = v15.props;
        return ((v4.AUDIO_ROW.ROW_HEIGHT * #v15.props.Assets + (not v15.props.Loading and 0 or 60)) + (not v15.props.RenderTopContent and 0 or 30)) + v4.AUDIO_ROW.EXPANDED_ROW_HEIGHT;
    end;
end;
v14.render = function(v19)
    local l_props_1 = v19.props;
    local _ = v19.state;
    return v2.createElement(v13, {
        CalculateCanvasHeight = v19.calculateCanvasHeight,
        FetchNextPage = l_props_1.FetchNextPage,
        Items = l_props_1.Assets,
        Loading = l_props_1.Loading,
        PageSize = l_props_1.PageSize,
        Position = l_props_1.Position,
        RenderContent = function()
            return v11.Generator({
                AudioType = l_props_1.AudioType,
                Assets = l_props_1.Assets,
                TryInsert = l_props_1.TryInsert,
                CanInsertAsset = l_props_1.CanInsertAsset,
                LayoutOrder = 2,
                LogImpression = l_props_1.LogImpression,
                OnAssetPreviewButtonClicked = l_props_1.OnAssetPreviewButtonClicked,
                ParentAbsoluteSize = l_props_1.ParentAbsoluteSize,
                TryOpenAssetConfig = l_props_1.TryOpenAssetConfig,
                SwimlaneName = l_props_1.SwimlaneName
            });
        end,
        RenderTopContent = l_props_1.RenderTopContent,
        Size = l_props_1.Size,
        Total = l_props_1.Total
    });
end;
v14 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v14);
TypedAudioScroller = function(v22, v23)
    return v2.createElement(v14, v22, v23);
end;
return {
    Component = v14,
    Generator = TypedAudioScroller
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local v4 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioScroller);
local _ = require(l_script_FirstAncestor_0.Core.Components.ResultsFetcher);
local v6 = require(l_script_FirstAncestor_0.Core.ContextServices.NavigationContext);
local v7 = require(l_script_FirstAncestor_0.Core.Util.Analytics.AssetAnalyticsContextItem);
local v8 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagAddMoreAudioSwimlaneAnalytics);
local l_Pane_0 = v2.UI.Pane;
local l_Stylizer_0 = v2.ContextServices.Stylizer;
return function(v11)
    local l_ResultsState_0 = v11.ResultsState;
    local l_LogAssetImpression_0 = v11.AssetLogicWrapperProps.LogAssetImpression;
    local v14 = nil;
    local v15 = nil;
    if v8() then
        v14 = v6.use();
        v15 = v7.use();
    end;
    local v16, v17 = v1.useState({
        size = Vector2.zero,
        position = Vector2.zero
    });
    local v23 = v1.useCallback(function(v18, v19, v20, v21)
        if not l_LogAssetImpression_0 then
            return nil;
        else
            local v22 = nil;
            if v8() then
                v22 = v15:get().getNavigationContext(v14:get(), v11.SwimlaneName);
            end;
            return l_LogAssetImpression_0(v18, v21, v19, v20, v16.size, v16.position, v22);
        end;
    end, {
        l_LogAssetImpression_0,
        v16
    });
    local v25 = v1.useCallback(function(v24)
        v17({
            size = v24.AbsoluteSize,
            position = v24.AbsolutePosition
        });
    end, {});
    return v1.createElement(l_Pane_0, {
        BackgroundColor = l_Stylizer_0:use().backgroundColor,
        [v1.Change.AbsoluteSize] = v25,
        [v1.Change.AbsolutePosition] = v25
    }, {
        AudioScroller = v4.Generator({
            Assets = l_ResultsState_0.assets,
            RenderTopContent = v11.RenderTopContent,
            PageSize = v11.PageSize,
            FetchNextPage = l_ResultsState_0.fetchNextPage,
            Loading = l_ResultsState_0.loading,
            ParentAbsoluteSize = v16.size,
            ParentAbsolutePosition = v16.position,
            CanInsertAsset = v11.AssetLogicWrapperProps.CanInsertAsset,
            LogImpression = v23,
            OnAssetPreviewButtonClicked = v11.AssetLogicWrapperProps.OnAssetPreviewButtonClicked,
            TryInsert = v11.AssetLogicWrapperProps.TryInsert,
            TryOpenAssetConfig = v11.AssetLogicWrapperProps.TryOpenAssetConfig,
            SwimlaneName = v11.SwimlaneName
        })
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Parent_0.Core.Util.Constants);
local v4 = require(l_Parent_0.Core.Components.SearchOptions.TimeTextBox);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_RangeSlider_0 = require(l_Packages_0.Framework).UI.RangeSlider;
local _ = require(l_Packages_0.Framework).Util;
local l_MAX_AUDIO_SEARCH_DURATION_0 = v3.MAX_AUDIO_SEARCH_DURATION;
local l_MIN_AUDIO_SEARCH_DURATION_0 = v3.MIN_AUDIO_SEARCH_DURATION;
local v11 = Vector2.new(80, 32);
local v12 = Vector2.new(6, 12);
local v13 = v2.PureComponent:extend("AudioSearch");
v13.init = function(v14, _)
    v14.onMinDurationChange = function(v16)
        if v16 ~= v14.props.minDuration then
            v14.props.onDurationChange(v16, v14.props.maxDuration);
        end;
    end;
    v14.onMaxDurationChange = function(v17)
        if v17 ~= v14.props.maxDuration then
            v14.props.onDurationChange(v14.props.minDuration, v17);
        end;
    end;
    v14.onSliderChange = function(v18, v19)
        v14.props.onDurationChange(v18, (math.max(1, v19)));
    end;
end;
v13.render = function(v20)
    local l_props_0 = v20.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_minDuration_0 = l_props_0.minDuration;
    local l_maxDuration_0 = l_props_0.maxDuration;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        AutomaticSize = Enum.AutomaticSize.Y,
        Size = UDim2.fromScale(1, 0)
    }, {
        Layout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = UDim.new(0, v12.Y)
        }),
        AudioDuration = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            Size = UDim2.new(1, 0, 0, v11.Y)
        }, {
            UIListLayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Padding = UDim.new(0, v12.X),
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Center
            }),
            MinTextBox = v2.createElement(v4, {
                currentValue = l_minDuration_0,
                defaultValue = 0,
                layoutOrder = 1,
                max = l_maxDuration_0,
                min = 0,
                onDurationChange = v20.onMinDurationChange,
                size = UDim2.new(0, v11.X, 0, v11.Y)
            }),
            ToLabel = v2.createElement("TextLabel", {
                BackgroundTransparency = 1,
                LayoutOrder = 2,
                Size = UDim2.new(0, 20, 1, 0),
                Text = l_props_0.Localization:getText("General", "SearchOptionAudioTo"),
                TextColor3 = l_Stylizer_0.searchOptions.audioSearch.textColor
            }),
            MaxTextBox = v2.createElement(v4, {
                currentValue = l_maxDuration_0,
                defaultValue = l_MAX_AUDIO_SEARCH_DURATION_0,
                layoutOrder = 3,
                max = l_MAX_AUDIO_SEARCH_DURATION_0,
                min = l_minDuration_0,
                onDurationChange = v20.onMaxDurationChange,
                size = UDim2.new(0, v11.X, 0, v11.Y)
            })
        }),
        RangeSlider = v2.createElement(l_RangeSlider_0, {
            LayoutOrder = 2,
            LowerRangeValue = l_minDuration_0,
            UpperRangeValue = l_maxDuration_0,
            Min = l_MIN_AUDIO_SEARCH_DURATION_0,
            Max = l_MAX_AUDIO_SEARCH_DURATION_0,
            OnValuesChanged = v20.onSliderChange,
            Size = UDim2.new(1, 0, 0, 20),
            SnapIncrement = 1
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v13));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Core.Components.Categorization.SectionHeader);
local v5 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioTable);
local v6 = require(l_script_FirstAncestor_0.Core.Components.NoSceneSuggestions);
local _ = require(l_script_FirstAncestor_0.Core.Types.AudioTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local v9 = require(l_script_FirstAncestor_0.Core.Util.LayoutOrderIterator);
local v10 = require(l_script_FirstAncestor_0.Core.ContextServices.NavigationContext);
local v11 = require(l_script_FirstAncestor_0.Core.Util.Analytics.AssetAnalyticsContextItem);
local v12 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagAddMoreAudioSwimlaneAnalytics);
local l_Stylizer_0 = v2.ContextServices.Stylizer;
local l_LoadingIndicator_0 = v2.UI.LoadingIndicator;
local l_Pane_0 = v2.UI.Pane;
return function(v16)
    local v17 = v9.new();
    local l_ResultsState_0 = v16.AudioSection.ResultsState;
    local l_name_0 = v16.AudioSection.Section.name;
    local v20 = l_Stylizer_0:use();
    local l_LogAssetImpression_0 = v16.AssetLogicWrapperProps.LogAssetImpression;
    local v22 = v1.useRef(nil);
    local v23 = nil;
    local v24 = nil;
    if v12() then
        v23 = v10.use();
        v24 = v11.use();
    end;
    local v30 = v1.useCallback(function(v25, v26, v27, v28)
        if not l_LogAssetImpression_0 or not v22.current then
            return nil;
        else
            local v29 = nil;
            if v12() then
                v29 = v24:get().getNavigationContext(v23:get(), l_name_0);
            end;
            return l_LogAssetImpression_0(v25, v28, v26, v27, v22.current.AbsoluteSize, v22.current.AbsolutePosition, v29);
        end;
    end, {
        l_LogAssetImpression_0
    });
    local v31 = {
        Header = v1.createElement(v4, {
            LayoutOrder = v17:getNextOrder(),
            Title = v16.AudioSection.Section.displayName,
            OnClickSeeAll = v16.OnSeeAllActivated
        })
    };
    if not l_ResultsState_0 or l_ResultsState_0.loading then
        v31.Loading = v1.createElement(l_LoadingIndicator_0, {
            LayoutOrder = v17:getNextOrder()
        });
    elseif #l_ResultsState_0.assets > 0 then
        v31.AudioTable = v5.Generator({
            LayoutOrder = v17:getNextOrder(),
            Assets = l_ResultsState_0.assets,
            LogImpression = v30,
            CanInsertAsset = v16.AssetLogicWrapperProps.CanInsertAsset,
            OnAssetPreviewButtonClicked = v16.AssetLogicWrapperProps.OnAssetPreviewButtonClicked,
            TryInsert = v16.AssetLogicWrapperProps.TryInsert,
            TryOpenAssetConfig = v16.AssetLogicWrapperProps.TryOpenAssetConfig,
            SwimlaneName = l_name_0
        });
    elseif v16.AudioSection.Section.name == v3.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then
        v31.NoSceneSuggestions = v1.createElement(v6, {
            LayoutOrder = v17:getNextOrder()
        });
    end;
    return v1.createElement(l_Pane_0, {
        LayoutOrder = v16.LayoutOrder,
        Size = UDim2.fromScale(1, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1,
        Layout = Enum.FillDirection.Vertical,
        Spacing = v20.spacingUnit,
        ref = v22
    }, v31);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Core.Util.MockWrapper);
local v3 = require(script.Parent.AudioSort);
local v4 = require(script.Parent["AudioView.mocks"]);
local function v5()
    return true;
end;
return {
    controls = {
        isLoading = false,
        isSceneSuggestions = false,
        noResults = false
    },
    story = function(v6)
        local v7 = if not v6.controls.isSceneSuggestions then v4.createMockList("Sample") else v4.createMockContextualRecommendations();
        if v7.ResultsState then
            if v6.controls.isLoading then
                v7.ResultsState.loading = true;
            end;
            if v6.controls.noResults then
                v7.ResultsState.assets = {};
            end;
        end;
        return v1.createElement(v2, {}, {
            AudioSort = v1.createElement(v3, {
                AudioSection = v7,
                AssetLogicWrapperProps = {
                    CanInsertAsset = v5,
                    LogAssetImpression = v5,
                    OnAssetPreviewButtonClicked = v5,
                    TryInsert = v5,
                    TryOpenAssetConfig = v5
                }
            })
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local _ = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local _ = require(l_script_FirstAncestor_0.Core.Thunks.GetPageInfoAnalyticsContextInfo);
local v6 = require(l_Packages_0.Dash);
local l_Util_0 = l_script_FirstAncestor_0.Core.Util;
local v8 = require(l_Util_0.LayoutOrderIterator);
local v9 = require(l_Util_0.Constants);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = require(l_script_FirstAncestor_0.Core.Components.AssetLogicWrapper);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local v15 = require(l_script_FirstAncestor_0.Core.Types.Category);
local l_UI_0 = v4.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Pane_0 = l_UI_0.Pane;
local v19 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioRow);
local v20 = require(l_script_FirstAncestor_0.Core.Components.Audio.GetAudioTableSizes);
local v21 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxRefactorAudioConstantsForItemRow);
local v22 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagAddInsertionNavData);
local v23 = v2.PureComponent:extend("AudioTable");
v23.init = function(v24, v25)
    v24.ref = v2.createRef();
    v24.state = {
        width = 0
    };
    v24.setExpandedAssetId = function(v26)
        v24:setState(function(v27)
            return {
                expandedAssetId = if v26 == v27.expandedAssetId then v2.None else v26
            };
        end);
    end;
    v24.OnAbsoluteSizeChanged = function()
        if v24.ref.current then
            v24:setState({
                width = v24.ref.current.AbsoluteSize.X
            });
        end;
    end;
    v24.createHeaderElement = function(v28, v29, v30, v31)
        local v32 = v20(v24.props.AudioType, v24.state.width);
        local l_itemRow_0 = v25.Stylizer.itemRow;
        local v34 = v32[v29];
        if not v34 then
            return nil;
        else
            local l_createElement_0 = v2.createElement;
            local l_l_TextLabel_0_0 = l_TextLabel_0;
            local v37 = {
                Font = v9.FONT,
                LayoutOrder = v30,
                Size = v34,
                Text = v28,
                TextColor = l_itemRow_0.headerTextColor,
                TextSize = v9.FONT_SIZE_SMALL,
                TextXAlignment = v31 or Enum.TextXAlignment.Left
            };
            local v38 = {};
            local v39 = false;
            if v30 ~= 1 then
                v39 = v2.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, if not v21() then v9.AUDIO_ROW.LEFT_RIGHT_PADDING else v9.ITEM_ROW.LEFT_RIGHT_PADDING)
                });
            end;
            v38.UIPadding = v39;
            return (l_createElement_0(l_l_TextLabel_0_0, v37, v38));
        end;
    end;
end;
v23.didMount = function(v40)
    v40.OnAbsoluteSizeChanged();
end;
v23.render = function(v41)
    local l_props_0 = v41.props;
    local l_state_0 = v41.state;
    local l_Localization_0 = l_props_0.Localization;
    local l_Assets_0 = l_props_0.Assets;
    local l_AudioType_0 = l_props_0.AudioType;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_LogImpression_0 = l_props_0.LogImpression;
    local l_CanInsertAsset_0 = l_props_0.CanInsertAsset;
    local l_expandedAssetId_0 = l_state_0.expandedAssetId;
    local l_width_0 = l_state_0.width;
    local _ = l_AudioType_0 == v15.SOUND_EFFECTS.name;
    local _ = l_AudioType_0 == v15.MUSIC.name;
    local v54 = v8.new();
    local v59 = v6.map(l_Assets_0, function(v55)
        local function v57(v56)
            if not v22() then
                l_props_0.TryInsert(v55, v56 or false);
                return ;
            else
                l_props_0.TryInsert(v55, v56 or false, nil, v41.props.SwimlaneName);
                return ;
            end;
        end;
        local l_Asset_0 = v55.Asset;
        if not l_Asset_0 then
            return nil;
        else
            return v19.Generator({
                key = l_Asset_0.Id,
                AssetInfo = v55,
                CanInsertAsset = l_CanInsertAsset_0,
                InsertAsset = v57,
                IsExpanded = l_Asset_0.Id == l_expandedAssetId_0,
                LayoutOrder = v54:getNextOrder() + 1,
                LogImpression = l_LogImpression_0,
                OnExpanded = v41.setExpandedAssetId,
                OnAssetPreviewButtonClicked = l_props_0.OnAssetPreviewButtonClicked,
                ParentAbsoluteSize = l_props_0.ParentAbsoluteSize,
                TryOpenAssetConfig = l_props_0.TryOpenAssetConfig,
                width = l_width_0
            });
        end;
    end);
    local v60 = v8.new();
    return v2.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, 0),
        Layout = Enum.FillDirection.Vertical,
        [v2.Ref] = v41.ref,
        [v2.Change.AbsoluteSize] = v41.OnAbsoluteSizeChanged
    }, {
        HeaderRow = v2.createElement(l_Pane_0, {
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            Size = UDim2.new(1, 0, 0, 20),
            Layout = Enum.FillDirection.Horizontal,
            Padding = if not v21() then {
                Right = v9.AUDIO_ROW.BORDER_SIZE,
                Left = v9.AUDIO_ROW.BORDER_SIZE,
                Top = v9.AUDIO_ROW.BORDER_SIZE,
                Bottom = v9.AUDIO_ROW.BORDER_SIZE
            } else v9.ITEM_ROW.BORDER_SIZE
        }, {
            Icon = v41.createHeaderElement("", v9.AUDIO_ROW.COLUMNS.ICON, v60:getNextOrder()),
            Title = v41.createHeaderElement(l_Localization_0:getText("AudioView", "Title"):upper(), v9.AUDIO_ROW.COLUMNS.TITLE, v60:getNextOrder()),
            Creator = v41.createHeaderElement(l_Localization_0:getText("AudioView", "Creator"):upper(), v9.AUDIO_ROW.COLUMNS.CREATOR, v60:getNextOrder()),
            Tags = v41.createHeaderElement(l_Localization_0:getText("AudioView", "Tags"):upper(), v9.AUDIO_ROW.COLUMNS.TAGS, v60:getNextOrder()),
            Length = v41.createHeaderElement(l_Localization_0:getText("AudioView", "Length"):upper(), v9.AUDIO_ROW.COLUMNS.LENGTH, v60:getNextOrder(), Enum.TextXAlignment.Right)
        }),
        RowsWrapper = v2.createFragment(v59)
    });
end;
v23 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v23);
TypedAudioTable = function(v61, v62)
    return v2.createElement(v23, v61, v62);
end;
return {
    Component = v23,
    Generator = TypedAudioTable
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v3 = require(script.Parent.AudioTable);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local v5 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v6 = v1.PureComponent:extend("AudioRowWrapper");
createAudioInfo = function(v7)
    return {
        Asset = {
            Id = v7,
            Name = "Cascaded Drumming",
            AssetGenres = nil,
            TypeId = 10,
            IsEndorsed = false,
            Description = "High hat with various percussion sounds. Loud crashes.",
            Duration = "128",
            HasScripts = false
        },
        AudioDetails = {
            Artist = "OnlyTwentyCharacters",
            Type = v2.SOUND_EFFECTS.name,
            SoundEffectCategory = "instruments",
            SoundEffectSubcategory = "Drum"
        },
        Creator = {
            Id = 1,
            Name = "Rolbox",
            Type = "User"
        }
    };
end;
local v8 = {};
for v9 = 1, 10 do
    table.insert(v8, createAudioInfo(v9));
end;
v6.render = function(v10)
    return v1.createElement("Frame", {
        Size = UDim2.new(1, -10, 0, 260),
        BackgroundTransparency = 1,
        Position = UDim2.new(0, 0, 0, 0)
    }, {
        AudioTable = v3.Generator({
            Assets = v8,
            AudioType = v10.props.AudioType,
            CanInsertAsset = function()
                return true;
            end,
            InsertAsset = function()
                print("Insert Asset");
            end,
            TryInsert = function()
                print("Try Insert");
            end,
            TryOpenAssetConfig = function()
                print("try open asset config");
            end,
            OnAssetPreviewButtonClicked = function()
                print("OnAssetPreviewButtonClicked");
            end,
            SwimlaneName = "test"
        })
    });
end;
return {
    summary = "Audio Table",
    stories = {
        {
            name = "Soundeffect",
            story = function()
                return v1.createElement(v5, {}, {
                    AudioTableWrapper = v1.createElement(v6, {
                        AudioType = v2.SOUND_EFFECTS.name
                    })
                });
            end
        },
        {
            name = "Music",
            story = function()
                return v1.createElement(v5, {}, {
                    AudioTableWrapper = v1.createElement(v6, {
                        AudioType = v2.MUSIC.name
                    })
                });
            end
        },
        {
            name = "Uncategorized",
            story = function()
                return v1.createElement(v5, {}, {
                    AudioTableWrapper = v1.createElement(v6)
                });
            end
        }
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local l_Util_0 = l_script_FirstAncestor_0.Core.Util;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Util_0.Constants);
local v8 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v9 = require(l_script_FirstAncestor_0.Core.Util.Images);
local v10 = v2.PureComponent:extend("AudioTabs");
v10.init = function(v11, _)
    v11.state = {};
end;
v10.render = function(v13)
    local l_props_0 = v13.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_OnTabSelect_0 = l_props_0.OnTabSelect;
    local l_SelectedTab_0 = l_props_0.SelectedTab;
    local l_audioTabs_0 = l_props_0.Stylizer.audioTabs;
    local function v23(v19, v20, v21)
        local l_name_0 = v19.name;
        return v2.createElement("ImageButton", {
            Size = UDim2.new(0.5, 0, 1, 0),
            LayoutOrder = v21,
            BackgroundColor3 = if l_SelectedTab_0 == l_name_0 then l_audioTabs_0.selectedButtonColor else l_audioTabs_0.backgroundButtonColor,
            [v2.Event.MouseButton1Click] = function()
                l_OnTabSelect_0(l_name_0);
            end
        }, {
            Layout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                Padding = UDim.new(0, 5)
            }),
            UICorner = v2.createElement("UICorner", {
                CornerRadius = UDim.new(0, 5)
            }),
            Icon = v2.createElement("Frame", {
                Size = UDim2.new(0, 20, 0, 20),
                LayoutOrder = 1,
                BackgroundTransparency = 1
            }, {
                v2.createElement("ImageLabel", {
                    Image = v20,
                    BackgroundTransparency = 1,
                    Size = UDim2.new(0, 20, 0, 20),
                    LayoutOrder = 1,
                    ImageColor3 = if l_SelectedTab_0 == l_name_0 then l_audioTabs_0.selectedTextColor else l_audioTabs_0.textColor
                })
            }),
            Text = v2.createElement("TextLabel", {
                BackgroundTransparency = 1,
                LayoutOrder = 2,
                Text = l_Localization_0:getText("Audio", l_name_0),
                AutomaticSize = Enum.AutomaticSize.X,
                Font = v7.FONT,
                TextSize = v7.FONT_SIZE_MEDIUM,
                TextColor3 = if l_SelectedTab_0 == l_name_0 then l_audioTabs_0.selectedTextColor else l_audioTabs_0.textColor
            })
        });
    end;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        Layout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            HorizontalAlignment = Enum.HorizontalAlignment.Center
        }),
        SoundEffectTab = v23(v8.SOUND_EFFECTS, v9.SOUND_EFFECT_ICON, 1),
        MusicTab = v23(v8.MUSIC, v9.MUSIC_ICON, 2)
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization
})(v10));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(script.Parent.AudioTabs);
local v3 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v4 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v5 = v1.PureComponent:extend("AudioTabsStroyWrapper");
v5.init = function(v6)
    v6.state = {
        selectedTab = v4.SOUND_EFFECTS.name
    };
    v6.OnTabSelect = function(v7)
        v6:setState({
            selectedTab = v7
        });
    end;
end;
v5.render = function(v8)
    return v1.createElement("Frame", {
        Size = UDim2.new(0, 330, 0, 30),
        BackgroundTransparency = 1
    }, {
        AudioTabs = v1.createElement(v2, {
            SelectedTab = v8.state.selectedTab,
            OnTabSelect = v8.OnTabSelect
        })
    });
end;
return {
    name = "Audio Tabs",
    summary = "Tab selection with round edges",
    story = function()
        return v1.createElement(v3, {}, {
            AudioTabs = v1.createElement(v5)
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Core.Util.Urls);
local v5 = require(l_script_FirstAncestor_0.Core.Util.LayoutOrderIterator);
local v6 = require(l_script_FirstAncestor_0.Core.Components.Categorization.Swimlane);
local v7 = require(l_script_FirstAncestor_0.Core.Components.Categorization.IconTile);
local v8 = require(l_script_FirstAncestor_0.Core.Components.Categorization.SectionHeader);
local v9 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioScrollerWrapper);
local v10 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioSort);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.AudioTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local v14 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagAddMoreAudioSwimlaneAnalytics);
local l_Pane_0 = v2.UI.Pane;
local l_ScrollingFrame_0 = v2.UI.ScrollingFrame;
local l_Stylizer_0 = v2.ContextServices.Stylizer;
local l_ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE_0 = v3.ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE;
local v19 = UDim2.fromOffset(100, 100);
return function(v20)
    local v21 = l_Stylizer_0:use();
    local v22 = v5.new();
    local v24 = v1.useCallback(function(v23)
        if v20.OnSeeAllActivated then
            v20.OnSeeAllActivated(v23);
        end;
    end, {
        v20.OnSeeAllActivated
    });
    local v25 = v1.useMemo(function()
        return v20.Sections[#v20.Sections];
    end, {
        v20.Sections
    });
    local v26 = v1.useMemo(function()
        return v25.Section.subcategory == nil;
    end, {
        v25
    });
    local v31 = v1.useCallback(function(v27, v28)
        local v29 = nil;
        local v30 = nil;
        if v27.thumbnail then
            if v27.thumbnail.assetId then
                v29 = v4.constructAssetThumbnailUrl(v27.thumbnail.assetId, l_ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE_0, l_ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE_0);
            end;
            if v27.thumbnail.backgroundColor then
                pcall(function()
                    v30 = Color3.fromHex(v27.thumbnail.backgroundColor);
                end);
            end;
        end;
        return v1.createElement(v7, {
            BackgroundColor = v30,
            Image = v29,
            Key = v27.name,
            LayoutOrder = v27.index,
            OnClick = function()
                if v20.OnSwimlaneTileActivated then
                    v20.OnSwimlaneTileActivated(v27, v28);
                end;
            end,
            Size = v19,
            Title = v27.displayName
        });
    end, {
        v20.OnSwimlaneTileActivated
    });
    local v43 = v1.useMemo(function()
        local v32 = {};
        for _, v34 in v20.Sections, nil, nil do
            local l_subcategory_0 = v34.Section.subcategory;
            if v34.ResultsState then
                local _ = v34.ResultsState.loading;
            end;
            local v37 = nil;
            if not (v34 == v25 and v26) then
                if not l_subcategory_0 or l_subcategory_0.hidden then
                    v37 = v1.createElement(v10, {
                        AssetLogicWrapperProps = v20.AssetLogicWrapperProps,
                        AudioSection = v34,
                        LayoutOrder = v22:getNextOrder(),
                        OnSeeAllActivated = function()
                            v24(v34);
                        end
                    });
                else
                    local v38 = {};
                    for _, v40 in l_subcategory_0.children, nil, nil do
                        table.insert(v38, v40);
                    end;
                    v37 = v1.createElement(v6, {
                        Data = v38,
                        IsLoading = false,
                        LayoutOrder = v22:getNextOrder(),
                        OnRenderItem = function(_, v42)
                            return v31(v42, v34);
                        end,
                        OnClickSeeAll = function()
                            v24(v34);
                        end,
                        Title = v34.Section.displayName
                    });
                end;
                v32[v34.Section.displayName] = v37;
            end;
        end;
        if v26 then
            v32.LastSortHeader = v1.createElement(v8, {
                LayoutOrder = v22:getNextOrder(),
                ShowSeeAllText = false,
                Title = v25.Section.displayName
            });
        end;
        return v32;
    end, {
        v20.Sections,
        v20.AssetLogicWrapperProps,
        v25,
        v26,
        v31,
        v24
    });
    local v44 = v1.useCallback(function()
        return v1.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            Layout = Enum.FillDirection.Vertical,
            Spacing = UDim.new(0, v21.spacingUnit)
        }, v43);
    end, {
        v43
    });
    if not v26 then
        return v1.createElement(l_Pane_0, {
            BackgroundColor = v21.homeView.backgroundColor
        }, {
            ScrollingFrame = v1.createElement(l_ScrollingFrame_0, {
                AutomaticCanvasSize = Enum.AutomaticSize.Y,
                CanvasSize = UDim2.fromScale(1, 0),
                Layout = Enum.FillDirection.Vertical,
                Padding = v3.SCROLLING_FRAME_VIEW_PADDING,
                Spacing = UDim.new(0, v21.spacingUnit)
            }, v43)
        });
    elseif not v25.ResultsState then
        return nil;
    else
        return v1.createElement(v9, {
            AssetLogicWrapperProps = v20.AssetLogicWrapperProps,
            PageSize = v20.PageSize,
            RenderTopContent = v44,
            ResultsState = v25.ResultsState,
            SwimlaneName = if not v14() then nil else v25.Section.name
        });
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Core.Util.MockWrapper);
local _ = require(l_script_FirstAncestor_0.Core.Types.AudioTypes);
local v4 = require(script.Parent.AudioView);
local v5 = require(script.Parent["AudioView.mocks"]);
return {
    story = function()
        return v1.createElement(v2, {}, {
            AudioView = v1.createElement(v4, {
                Sections = {
                    v5.createMockSwimlane("Categories", v5.MOCK_CATEGORIES),
                    v5.createMockContextualRecommendations(),
                    v5.createMockList("Trending"),
                    v5.createMockList("Essentials")
                },
                PageSize = 10,
                AssetLogicWrapperProps = {
                    CanInsertAsset = function()
                        return true;
                    end,
                    LogAssetImpression = function()
                        return nil;
                    end,
                    OnAssetPreviewButtonClicked = function()
                        return nil;
                    end,
                    TryInsert = function()
                        return nil;
                    end,
                    TryOpenAssetConfig = function()
                        return nil;
                    end
                }
            })
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local _ = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Packages.React);
local v4 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioView);
local v5 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v6 = require(l_script_FirstAncestor_0.Core.Hooks.useCategorySections);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.AudioTypes);
local v9 = {
    InitialPageSize = 10
};
return function(v10)
    local v11 = v1.Dictionary.join(v9, v10);
    local v12 = v6(v5.FREE_AUDIO, v11.InitialPageSize);
    local v15 = v3.useCallback(function(v13)
        local l_subcategory_0 = v13.Section.subcategory;
        if not l_subcategory_0 then
            v11.OnClickSeeAllAssets(v13.Section.name, v11.CategoryName, v11.SortName);
            return ;
        else
            v11.OnClickSeeAllSubcategories(l_subcategory_0.children, v11.CategoryName, v11.SortName);
            return ;
        end;
    end, {
        v11.OnClickSeeAllSubcategories,
        v11.OnClickSeeAllAssets,
        v11.CategoryName,
        v11.SortName
    });
    local v17 = v3.useCallback(function(v16)
        v11.OnClickSubcategory(v16.name, v16, v11.CategoryName, v11.SortName, v16.queryParams);
    end, {
        v11.CategoryName,
        v11.SortName
    });
    if v12 and #v12 > 0 then
        return v3.createElement(v4, {
            Sections = v12,
            PageSize = v11.InitialPageSize,
            OnSeeAllActivated = v15,
            OnSwimlaneTileActivated = v17,
            AssetLogicWrapperProps = {
                CanInsertAsset = v11.CanInsertAsset,
                LogAssetImpression = v11.LogAssetImpression,
                OnAssetPreviewButtonClicked = v11.OnAssetPreviewButtonClicked,
                TryInsert = v11.TryInsert,
                TryOpenAssetConfig = v11.TryOpenAssetConfig
            }
        });
    else
        return nil;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Core.Util.MockWrapper);
local v3 = require(l_script_FirstAncestor_0.Core.Networking.NetworkInterface);
local v4 = require(script.Parent.AudioViewWrapper);
return {
    story = function()
        return v1.createElement(v2, {
            networkInterface = v3.new()
        }, {
            AudioViewWrapper = v1.createElement(v4)
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Framework);
local v3 = require(l_Packages_0.Roact);
local v4 = require(l_Packages_0.RoactRodux);
local v5 = require(l_script_FirstAncestor_0.Core.Components.ResultsFetcher);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local _ = require(l_script_FirstAncestor_0.Core.Components.AssetLogicWrapper);
local v10 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioScroller);
local v11 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioTabs);
local v12 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v13 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v14 = require(l_script_FirstAncestor_0.Core.Util.Images);
local v15 = require(l_script_FirstAncestor_0.Core.Util.Analytics.AssetAnalyticsContextItem);
local v16 = require(l_script_FirstAncestor_0.Core.Thunks.GetPageInfoAnalyticsContextInfo);
local v17 = require(l_script_FirstAncestor_0.Core.Networking.Requests.SearchWithOptions);
local v18 = require(l_script_FirstAncestor_0.Core.ContextServices.Settings);
local v19 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v20 = require(l_script_FirstAncestor_0.Core.Components.CategoryDropDown.CategoryDropDown);
local v21 = require(l_script_FirstAncestor_0.Core.Components.CallToActionBanner.CallToActionBanner);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local v23 = require(l_script_FirstAncestor_0.Core.Thunks.GetAssetPreviewDataForStartup);
local v24 = require(l_script_FirstAncestor_0.Core.Util.getStartupAssetId);
local l_withContext_0 = l_ContextServices_0.withContext;
local v26 = require(l_Packages_0.Dash);
local l_Pane_0 = v2.UI.Pane;
local l_withAbsoluteSizeAndPosition_0 = v2.Wrappers.withAbsoluteSizeAndPosition;
local v29 = v3.PureComponent:extend("AudioWrapper");
local v30 = table.freeze({
    Creator = {
        Id = 1750384777,
        Name = "Monstercat"
    }
});
v29.init = function(v31, _)
    v31.sizerRef = v3.createRef();
    v31.state = {
        selectedTab = v12.SOUND_EFFECTS.name,
        audioTabSize = UDim2.new(0, 330, 0, v13.AUDIO_TABS_HEIGHT)
    };
    v31.onTabSelect = function(v33)
        local l_props_0 = v31.props;
        local l_state_0 = v31.state;
        local v36 = if not l_state_0.selectedCategory then nil else l_state_0.selectedCategory.name;
        local l_LogPageView_0 = l_props_0.LogPageView;
        v31:setState({
            selectedTab = v33,
            selectedCategory = v3.None
        });
        l_LogPageView_0(v33, v36);
    end;
    v31.onCategorySelect = function(v38)
        local l_props_1 = v31.props;
        local l_state_1 = v31.state;
        local v41 = v38 or v3.None;
        local v42 = if not v38 then nil else v38.name;
        local l_selectedTab_0 = l_state_1.selectedTab;
        local l_LogPageView_1 = l_props_1.LogPageView;
        v31:setState({
            selectedCategory = v41
        });
        l_LogPageView_1(l_selectedTab_0, v42);
    end;
    v31.renderTopContent = function()
        local l_props_2 = v31.props;
        local l_state_2 = v31.state;
        local l_selectedTab_1 = l_state_2.selectedTab;
        local l_audioTabSize_0 = l_state_2.audioTabSize;
        local l_Localization_0 = l_props_2.Localization;
        local v50 = l_props_2.Settings:get("Plugin");
        local l_SearchWithOptions_0 = l_props_2.SearchWithOptions;
        local v52 = l_props_2.AssetAnalytics:get();
        return v3.createElement("Frame", {
            LayoutOrder = 1,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, 0, 0, 0),
            BackgroundTransparency = 1
        }, {
            v3.createElement("UIPadding", {
                PaddingBottom = UDim.new(0, 11)
            }),
            Layout = v3.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                Padding = UDim.new(0, 10)
            }),
            v3.createElement("Frame", {
                LayoutOrder = 1,
                Size = l_audioTabSize_0,
                BackgroundColor3 = l_props_2.Stylizer.audioTabs.backgroundButtonColor
            }, {
                UICorner = v3.createElement("UICorner", {
                    CornerRadius = UDim.new(0, 5)
                });
                v3.createElement(v11, {
                    Size = UDim2.new(1, 0, 0, 30),
                    SelectedTab = v31.state.selectedTab,
                    OnTabSelect = v31.onTabSelect
                })
            }),
            CallToActionBanner = if not (l_selectedTab_1 == v12.MUSIC.name) then nil else v21.Generator({
                LayoutOrder = 2,
                Image = v14.MONSTER_CAT_BANNER,
                Text = l_Localization_0:getText("Audio", "FindTracks", {
                    creatorName = v30.Creator.Name
                }),
                OnClick = function()
                    l_SearchWithOptions_0(v31.props.Network.networkInterface, v50, v30);
                    v52:onCallToActionBannerClicked(v30.Creator.Id);
                end
            }),
            v3.createElement(v20, {
                LayoutOrder = 3,
                Subcategories = l_props_2.SubcategoryDict,
                AudioType = l_selectedTab_1,
                OnCategorySelect = v31.onCategorySelect
            })
        });
    end;
    v31.onAbsoluteSizeChanged = function(v53)
        if v53.AbsoluteSize.X < 375 then
            v31:setState({
                audioTabSize = UDim2.new(1, 0, 0, v13.AUDIO_TABS_HEIGHT)
            });
            return ;
        else
            v31:setState({
                audioTabSize = UDim2.new(0, 330, 0, v13.AUDIO_TABS_HEIGHT)
            });
            return ;
        end;
    end;
    v31.logImpression = function(v54, v55, v56, v57)
        local l_props_3 = v31.props;
        local l_state_3 = v31.state;
        local l_selectedTab_2 = l_state_3.selectedTab;
        local v61 = if not l_state_3.selectedCategory then nil else l_state_3.selectedCategory.name;
        if not l_props_3.LogAssetImpression then
            return ;
        else
            return l_props_3.LogAssetImpression(v54, v57, v55, v56, l_props_3.AbsoluteSize, l_props_3.AbsolutePosition, {
                audioType = l_selectedTab_2,
                categoryName = v61
            });
        end;
    end;
end;
v29.didMount = function(v62)
    local l_props_4 = v62.props;
    local v64 = tonumber((v24()));
    if v64 then
        l_props_4.getAssetPreviewDataForStartup(v64, l_props_4.TryInsert, l_props_4.Localization, v62.props.Network.networkInterface, l_props_4.OnAssetPreviewButtonClicked);
    end;
    if v62.sizerRef.current then
        v62.onAbsoluteSizeChanged(v62.sizerRef.current);
    end;
end;
v29.render = function(v65)
    local l_props_5 = v65.props;
    local l_state_4 = v65.state;
    local l_AssetSections_0 = l_props_5.AssetSections;
    local l_CanInsertAsset_0 = l_props_5.CanInsertAsset;
    local l_SortName_0 = l_props_5.SortName;
    local l_TryInsert_0 = l_props_5.TryInsert;
    local v72 = not not l_AssetSections_0[#l_AssetSections_0] and l_AssetSections_0[#l_AssetSections_0].name or nil;
    local l_selectedTab_3 = l_state_4.selectedTab;
    local l_selectedCategory_0 = l_state_4.selectedCategory;
    local l_Stylizer_0 = l_props_5.Stylizer;
    local v76 = nil;
    if l_selectedCategory_0 then
        v76 = {
            l_selectedCategory_0.name
        };
    end;
    return v3.createElement(l_Pane_0, v26.join({
        BackgroundTransparency = 0,
        BackgroundColor3 = l_Stylizer_0.backgroundColor,
        Size = UDim2.new(1, 0, 1, 0),
        [v3.Ref] = v65.sizerRef,
        [v3.Change.AbsoluteSize] = v65.onAbsoluteSizeChanged
    }, l_props_5.WrapperProps), {
        Results = v5.Generator({
            networkInterface = v65.props.Network.networkInterface,
            categoryName = l_selectedTab_3,
            sortName = l_SortName_0,
            queryParams = {},
            sectionName = v72,
            initialPageSize = 20,
            tags = v76,
            render = function(v77)
                return v10.Generator({
                    Assets = v77.assets,
                    Loading = v77.loading,
                    Total = v77.total,
                    FetchNextPage = v77.fetchNextPage,
                    TryInsert = l_TryInsert_0,
                    CanInsertAsset = l_CanInsertAsset_0,
                    RenderTopContent = v65.renderTopContent,
                    AudioType = l_selectedTab_3,
                    LogImpression = v65.logImpression,
                    OnAssetPreviewButtonClicked = l_props_5.OnAssetPreviewButtonClicked,
                    ParentAbsoluteSize = l_props_5.AbsoluteSize,
                    TryOpenAssetConfig = l_props_5.TryOpenAssetConfig
                });
            end
        })
    });
end;
return l_withAbsoluteSizeAndPosition_0((v4.connect(function()
    return {};
end, function(v78)
    return {
        SearchWithOptions = function(v79, v80, v81)
            v78(v17(v79, v80, v81));
        end,
        getPageInfoAnalyticsContextInfo = function()
            return v78(v16());
        end,
        getAssetPreviewDataForStartup = function(v82, v83, v84, v85, v86)
            v78(v23(v82, v83, v84, v85, v86));
        end
    };
end)((l_withContext_0({
    AssetAnalytics = v15,
    Localization = l_ContextServices_0.Localization,
    Settings = v18,
    Stylizer = l_ContextServices_0.Stylizer,
    Network = v19
})(v29)))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Core.Components.CallToActionBanner.CallToActionBanner);
local v3 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v4 = require(l_script_FirstAncestor_0.Core.Util.Images);
local function v5()
    print("click");
end;
return {
    name = "Banner",
    story = function()
        return v1.createElement(v3, {}, {
            CallToActionBanner = v2.Generator({
                Image = v4.MONSTER_CAT_BANNER,
                Text = "Find tracks from Mostercat",
                OnClick = v5
            })
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v2 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v3 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxRefactorAudioConstantsForItemRow);
local l_COLUMNS_0 = v1.AUDIO_ROW.COLUMNS;
local v5 = v1.AUDIO_ROW.ICON_SIZE + if not v3() then v1.AUDIO_ROW.LEFT_RIGHT_PADDING else v1.ITEM_ROW.LEFT_RIGHT_PADDING * 2;
return function(v6, _)
    local v8 = v6 == v2.SOUND_EFFECTS.name;
    if not (v6 == v2.MUSIC.name) then
        local _ = not v8;
    end;
    return {
        [l_COLUMNS_0.ICON] = UDim2.fromScale(0, 1) + UDim2.fromOffset(v5, 0),
        [l_COLUMNS_0.TITLE] = UDim2.fromScale(0.5, 1) - UDim2.fromOffset(v5 + 50, 0),
        [l_COLUMNS_0.CREATOR] = UDim2.fromScale(0.25, 1),
        [l_COLUMNS_0.TAGS] = UDim2.fromScale(0.25, 1),
        [l_COLUMNS_0.LENGTH] = UDim2.fromScale(0, 1) + UDim2.fromOffset(50, 0)
    };
end;


local l_Packages_0 = script:FindFirstAncestor("Toolbox").Packages;
local v1 = require(l_Packages_0.Roact);
local l_HoverArea_0 = require(l_Packages_0.Framework).UI.HoverArea;
local v3 = v1.PureComponent:extend("CallToActionBanner");
local v4 = game:DefineFastFlag("ToolboxRetireGotham", false);
v3.defaultProps = {
    Gradient = ColorSequence.new({
        ColorSequenceKeypoint.new(0, Color3.fromHex("#0C2859")),
        ColorSequenceKeypoint.new(1, Color3.fromHex("#B8425f"))
    }),
    GradientOff = Vector2.new(-0.34, 0)
};
v3.init = function(v5, _)
    v5.ref = v1.createRef();
    v5.state = {
        fontSize = 14,
        imageWidth = 197,
        height = 75
    };
    v5.onAbsoluteSizeChange = function(v7)
        if v7.AbsoluteSize.X < 285 then
            v5:setState({
                fontSize = 12,
                imageWidth = 125,
                height = 47
            });
            return ;
        elseif v7.AbsoluteSize.X < 350 then
            v5:setState({
                fontSize = 13,
                imageWidth = 150,
                height = 57
            });
            return ;
        else
            v5:setState({
                fontSize = 14,
                imageWidth = 197,
                height = 75
            });
            return ;
        end;
    end;
end;
v3.render = function(v8)
    local l_props_0 = v8.props;
    local l_state_0 = v8.state;
    local l_Image_0 = l_props_0.Image;
    local l_Gradient_0 = l_props_0.Gradient;
    local l_GradientOff_0 = l_props_0.GradientOff;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Text_0 = l_props_0.Text;
    local l_OnClick_0 = l_props_0.OnClick;
    local l_fontSize_0 = l_state_0.fontSize;
    local l_imageWidth_0 = l_state_0.imageWidth;
    return v1.createElement("ImageButton", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, l_state_0.height),
        LayoutOrder = l_LayoutOrder_0,
        [v1.Ref] = v8.ref,
        [v1.Change.AbsoluteSize] = v8.onAbsoluteSizeChange,
        [v1.Event.MouseButton1Click] = l_OnClick_0
    }, {
        HoverArea = v1.createElement(l_HoverArea_0, {
            Cursor = "PointingHand"
        });
        v1.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0)
        }, {
            UIGradient = v1.createElement("UIGradient", {
                Color = l_Gradient_0,
                Offset = l_GradientOff_0
            }),
            UIListLayout = v1.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 10)
            }),
            Text = v1.createElement("TextLabel", {
                Size = UDim2.new(1, -l_imageWidth_0 - 10, 1, 0),
                BackgroundTransparency = 1,
                Font = if not v4 then Enum.Font.GothamSemibold else Enum.Font.MontserratBold,
                Text = l_Text_0 .. "  >",
                TextColor3 = Color3.fromHex("#FFFFFF"),
                TextSize = l_fontSize_0,
                TextWrapped = true,
                TextXAlignment = Enum.TextXAlignment.Left
            }, {
                UIListLayout = v1.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Horizontal,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                Padding = v1.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, 14)
                }),
                Text = v1.createElement("TextLabel", {
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 1,
                    Font = if not v4 then Enum.Font.GothamSemibold else Enum.Font.MontserratBold,
                    Text = l_Text_0 .. "  >",
                    TextColor3 = Color3.fromHex("#FFFFFF"),
                    TextSize = l_fontSize_0,
                    TextWrapped = true,
                    TextXAlignment = Enum.TextXAlignment.Left
                })
            }),
            Image = v1.createElement("ImageLabel", {
                LayoutOrder = 2,
                Size = UDim2.new(0, l_imageWidth_0, 1, 0),
                BackgroundTransparency = 1,
                Image = l_Image_0
            })
        })
    });
end;
TypedCallToActionBanner = function(v19, v20)
    return v1.createElement(v3, v19, v20);
end;
return {
    Component = v3,
    Generator = TypedCallToActionBanner
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Core.Components.Asset.Asset);
local _ = require(l_script_FirstAncestor_0.Core.Types.AssetLogicTypes);
local l_Categorization_0 = l_script_FirstAncestor_0.Core.Components.Categorization;
local v5 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v6 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local v8 = require(l_script_FirstAncestor_0.Core.ContextServices.ModalContext);
local v9 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v10 = require(l_script_FirstAncestor_0.Core.Components.ResultsFetcher);
local v11 = require(l_Categorization_0.Swimlane);
local v12 = require(l_script_FirstAncestor_0.Core.Hooks.useContextualAssets);
local v13 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxFixInventoryGridSearch);
local v14 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxContextualRecommendationsShadowTraffic);
local v15 = require(l_script_FirstAncestor_0.Core.Flags.getFFlagQualityFiltersInToolboxSearch);
local l_useState_0 = v1.useState;
local l_useCallback_0 = v1.useCallback;
return function(v18)
    local v19 = v8:use();
    local v20 = v9:use();
    local v21 = v12();
    local v22, v23 = l_useState_0(0);
    local v24 = l_useCallback_0(function()
        v18.OnClickSeeAllAssets(v18.SectionName or v18.PathName, v18.CategoryName, v18.SortName, nil, v18.QueryParams);
    end, {
        v18.CategoryName,
        v18.OnClickSeeAllAssets,
        v18.PathName,
        v18.QueryParams,
        v18.SectionName,
        v18.SortName
    });
    local v26 = l_useCallback_0(function(v25)
        v23(v25);
    end, {});
    local v27 = l_useCallback_0(function()
        v23(0);
    end, {});
    local v32 = l_useCallback_0(function(_, v29)
        local l_Id_0 = v29.Asset.Id;
        local v31 = false;
        if v22 == l_Id_0 then
            v31 = v19.canHoverAsset();
        end;
        return v1.createElement(v2, {
            assetId = l_Id_0,
            assetData = v29,
            assetTileLocation = v6.ASSET_TILE_LOCATION.BROWSE,
            canInsertAsset = v18.CanInsertAsset,
            isHovered = v31,
            logImpression = v18.LogAssetImpression,
            onAssetHovered = v26,
            onAssetHoverEnded = v27,
            onAssetPreviewButtonClicked = v18.OnAssetPreviewButtonClicked,
            onSearchByCreator = if not v13() then nil else v18.OnSearchByCreator,
            parentAbsolutePosition = v18.ParentAbsolutePosition,
            parentSize = v18.ParentAbsoluteSize,
            shouldLogOnMount = v18.ShouldLogAssetOnMount,
            swimlaneCategory = v18.SwimlaneCategory,
            tryInsert = v18.TryInsert,
            tryOpenAssetConfig = v18.TryOpenAssetConfig
        });
    end, {
        v19,
        v22,
        v26,
        v27,
        v18.CanInsertAsset,
        v18.LogAssetImpression,
        v18.OnAssetPreviewButtonClicked,
        v18.OnSearchByCreator,
        v18.ParentAbsolutePosition,
        v18.ParentAbsoluteSize,
        v18.ShouldLogAssetOnMount,
        v18.SwimlaneCategory,
        v18.TryInsert,
        v18.TryOpenAssetConfig
    });
    local v36 = l_useCallback_0(function(v33)
        local v34 = v5.shouldShowPrices(v18.CategoryName);
        local v35 = nil;
        v35 = if not v34 then v6.ASSET_HEIGHT else v6.ASSET_HEIGHT + v6.PRICE_HEIGHT;
        if v14() and v18.SectionName == v6.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then
            return nil;
        else
            return v1.createElement(v11, {
                Data = v33.assets,
                IsLoading = v33.loading,
                LayoutOrder = v18.LayoutOrder,
                OnClickSeeAll = v24,
                OnRenderItem = v32,
                Size = UDim2.new(0, v18.SwimlaneWidth, 0, v35),
                Total = v33.total,
                Title = v18.Title,
                ZIndex = v18.ZIndex
            });
        end;
    end, {
        v24,
        v32,
        v18.CategoryName,
        v18.LayoutOrder,
        v18.SwimlaneWidth,
        v18.Title,
        v18.ZIndex
    });
    if v18.SectionName == v6.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME and (not (#v21.assetsInCameraViewport ~= 0) or #v21.assetsInCameraVicinity == 0) then
        return nil;
    else
        return v10.Generator({
            assetsInCameraViewport = if v18.SectionName == v6.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then v21.assetsInCameraViewport else nil,
            assetsInCameraVicinity = if v18.SectionName == v6.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then v21.assetsInCameraVicinity else nil,
            networkInterface = v20.networkInterface,
            categoryName = v18.CategoryName,
            includeUnverifiedCreators = v18.IncludeUnverifiedCreators,
            qualityFilterData = if not v15() then nil else v18.QualityFilterData,
            sortName = v18.SortName,
            queryParams = v18.QueryParams,
            sectionName = v18.SectionName,
            initialPageSize = v18.InitialPageSize,
            render = v36,
            searchSource = v18.searchSource
        });
    end;
end;