local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Button_0 = l_UI_0.Button;
local l_Image_0 = l_UI_0.Image;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_TruncatedTextLabel_0 = l_UI_0.TruncatedTextLabel;
local v16 = require(l_Parent_0.Src.Controllers.GeneralServiceController);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v18 = require(l_Parent_0.Src.Actions.SetMaterialVariant);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v20 = require(l_Constants_0.getFullMaterialType);
local v21 = require(l_Constants_0.getMaterialName);
local v22 = require(l_Constants_0.getSupportedMaterials);
local l_game_FastInt_0 = game:GetFastInt("InfluxReportMaterialManagerHundrethPercent2");
local v24 = v22();
local v25 = v2.PureComponent:extend("MaterialInformation");
v25.init = function(v26)
    v26.delete = function()
        local l_props_0 = v26.props;
        local l_Material_0 = l_props_0.Material;
        if not (not l_Material_0 or not l_Material_0.MaterialVariant) then
            l_props_0.GeneralServiceController:destroyWithUndo(l_Material_0.MaterialVariant);
            l_props_0.Analytics:report("deleteMaterialVariant");
        end;
    end;
    v26.createVariant = function()
        local l_props_1 = v26.props;
        local l_Material_1 = l_props_1.Material;
        if not (not l_Material_1 or l_Material_1.MaterialVariant) then
            local v31 = l_props_1.GeneralServiceController:createMaterialVariant(l_Material_1.Material);
            l_props_1.Analytics:report("newMaterialVariant", {
                BaseMaterial = v21(l_Material_1.Material)
            }, l_game_FastInt_0);
            l_props_1.Analytics:report("newMaterialVariantCounter");
            l_props_1.dispatchSetMaterialVariant(v31);
        end;
    end;
    v26.applyToSelection = function()
        local l_props_2 = v26.props;
        if l_props_2.Material then
            l_props_2.GeneralServiceController:ApplyToSelection(l_props_2.Material.Material, if not l_props_2.Material.MaterialVariant then nil else l_props_2.Material.MaterialVariant.Name);
            l_props_2.Analytics:report("applyToSelectionButton");
        end;
    end;
end;
v25.render = function(v33)
    local l_props_3 = v33.props;
    local l_MaterialInformation_0 = l_props_3.Stylizer.MaterialInformation;
    local l_Localization_1 = l_props_3.Localization;
    local l_Material_2 = l_props_3.Material;
    if l_Material_2 then
        local v38 = not l_Material_2.MaterialVariant;
        local v39 = if not v38 then l_Material_2.MaterialVariant.Name else l_Localization_1:getText("Materials", v21(l_Material_2.Material));
        local v40 = v20(l_Material_2, l_Localization_1);
        local l_MaterialPath_0 = l_Material_2.MaterialPath;
        local v42 = {};
        for v43, v44 in ipairs(l_MaterialPath_0) do
            v42[v43] = l_Localization_1:getText("Categories", v44);
        end;
        local v45 = table.concat(v42, " > ");
        local v46 = 1;
        if v24[l_Material_2.Material] then
            v46 = 2;
        end;
        return v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = l_props_3.LayoutOrder,
            Padding = 10
        }, {
            Title = v2.createElement(l_Pane_0, {
                Layout = Enum.FillDirection.Horizontal,
                LayoutOrder = 1,
                Size = l_MaterialInformation_0.LabelRowSize
            }, {
                Name = v2.createElement(l_TruncatedTextLabel_0, {
                    LayoutOrder = 1,
                    Font = l_MaterialInformation_0.HeaderFont,
                    Size = UDim2.new(1, -(v46 * l_MaterialInformation_0.ButtonSize.X.Offset), 1, 0),
                    Text = v39,
                    TextSize = l_MaterialInformation_0.TitleTextSize,
                    TextXAlignment = Enum.TextXAlignment.Left
                }),
                ApplyToSelection = v2.createElement(l_Button_0, {
                    LayoutOrder = 2,
                    OnClick = v33.applyToSelection,
                    Size = l_MaterialInformation_0.ButtonSize,
                    Style = l_MaterialInformation_0.ButtonStyle
                }, {
                    Image = v2.createElement(l_Image_0, {
                        Style = l_MaterialInformation_0.ApplyToSelection,
                        Size = l_MaterialInformation_0.ImageSize,
                        Position = l_MaterialInformation_0.ImagePosition
                    }),
                    Tooltip = v2.createElement(l_Tooltip_0, {
                        Text = l_Localization_1:getText("TopBar", "Apply")
                    })
                }),
                CreateVariant = if not not v38 and v24[l_Material_2.Material] then v2.createElement(l_Button_0, {
                    LayoutOrder = 3,
                    OnClick = v33.createVariant,
                    Size = l_MaterialInformation_0.ButtonSize,
                    Style = l_MaterialInformation_0.ButtonStyle
                }, {
                    Image = v2.createElement(l_Image_0, {
                        Style = l_MaterialInformation_0.CreateVariant,
                        Size = l_MaterialInformation_0.ImageSize,
                        Position = l_MaterialInformation_0.ImagePosition
                    }),
                    Tooltip = v2.createElement(l_Tooltip_0, {
                        Text = l_Localization_1:getText("MaterialInformation", "CreateVariant")
                    })
                }) else nil,
                Delete = if v38 then nil else v2.createElement(l_Button_0, {
                    LayoutOrder = 3,
                    OnClick = v33.delete,
                    Size = l_MaterialInformation_0.ButtonSize,
                    Style = l_MaterialInformation_0.ButtonStyle
                }, {
                    Image = v2.createElement(l_Image_0, {
                        Style = l_MaterialInformation_0.Delete,
                        Size = l_MaterialInformation_0.ImageSize,
                        Position = l_MaterialInformation_0.ImagePosition
                    }),
                    Tooltip = v2.createElement(l_Tooltip_0, {
                        Text = l_Localization_1:getText("MaterialInformation", "Delete")
                    })
                })
            }),
            MaterialType = v2.createElement(l_TruncatedTextLabel_0, {
                LayoutOrder = 2,
                Size = l_MaterialInformation_0.LabelRowSize,
                Text = v40,
                TextXAlignment = Enum.TextXAlignment.Left
            }),
            Category = v2.createElement(l_TruncatedTextLabel_0, {
                LayoutOrder = 3,
                Size = l_MaterialInformation_0.LabelRowSize,
                Text = v45,
                TextXAlignment = Enum.TextXAlignment.Left
            })
        });
    else
        return v2.createElement(l_Pane_0);
    end;
end;
return v3.connect(function(v47, v48)
    return {
        Material = v48.MaterialMock or v47.MaterialBrowserReducer.Material
    };
end, function(v49)
    return {
        dispatchSetMaterialVariant = function(v50)
            v49(v18(v50));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v16,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v25)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v4.Style.Stylizer;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_ToggleButton_0 = l_UI_0.ToggleButton;
local v14 = require(l_Parent_0.Src.Actions.SetExpandedPane);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v16 = require(l_Parent_0.Src.Controllers.MaterialServiceController);
local v17 = require(l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor.LabeledElement);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v19 = require(l_Constants_0.getSettingsNames);
local v20 = require(l_Constants_0.getSupportedMaterials)();
local v21 = v19();
local v22 = v2.PureComponent:extend("OverrideSettings");
v22.init = function(v23)
    v23.onOverrideToggled = function(v24)
        local l_props_0 = v23.props;
        if not v24 then
            l_props_0.MaterialServiceController:setMaterialOverride(l_props_0.MaterialVariant.BaseMaterial, l_props_0.MaterialOverrides[table.find(l_props_0.MaterialOverrides, l_props_0.MaterialVariant.Name)]);
        else
            l_props_0.MaterialServiceController:setMaterialOverride(l_props_0.MaterialVariant.BaseMaterial);
        end;
        l_props_0.Analytics:report("setOverrideToggled");
    end;
    v23.onExpandedChanged = function()
        local l_props_1 = v23.props;
        l_props_1.dispatchSetExpandedPane(v21.OverrideSettings, not l_props_1.ExpandedPane);
    end;
end;
v22.render = function(v27)
    local l_props_2 = v27.props;
    local l_OverrideSettings_0 = l_props_2.Stylizer.OverrideSettings;
    local l_Localization_1 = l_props_2.Localization;
    local l_MaterialVariant_0 = l_props_2.MaterialVariant;
    local v32 = false;
    if l_props_2.MaterialOverride > 1 then
        v32 = l_props_2.MaterialOverrides[l_props_2.MaterialOverride] == l_MaterialVariant_0.Name;
    end;
    return v2.createElement(l_ExpandablePane_0, {
        LayoutOrder = l_props_2.LayoutOrder,
        ContentPadding = l_OverrideSettings_0.ContentPadding,
        ContentSpacing = l_OverrideSettings_0.ItemSpacing,
        Text = l_Localization_1:getText("OverrideSettings", "Overrides"),
        Style = l_OverrideSettings_0.CustomExpandablePane,
        Expanded = l_props_2.ExpandedPane,
        OnExpandedChanged = v27.onExpandedChanged
    }, {
        OverridesNew = v2.createElement(v17, {
            LabelColumnWidth = l_OverrideSettings_0.LabelColumnWidth,
            Text = l_Localization_1:getText("OverrideSettings", "SetOverride")
        }, {
            Button = v2.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                Size = UDim2.new(0, 195, 0, 20),
                Padding = 5
            }, {
                ToggleButton = v2.createElement(l_ToggleButton_0, {
                    OnClick = function()
                        v27.onOverrideToggled(v32);
                    end,
                    Selected = v32,
                    Size = UDim2.fromOffset(30, 18)
                })
            })
        })
    });
end;
return v3.connect(function(v33, v34)
    if not v34.MockMaterial then
        if v33.MaterialBrowserReducer.Material and v20[v33.MaterialBrowserReducer.Material.Material] then
            return {
                ExpandedPane = v33.MaterialBrowserReducer.ExpandedPane[v21.OverrideSettings],
                MaterialOverrides = v33.MaterialBrowserReducer.MaterialOverrides[v33.MaterialBrowserReducer.Material.Material],
                MaterialOverride = v33.MaterialBrowserReducer.MaterialOverride[v33.MaterialBrowserReducer.Material.Material]
            };
        else
            return {};
        end;
    else
        return {
            ExpandedPane = v33.MaterialBrowserReducer.ExpandedPane[v21.OverrideSettings],
            MaterialOverrides = v33.MaterialBrowserReducer.MaterialOverrides[v34.MockMaterial.Material],
            MaterialOverride = v33.MaterialBrowserReducer.MaterialOverride[v34.MockMaterial.Material]
        };
    end;
end, function(v35)
    return {
        dispatchSetExpandedPane = function(v36, v37)
            v35(v14(v36, v37));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    MaterialServiceController = v16,
    Stylizer = l_Stylizer_0
})(v22)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_UI_0 = v3.UI;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_Button_0 = l_UI_0.Button;
local l_Pane_0 = l_UI_0.Pane;
local v15 = require(l_Parent_0.Src.Actions.SetExpandedPane);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local l_Controllers_0 = l_Parent_0.Src.Controllers;
local v18 = require(l_Controllers_0.MaterialServiceController);
local v19 = require(l_Controllers_0.GeneralServiceController);
local v20 = require(l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor.LabeledElement);
local v21 = require(l_Parent_0.Src.Resources.Constants.getSettingsNames);
local v22 = require(l_Parent_0.Src.Util.getNumberFromText);
local v23 = require(l_Parent_0.Src.Util.ResetCustomPhysicalProperties);
local v24 = v21();
local v25 = v1.PureComponent:extend("PhysicalSettings");
v25.init = function(v26)
    v26.setPhysicalProperty = function(v27)
        return function(v28)
            v26.physicalProperties[v27] = v28;
        end;
    end;
    v26.onFocusLost = function()
        v26.props.MaterialVariant.CustomPhysicalProperties = PhysicalProperties.new(v22(v26.physicalProperties.Density) or 0, v22(v26.physicalProperties.Friction) or 0, v22(v26.physicalProperties.Elasticity) or 0, v22(v26.physicalProperties.FrictionWeight) or 0, v22(v26.physicalProperties.ElasticityWeight) or 0);
    end;
    v26.reset = function()
        v23(v26.props.MaterialVariant);
    end;
    v26.onExpandedChanged = function()
        local l_props_0 = v26.props;
        l_props_0.dispatchSetExpandedPane(v24.PhysicalSettings, not l_props_0.ExpandedPane);
    end;
end;
v25.render = function(v30)
    local l_props_1 = v30.props;
    local l_PhysicalSettings_0 = l_props_1.Stylizer.PhysicalSettings;
    local l_Localization_1 = l_props_1.Localization;
    local v34 = l_LayoutOrderIterator_0.new();
    local v35 = l_props_1.MaterialVariant.CustomPhysicalProperties or PhysicalProperties.new(l_props_1.MaterialVariant.BaseMaterial);
    if v35 then
        v30.physicalProperties = {
            Density = string.format("%.3f", v35.Density):gsub("%.?0+$", ""),
            Elasticity = string.format("%.3f", v35.Elasticity):gsub("%.?0+$", ""),
            ElasticityWeight = string.format("%.3f", v35.ElasticityWeight):gsub("%.?0+$", ""),
            Friction = string.format("%.3f", v35.Friction):gsub("%.?0+$", ""),
            FrictionWeight = string.format("%.3f", v35.FrictionWeight):gsub("%.?0+$", "")
        };
    end;
    return v1.createElement(l_ExpandablePane_0, {
        LayoutOrder = l_props_1.LayoutOrder,
        ContentPadding = l_PhysicalSettings_0.ContentPadding,
        ContentSpacing = l_PhysicalSettings_0.ItemSpacing,
        Text = l_Localization_1:getText("PhysicalProperties", "Physics"),
        Style = l_PhysicalSettings_0.CustomExpandablePane,
        Expanded = l_props_1.ExpandedPane,
        OnExpandedChanged = v30.onExpandedChanged
    }, {
        Density = v1.createElement(v20, {
            LabelColumnWidth = l_PhysicalSettings_0.LabelColumnWidth,
            LayoutOrder = v34:getNextOrder(),
            Text = l_Localization_1:getText("PhysicalProperties", "Density")
        }, {
            v1.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_PhysicalSettings_0.DialogColumnSize,
                Text = v30.physicalProperties.Density,
                OnTextChanged = v30.setPhysicalProperty("Density"),
                OnFocusLost = v30.onFocusLost
            })
        }),
        Elasticity = v1.createElement(v20, {
            LabelColumnWidth = l_PhysicalSettings_0.LabelColumnWidth,
            LayoutOrder = v34:getNextOrder(),
            Text = l_Localization_1:getText("PhysicalProperties", "Elasticity")
        }, {
            v1.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_PhysicalSettings_0.DialogColumnSize,
                Text = v30.physicalProperties.Elasticity,
                OnTextChanged = v30.setPhysicalProperty("Elasticity"),
                OnFocusLost = v30.onFocusLost
            })
        }),
        Friction = v1.createElement(v20, {
            LabelColumnWidth = l_PhysicalSettings_0.LabelColumnWidth,
            LayoutOrder = v34:getNextOrder(),
            Text = l_Localization_1:getText("PhysicalProperties", "Friction")
        }, {
            v1.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_PhysicalSettings_0.DialogColumnSize,
                Text = v30.physicalProperties.Friction,
                OnTextChanged = v30.setPhysicalProperty("Friction"),
                OnFocusLost = v30.onFocusLost
            })
        }),
        ElasticityWeight = v1.createElement(v20, {
            LabelColumnWidth = l_PhysicalSettings_0.LabelColumnWidth,
            LayoutOrder = v34:getNextOrder(),
            Text = l_Localization_1:getText("PhysicalProperties", "ElasticityWeight")
        }, {
            v1.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_PhysicalSettings_0.DialogColumnSize,
                Text = v30.physicalProperties.ElasticityWeight,
                OnTextChanged = v30.setPhysicalProperty("ElasticityWeight"),
                OnFocusLost = v30.onFocusLost
            })
        }),
        FrictionWeight = v1.createElement(v20, {
            LabelColumnWidth = l_PhysicalSettings_0.LabelColumnWidth,
            LayoutOrder = v34:getNextOrder(),
            Text = l_Localization_1:getText("PhysicalProperties", "FrictionWeight")
        }, {
            v1.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_PhysicalSettings_0.DialogColumnSize,
                Text = v30.physicalProperties.FrictionWeight,
                OnTextChanged = v30.setPhysicalProperty("FrictionWeight"),
                OnFocusLost = v30.onFocusLost
            })
        }),
        Reset = v1.createElement(l_Pane_0, {
            LayoutOrder = v34:getNextOrder(),
            Padding = {
                Left = l_PhysicalSettings_0.ButtonPadding
            },
            Size = l_PhysicalSettings_0.ButtonSize
        }, {
            Button = v1.createElement(l_Button_0, {
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                OnClick = v30.reset,
                Text = l_Localization_1:getText("PhysicalProperties", "Reset"),
                Style = "Round"
            })
        })
    });
end;
return v2.connect(function(v36, _)
    return {
        ExpandedPane = v36.MaterialBrowserReducer.ExpandedPane[v24.PhysicalSettings],
        Material = v36.MaterialBrowserReducer.Material
    };
end, function(v38)
    return {
        dispatchSetExpandedPane = function(v39, v40)
            v38(v15(v39, v40));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0,
    MaterialServiceController = v18,
    GeneralServiceController = v19
})(v25)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v4.UI;
local l_Button_0 = l_UI_0.Button;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_Pane_0 = l_UI_0.Pane;
local l_Image_0 = l_UI_0.Image;
local l_Separator_0 = l_UI_0.Separator;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_TruncatedTextLabel_0 = l_UI_0.TruncatedTextLabel;
local v20 = require(l_Parent_0.Src.Actions.SetExpandedPane);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v22 = require(l_Parent_0.Src.Controllers.GeneralServiceController);
local l_MaterialEditor_0 = l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor;
local v24 = require(l_MaterialEditor_0.LabeledElement);
local v25 = require(l_MaterialEditor_0.TextureSettings);
local v26 = require(l_MaterialEditor_0.TilingSettings);
local v27 = require(l_Parent_0.Src.Resources.Constants.getSettingsNames)();
local v28 = v2.PureComponent:extend("TerrainDetailsEditor");
v28.init = function(v29)
    v29.state = {
        name = v29.props.TerrainDetail.Name
    };
    v29.onNameChanged = function(v30)
        v29:setState({
            name = v30
        });
    end;
    v29.onFocusLost = function()
        local l_props_0 = v29.props;
        if v29.state.name and v29.state.name ~= "" then
            l_props_0.GeneralServiceController:setTerrainDetailName(l_props_0.TerrainDetail, v29.state.name);
            return ;
        else
            v29:setState({
                name = l_props_0.TerrainDetail.Name
            });
            return ;
        end;
    end;
    v29.onExpandedChanged = function()
        local l_props_1 = v29.props;
        l_props_1.dispatchSetExpandedPane(v27.TerrainDetailsEditor[l_props_1.TerrainFace], not l_props_1.ExpandedPane);
    end;
    v29.headerComponent = function()
        local l_props_2 = v29.props;
        local l_TerrainDetailsEditor_0 = l_props_2.Stylizer.TerrainDetailsEditor;
        local l_Localization_1 = l_props_2.Localization;
        local v36 = l_LayoutOrderIterator_0.new();
        return v2.createElement(v24, {
            LabelColumnWidth = l_TerrainDetailsEditor_0.LabelColumnWidth,
            LayoutOrder = 1,
            Padding = 0,
            Text = l_Localization_1:getText("TerrainDetails", l_props_2.TerrainFace),
            VerticalAlignment = Enum.VerticalAlignment.Center
        }, {
            v2.createElement(l_Pane_0, {
                Layout = Enum.FillDirection.Horizontal,
                Size = UDim2.fromScale(1, 1),
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                VerticalAlignment = Enum.VerticalAlignment.Center
            }, {
                Name = v2.createElement(l_TruncatedTextLabel_0, {
                    LayoutOrder = v36:getNextOrder(),
                    Size = l_TerrainDetailsEditor_0.NameLabelSize,
                    Text = v29.state.name,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Center
                }),
                Delete = v2.createElement(l_Button_0, {
                    LayoutOrder = v36:getNextOrder(),
                    OnClick = l_props_2.OnDelete,
                    Size = l_TerrainDetailsEditor_0.ButtonSize,
                    Style = l_TerrainDetailsEditor_0.ButtonStyle
                }, {
                    Image = v2.createElement(l_Image_0, {
                        Style = l_TerrainDetailsEditor_0.Delete,
                        Size = l_TerrainDetailsEditor_0.ImageSize,
                        Position = l_TerrainDetailsEditor_0.ImagePosition
                    }),
                    Tooltip = v2.createElement(l_Tooltip_0, {
                        Text = l_Localization_1:getText("TerrainDetails", "Delete")
                    })
                })
            })
        });
    end;
end;
v28.didUpdate = function(v37, _, v39)
    if v37.state.name ~= v37.props.TerrainDetail.Name and v39.name == v37.state.name then
        v37:setState({
            name = v37.props.TerrainDetail.Name
        });
    end;
end;
v28.render = function(v40)
    local l_props_3 = v40.props;
    local l_TerrainDetailsEditor_1 = l_props_3.Stylizer.TerrainDetailsEditor;
    local l_Localization_2 = l_props_3.Localization;
    local v44 = l_LayoutOrderIterator_0.new();
    return v2.createElement(l_ExpandablePane_0, {
        ContentPadding = {
            Top = 5,
            Bottom = 5
        },
        ContentSpacing = 5,
        LayoutOrder = l_props_3.LayoutOrder,
        HeaderComponent = v40.headerComponent,
        Expanded = l_props_3.ExpandedPane,
        OnExpandedChanged = v40.onExpandedChanged
    }, {
        Name = v2.createElement(v24, {
            LabelColumnWidth = l_TerrainDetailsEditor_1.LabelColumnWidth,
            LayoutOrder = v44:getNextOrder(),
            Text = l_Localization_2:getText("CreateDialog", "NameVariant")
        }, {
            v2.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_TerrainDetailsEditor_1.DialogColumnSize,
                Text = v40.state.name,
                OnTextChanged = v40.onNameChanged,
                OnFocusLost = v40.onFocusLost
            })
        }),
        TextureSettings = v2.createElement(v25, {
            LayoutOrder = v44:getNextOrder(),
            PBRMaterial = l_props_3.TerrainDetail,
            Expandable = false
        }),
        TilingSettings = v2.createElement(v26, {
            LayoutOrder = v44:getNextOrder(),
            PBRMaterial = l_props_3.TerrainDetail,
            Expandable = false
        }),
        Separator = if l_props_3.TerrainFace ~= "Bottom" then v2.createElement(l_Separator_0, {
            LayoutOrder = v44:getNextOrder(),
            DominantAxis = Enum.DominantAxis.Width
        }) else nil
    });
end;
return v3.connect(function(v45, v46)
    return {
        ExpandedPane = v45.MaterialBrowserReducer.ExpandedPane[v27.TerrainDetailsEditor[v46.TerrainFace]]
    };
end, function(v47)
    return {
        dispatchSetExpandedPane = function(v48, v49)
            v47(v20(v48, v49));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v22,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v28)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v3.UI;
local l_Button_0 = l_UI_0.Button;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_Pane_0 = l_UI_0.Pane;
local v15 = require(l_Parent_0.Src.Util.getTerrainDetails);
local v16 = require(l_Parent_0.Src.Actions.SetExpandedPane);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v18 = require(l_Parent_0.Src.Controllers.GeneralServiceController);
local l_MaterialEditor_0 = l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor;
local v20 = require(l_MaterialEditor_0.LabeledElement);
local v21 = require(l_MaterialEditor_0.TerrainDetailsEditor);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v23 = require(l_Constants_0.getTerrainFaceName);
local v24 = require(l_Constants_0.getTerrainFaces);
local v25 = require(l_Constants_0.getSettingsNames)();
local v26 = v24();
local v27 = v2.PureComponent:extend("TerrainDetailsSettings");
v27.init = function(v28)
    v28.onClick = function(v29)
        v28.props.GeneralServiceController:createTerrainDetail(v28.props.MaterialVariant, v29);
    end;
    v28.onDelete = function(v30)
        v28.props.GeneralServiceController:destroyWithUndo(v30);
    end;
    v28.onExpandedChanged = function()
        local l_props_0 = v28.props;
        l_props_0.dispatchSetExpandedPane(v25.TerrainDetailsSettings, not l_props_0.ExpandedPane);
    end;
end;
v27.render = function(v32)
    local l_props_1 = v32.props;
    local l_TerrainDetailsSettings_0 = l_props_1.Stylizer.TerrainDetailsSettings;
    local l_Localization_1 = l_props_1.Localization;
    local v36 = l_LayoutOrderIterator_0.new();
    local l_Material_0 = l_props_1.Material;
    if l_Material_0.MaterialVariant then
        local v38 = v15(l_Material_0.MaterialVariant);
        local v39 = {};
        for _, v41 in ipairs(v26) do
            local v42 = v23(v41);
            local v43 = v38[v41];
            if not v43 then
                v39[v42] = v2.createElement(v20, {
                    LabelColumnWidth = l_TerrainDetailsSettings_0.LabelColumnWidth,
                    LayoutOrder = v36:getNextOrder(),
                    Text = l_Localization_1:getText("TerrainDetails", v42)
                }, {
                    v2.createElement(l_Button_0, {
                        Size = l_TerrainDetailsSettings_0.DialogColumnSize,
                        Text = l_Localization_1:getText("TerrainDetails", "ButtonCreate"),
                        TextXAlignment = Enum.TextXAlignment.Center,
                        OnClick = function()
                            v32.onClick(v42);
                        end,
                        Style = "Round"
                    })
                });
            else
                v39[v42] = v2.createElement(v21, {
                    LabelColumnWidth = l_TerrainDetailsSettings_0.LabelColumnWidth,
                    LayoutOrder = v36:getNextOrder(),
                    TerrainDetail = v43,
                    TerrainFace = v42,
                    OnDelete = function()
                        v32.onDelete(v43);
                    end
                });
            end;
        end;
        return v2.createElement(l_ExpandablePane_0, {
            LayoutOrder = l_props_1.LayoutOrder,
            ContentPadding = l_TerrainDetailsSettings_0.ContentPadding,
            ContentSpacing = l_TerrainDetailsSettings_0.ItemSpacing,
            Text = l_Localization_1:getText("TerrainDetails", "TerrainDetails"),
            Style = l_TerrainDetailsSettings_0.CustomExpandablePane,
            Expanded = l_props_1.ExpandedPane,
            OnExpandedChanged = v32.onExpandedChanged
        }, v39);
    else
        return v2.createElement(l_Pane_0);
    end;
end;
return v4.connect(function(v44, v45)
    return {
        Material = v45.MockMaterial or v44.MaterialBrowserReducer.Material,
        ExpandedPane = v44.MaterialBrowserReducer.ExpandedPane[v25.TerrainDetailsSettings]
    };
end, function(v46)
    return {
        dispatchSetExpandedPane = function(v47, v48)
            v46(v16(v47, v48));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v18,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v27)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Controllers_0 = l_Parent_0.Src.Controllers;
local v7 = require(l_Controllers_0.ImportAssetHandler);
local v8 = require(l_Controllers_0.GeneralServiceController);
local v9 = require(l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor.LabeledElement);
local v10 = require(l_Parent_0.Src.Components.PromptSelectorWithPreview);
local v11 = require(l_Parent_0.Src.Resources.Constants.getErrorTypes)();
local v12 = v1.PureComponent:extend("TextureMapSelector");
v12.init = function(v13)
    v13.state = {
        importAsset = {},
        uploading = false
    };
    v13.errorMessage = nil;
    v13.checkIsMounted = function()
        return v13._isMounted;
    end;
    v13.setImportAsset = function(v14, v15)
        if v13.checkIsMounted() then
            if not (not v14 or not v15) and (not v13.errorMessage or v13.errorMessage == "") then
                v13:setState({
                    importAsset = {
                        file = v14,
                        tempId = v15
                    }
                });
                return ;
            else
                v13:setState({
                    importAsset = {}
                });
                return ;
            end;
        else
            return ;
        end;
    end;
    v13.clearTextureMap = function()
        local l_props_0 = v13.props;
        l_props_0.GeneralServiceController:setTextureMap(l_props_0.PBRMaterial, l_props_0.MapType, "");
        v13.setImportAsset(nil);
    end;
    v13.setUploading = function(v17)
        if v13.checkIsMounted() then
            v13:setState({
                uploading = v17
            });
            return ;
        else
            return ;
        end;
    end;
    v13.updateTextureMap = function(v18, v19, v20)
        local l_props_1 = v13.props;
        l_props_1.GeneralServiceController:setTextureMap(l_props_1.PBRMaterial, l_props_1.MapType, v18);
        l_props_1.Analytics:report(v19);
        v13.errorMessage = v20;
        v13.setImportAsset(nil);
        v13.setUploading(false);
    end;
    v13.promptSelection = function()
        local l_props_2 = v13.props;
        l_props_2.GeneralServiceController:setTextureMapFromFile(l_props_2.PBRMaterial, l_props_2.MapType, l_props_2.ImportAssetHandler, v13.setUploading, v13.setImportAsset, v13.updateTextureMap);
    end;
    v13.onFocusLost = function(v23, v24)
        local l_props_3 = v13.props;
        local l_Text_0 = v24.Text;
        if v23 then
            if not l_Text_0 or l_Text_0 == "" then
                v13.clearTextureMap();
                return ;
            else
                l_props_3.GeneralServiceController:setTextureMapFromURL(l_props_3.PBRMaterial, l_props_3.MapType, l_Text_0, v13.checkIsMounted, v13.updateTextureMap);
                return ;
            end;
        else
            return ;
        end;
    end;
end;
v12.didMount = function(v27)
    v27._isMounted = true;
end;
v12.willUnmount = function(v28)
    v28._isMounted = false;
end;
v12.didUpdate = function(v29, v30)
    if v30.PBRMaterial ~= v29.props.PBRMaterial then
        v29:setState({
            importAsset = {},
            uploading = false
        });
        v29.errorMessage = nil;
    end;
end;
v12.render = function(v31)
    local l_props_4 = v31.props;
    local l_state_0 = v31.state;
    local l_Localization_1 = l_props_4.Localization;
    local v35 = "";
    local v36 = "";
    local v37 = false;
    local l_PBRMaterial_0 = l_props_4.PBRMaterial;
    if l_state_0.importAsset and l_state_0.importAsset.tempId or l_PBRMaterial_0[l_props_4.MapType] ~= "" then
        v35 = if not l_state_0.importAsset.file then l_PBRMaterial_0[l_props_4.MapType] else l_state_0.importAsset.file.Name;
        if (not (l_state_0.uploading == true) or not l_state_0.importAsset) or not l_state_0.importAsset.tempId then
            v36 = l_PBRMaterial_0[l_props_4.MapType];
            v37 = false;
        else
            v36 = l_state_0.importAsset.tempId;
            v37 = true;
        end;
    end;
    local v39 = nil;
    local v40 = nil;
    if l_PBRMaterial_0[l_props_4.MapType] == "" then
        if (v31.errorMessage and v31.errorMessage ~= "") and v31.errorMessage ~= v11.FailedToInsertAssetManager then
            v39 = Enum.PropertyStatus.Error;
            v40 = l_Localization_1:getText("CreateDialog", v31.errorMessage);
        end;
    elseif v31.errorMessage == v11.FailedToInsertAssetManager then
        v39 = Enum.PropertyStatus.Warning;
        v40 = l_Localization_1:getText("CreateDialog", v31.errorMessage);
    else
        v39 = Enum.PropertyStatus.Ok;
        v31.errorMessage = nil;
    end;
    return v1.createElement(v9, {
        FillDirection = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_4.LayoutOrder,
        LabelColumnWidth = l_props_4.LabelColumnWidth,
        Text = l_props_4.Text,
        StatusText = v40,
        Status = v39
    }, {
        v1.createElement(v10, {
            SelectionName = v35,
            PreviewTitle = l_props_4.PreviewTitle,
            IsTempId = v37,
            ImageId = v36,
            LabelWidth = l_props_4.LabelWidth,
            PromptSelection = v31.promptSelection,
            SearchUrl = l_PBRMaterial_0[l_props_4.MapType],
            ClearSelection = v31.clearTextureMap,
            OnFocusLost = v31.onFocusLost,
            ColumnWidth = l_props_4.ColumnWidth
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v8,
    Localization = l_Localization_0,
    ImportAssetHandler = v7
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local v13 = require(l_Parent_0.Src.Actions.SetExpandedPane);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v15 = require(l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor.TextureMapSelector);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v17 = require(l_Constants_0.getSettingsNames);
local v18 = require(l_Constants_0.getTextureMapNames)();
local v19 = v17();
local v20 = v1.PureComponent:extend("TextureSettings");
v20.init = function(v21)
    v21.onExpandedChanged = function()
        local l_props_0 = v21.props;
        l_props_0.dispatchSetExpandedPane(v19.TextureSettings, not l_props_0.ExpandedPane);
    end;
end;
v20.render = function(v23)
    local l_props_1 = v23.props;
    local l_TextureSettings_0 = l_props_1.Stylizer.TextureSettings;
    local l_Localization_1 = l_props_1.Localization;
    if l_props_1.PBRMaterial then
        local v27 = l_LayoutOrderIterator_0.new();
        local v28 = {
            ImportColorMap = v1.createElement(v15, {
                LayoutOrder = v27:getNextOrder(),
                LabelColumnWidth = l_TextureSettings_0.LabelColumnWidth,
                LabelWidth = l_TextureSettings_0.LabelWidth,
                MapType = v18.ColorMap,
                PreviewTitle = l_Localization_1:getText("Import", "ColorMapPreview"),
                Text = l_Localization_1:getText("CreateDialog", "ImportColorMap"),
                PBRMaterial = l_props_1.PBRMaterial,
                ColumnWidth = l_TextureSettings_0.ColumnWidth
            }),
            ImportMetalnessMap = v1.createElement(v15, {
                LayoutOrder = v27:getNextOrder(),
                LabelColumnWidth = l_TextureSettings_0.LabelColumnWidth,
                LabelWidth = l_TextureSettings_0.LabelWidth,
                MapType = v18.MetalnessMap,
                PreviewTitle = l_Localization_1:getText("Import", "MetalnessMapPreview"),
                Text = l_Localization_1:getText("CreateDialog", "ImportMetalnessMap"),
                PBRMaterial = l_props_1.PBRMaterial,
                ColumnWidth = l_TextureSettings_0.ColumnWidth
            }),
            ImportNormalMap = v1.createElement(v15, {
                LayoutOrder = v27:getNextOrder(),
                LabelColumnWidth = l_TextureSettings_0.LabelColumnWidth,
                LabelWidth = l_TextureSettings_0.LabelWidth,
                MapType = v18.NormalMap,
                PreviewTitle = l_Localization_1:getText("Import", "NormalMapPreview"),
                Text = l_Localization_1:getText("CreateDialog", "ImportNormalMap"),
                PBRMaterial = l_props_1.PBRMaterial,
                ColumnWidth = l_TextureSettings_0.ColumnWidth
            }),
            ImportRoughnessMap = v1.createElement(v15, {
                LayoutOrder = v27:getNextOrder(),
                LabelColumnWidth = l_TextureSettings_0.LabelColumnWidth,
                LabelWidth = l_TextureSettings_0.LabelWidth,
                MapType = v18.RoughnessMap,
                PreviewTitle = l_Localization_1:getText("Import", "RoughnessMapPreview"),
                Text = l_Localization_1:getText("CreateDialog", "ImportRoughnessMap"),
                PBRMaterial = l_props_1.PBRMaterial,
                ColumnWidth = l_TextureSettings_0.ColumnWidth
            })
        };
        if not l_props_1.Expandable then
            return v1.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                LayoutOrder = l_props_1.LayoutOrder,
                Layout = Enum.FillDirection.Vertical,
                Spacing = l_TextureSettings_0.ItemSpacing,
                HorizontalAlignment = Enum.HorizontalAlignment.Left
            }, v28);
        else
            return v1.createElement(l_ExpandablePane_0, {
                LayoutOrder = l_props_1.LayoutOrder,
                ContentPadding = l_TextureSettings_0.ContentPadding,
                ContentSpacing = l_TextureSettings_0.ItemSpacing,
                Text = l_Localization_1:getText("MaterialTextures", "TextureMaps"),
                Style = l_TextureSettings_0.CustomExpandablePane,
                Expanded = l_props_1.ExpandedPane,
                OnExpandedChanged = v23.onExpandedChanged
            }, v28);
        end;
    else
        return v1.createElement(l_Pane_0);
    end;
end;
return v2.connect(function(v29)
    return {
        ExpandedPane = v29.MaterialBrowserReducer.ExpandedPane[v19.TextureSettings]
    };
end, function(v30)
    return {
        dispatchSetExpandedPane = function(v31, v32)
            v30(v13(v31, v32));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v20)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_SelectInput_0 = l_UI_0.SelectInput;
local v16 = require(l_Parent_0.Src.Actions.SetExpandedPane);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v18 = require(l_Parent_0.Src.Controllers.GeneralServiceController);
local v19 = require(l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor.LabeledElement);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v21 = require(l_Constants_0.getMaterialPatterns);
local v22 = require(l_Constants_0.getMaterialPatternName);
local v23 = require(l_Constants_0.getSettingsNames);
local l_Util_0 = l_Parent_0.Src.Util;
local v25 = require(l_Util_0.getNumberFromText);
local v26 = require(l_Util_0.getTextFromNumber);
local v27 = v21();
local v28 = v23();
local v29 = v2.PureComponent:extend("TilingSettings");
v29.init = function(v30)
    v30.state = {
        studsPerTile = v26(v30.props.PBRMaterial.StudsPerTile)
    };
    v30.materialPatterns = {};
    v30.onStudsPerTileChanged = function(v31)
        v30:setState({
            studsPerTile = v31
        });
    end;
    v30.setStudsPerTileStatus = function(v32)
        v30:setState({
            studsPerTileMessage = v32 or v2.None,
            status = if not v32 then Enum.PropertyStatus.Ok else Enum.PropertyStatus.Warning
        });
    end;
    v30.onFocusLost = function()
        local l_props_0 = v30.props;
        local l_Localization_1 = l_props_0.Localization;
        local v35 = v25(v30.state.studsPerTile);
        if not v35 then
            v30:setState({
                studsPerTile = v26(v30.props.PBRMaterial.StudsPerTile)
            });
            v30.setStudsPerTileStatus(l_Localization_1:getText("CreateDialog", "ErrorStudsPerTile"));
            return ;
        else
            l_props_0.GeneralServiceController:setStudsPerTile(l_props_0.PBRMaterial, v35);
            v30.setStudsPerTileStatus(nil);
            return ;
        end;
    end;
    v30.onMaterialPatternSelected = function(v36, v37)
        local l_props_1 = v30.props;
        if v36 then
            l_props_1.GeneralServiceController:setMaterialPattern(l_props_1.PBRMaterial, v27[v37]);
        end;
    end;
    v30.onExpandedChanged = function()
        local l_props_2 = v30.props;
        l_props_2.dispatchSetExpandedPane(v28.TilingSettings, not l_props_2.ExpandedPane);
    end;
end;
v29.didMount = function(v40)
    local l_Localization_2 = v40.props.Localization;
    for _, v43 in ipairs(v27) do
        table.insert(v40.materialPatterns, l_Localization_2:getText("MaterialPatterns", v22(v43)));
    end;
    v40:setState({});
end;
v29.didUpdate = function(v44, _, v46)
    if v44.state.studsPerTile ~= v26(v44.props.PBRMaterial.StudsPerTile) and v46.studsPerTile == v44.state.studsPerTile then
        v44:setState({
            studsPerTile = v26(v44.props.PBRMaterial.StudsPerTile),
            studsPerTileMessage = v2.None,
            status = Enum.PropertyStatus.Ok
        });
    end;
end;
v29.render = function(v47)
    local l_props_3 = v47.props;
    local l_TilingSettings_0 = l_props_3.Stylizer.TilingSettings;
    local l_Localization_3 = l_props_3.Localization;
    local v51 = l_LayoutOrderIterator_0.new();
    local v52 = 1;
    for v53, v54 in ipairs(v27) do
        if v54 == l_props_3.PBRMaterial.MaterialPattern then
            v52 = v53;
        end;
    end;
    local v55 = {
        StudsPerTile = v2.createElement(v19, {
            LabelColumnWidth = l_props_3.LabelWidth or l_TilingSettings_0.LabelColumnWidth,
            LayoutOrder = v51:getNextOrder(),
            Text = l_Localization_3:getText("MaterialTiling", "StudsPerTile"),
            StatusText = v47.state.studsPerTileMessage,
            Status = v47.state.status
        }, {
            v2.createElement(l_DEPRECATED_TextInput_0, {
                Style = "FilledRoundedBorder",
                Size = l_TilingSettings_0.DialogColumnSize,
                Text = v47.state.studsPerTile,
                OnTextChanged = v47.onStudsPerTileChanged,
                OnFocusLost = v47.onFocusLost
            })
        }),
        MaterialPattern = v2.createElement(v19, {
            LabelColumnWidth = l_props_3.LabelWidth or l_TilingSettings_0.LabelColumnWidth,
            LayoutOrder = v51:getNextOrder(),
            Text = l_Localization_3:getText("MaterialTiling", "Pattern")
        }, {
            v2.createElement(l_SelectInput_0, {
                Style = l_TilingSettings_0.CustomSelectInput,
                Items = v47.materialPatterns,
                Size = l_TilingSettings_0.DialogColumnSize,
                OnItemActivated = v47.onMaterialPatternSelected,
                SelectedIndex = v52
            })
        })
    };
    if not l_props_3.Expandable then
        return v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            LayoutOrder = l_props_3.LayoutOrder,
            Layout = Enum.FillDirection.Vertical,
            Spacing = l_TilingSettings_0.ItemSpacing,
            HorizontalAlignment = Enum.HorizontalAlignment.Left
        }, v55);
    else
        return v2.createElement(l_ExpandablePane_0, {
            LayoutOrder = l_props_3.LayoutOrder,
            ContentPadding = l_TilingSettings_0.ContentPadding,
            ContentSpacing = l_TilingSettings_0.ItemSpacing,
            Text = l_Localization_3:getText("MaterialTiling", "Tiling"),
            Style = l_TilingSettings_0.CustomExpandablePane,
            Expanded = l_props_3.ExpandedPane,
            OnExpandedChanged = v47.onExpandedChanged
        }, v55);
    end;
end;
return v4.connect(function(v56)
    return {
        ExpandedPane = v56.MaterialBrowserReducer.ExpandedPane[v28.TilingSettings],
        Material = v56.MaterialBrowserReducer.Material
    };
end, function(v57)
    return {
        dispatchSetExpandedPane = function(v58, v59)
            v57(v16(v58, v59));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v18,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v29)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local l_MaterialEditor_0 = l_Parent_0.Src.Components.MaterialBrowser.MaterialEditor;
local v14 = require(l_MaterialEditor_0.MaterialHeader);
local v15 = require(l_MaterialEditor_0.MaterialInformation);
local v16 = require(l_MaterialEditor_0.GeneralSettings);
local v17 = require(l_MaterialEditor_0.TextureSettings);
local v18 = require(l_MaterialEditor_0.TilingSettings);
local v19 = require(l_MaterialEditor_0.MaterialOverrides);
local v20 = require(l_MaterialEditor_0.OverrideSettings);
local v21 = require(l_MaterialEditor_0.TerrainDetailsSettings);
local v22 = require(l_MaterialEditor_0.PhysicalSettings);
local v23 = require(l_Parent_0.Src.Resources.Constants.getSupportedMaterials)();
local v24 = v2.PureComponent:extend("MaterialEditor");
v24.render = function(v25)
    local l_props_0 = v25.props;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Size_0 = l_props_0.Size;
    if l_props_0.Material then
        local l_MaterialVariant_0 = l_props_0.Material.MaterialVariant;
        local v30 = v23[l_props_0.Material.Material];
        local v31 = l_LayoutOrderIterator_0.new();
        return v2.createElement(l_ScrollingFrame_0, {
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = l_LayoutOrder_0,
            Size = l_Size_0
        }, {
            Pane = v2.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Vertical
            }, {
                MaterialHeader = v2.createElement(v14, {
                    LayoutOrder = v31:getNextOrder()
                }),
                MaterialInformation = v2.createElement(v15, {
                    LayoutOrder = v31:getNextOrder()
                }),
                GeneralSettings = if not l_MaterialVariant_0 then nil else v2.createElement(v16, {
                    LayoutOrder = v31:getNextOrder(),
                    MaterialVariant = l_MaterialVariant_0
                }),
                TextureSettings = if not l_MaterialVariant_0 then nil else v2.createElement(v17, {
                    LayoutOrder = v31:getNextOrder(),
                    PBRMaterial = l_MaterialVariant_0,
                    Expandable = true
                }),
                OverrideSettings = if not not l_MaterialVariant_0 and v30 then v2.createElement(v20, {
                    LayoutOrder = v31:getNextOrder(),
                    MaterialVariant = l_MaterialVariant_0
                }) else v2.createElement(v19, {
                    LayoutOrder = v31:getNextOrder()
                }),
                TilingSettings = if not l_MaterialVariant_0 then nil else v2.createElement(v18, {
                    LayoutOrder = v31:getNextOrder(),
                    PBRMaterial = l_MaterialVariant_0,
                    Expandable = true
                }),
                TerrainDetailsSettings = if not l_MaterialVariant_0 then nil else v2.createElement(v21, {
                    LayoutOrder = v31:getNextOrder(),
                    MaterialVariant = l_MaterialVariant_0
                }),
                PhysicalSettings = if not l_MaterialVariant_0 then nil else v2.createElement(v22, {
                    LayoutOrder = v31:getNextOrder(),
                    MaterialVariant = l_MaterialVariant_0
                })
            })
        });
    else
        return v2.createElement(l_Pane_0);
    end;
end;
return v3.connect(function(v32, v33)
    return {
        Material = v33.MaterialMock or v32.MaterialBrowserReducer.Material
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0
})(v24)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local v8 = require(l_Parent_0.Src.Controllers.GeneralServiceController);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v10 = require(l_Parent_0.Src.Actions.SetMaterial);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v12 = require(l_Constants_0.getFullMaterialType);
local v13 = require(l_Constants_0.getMaterialName);
local l_MaterialGrid_0 = l_Parent_0.Src.Components.MaterialBrowser.MaterialGrid;
local v15 = require(l_MaterialGrid_0.MaterialListItem);
local v16 = require(l_MaterialGrid_0.MaterialTileItem);
local v17 = v2.PureComponent:extend("MaterialItem");
v17.init = function(v18)
    v18.onClick = function()
        local l_props_0 = v18.props;
        l_props_0.dispatchSetMaterial(l_props_0.MaterialItem);
    end;
    v18.onMouseEnter = function()
        v18:setState({
            hover = true
        });
    end;
    v18.onMouseLeave = function()
        v18:setState({
            hover = false
        });
    end;
    v18.applyToSelection = function()
        local l_props_1 = v18.props;
        local l_MaterialItem_0 = l_props_1.MaterialItem;
        l_props_1.GeneralServiceController:ApplyToSelection(l_MaterialItem_0.Material, if not l_MaterialItem_0.MaterialVariant then nil else l_MaterialItem_0.MaterialVariant.Name);
        l_props_1.Analytics:report("applyToSelectionAction");
    end;
    v18.state = {
        hover = false
    };
end;
v17.render = function(v22)
    local l_props_2 = v22.props;
    local l_Localization_1 = l_props_2.Localization;
    local l_MaterialItem_1 = l_props_2.MaterialItem;
    local v26 = v12(l_MaterialItem_1, l_Localization_1);
    local l_MaterialVariant_0 = l_MaterialItem_1.MaterialVariant;
    local v28 = if l_MaterialVariant_0 then l_MaterialVariant_0.Name else l_Localization_1:getText("Materials", v13(l_MaterialItem_1.Material));
    if l_props_2.ViewType == "List" then
        return v2.createElement(v15, {
            ApplyToSelection = v22.applyToSelection,
            Hover = v22.state.hover,
            LayoutOrder = l_props_2.LayoutOrder,
            Material = l_MaterialItem_1,
            MaterialDescription = v26,
            MaterialName = v28,
            MenuHover = l_props_2.MenuHover,
            OnClick = v22.onClick,
            OnMouseEnter = v22.onMouseEnter,
            OnMouseLeave = v22.onMouseLeave,
            Selected = l_props_2.Material == l_MaterialItem_1,
            Status = l_props_2.MaterialStatus
        });
    else
        return v2.createElement(v16, {
            ApplyToSelection = v22.applyToSelection,
            Hover = v22.state.hover,
            LayoutOrder = l_props_2.LayoutOrder,
            Material = l_MaterialItem_1,
            MaterialDescription = v26,
            MaterialName = v28,
            MaterialTileSize = l_props_2.MaterialTileSize,
            MenuHover = l_props_2.MenuHover,
            OnClick = v22.onClick,
            OnMouseEnter = v22.onMouseEnter,
            OnMouseLeave = v22.onMouseLeave,
            Selected = l_props_2.Material == l_MaterialItem_1,
            Status = l_props_2.MaterialStatus
        });
    end;
end;
return v3.connect(function(v29, v30)
    return {
        Material = v29.MaterialBrowserReducer.Material,
        MaterialStatus = if v30.MaterialItem.MaterialVariant then nil else v29.MaterialBrowserReducer.MaterialStatus[v30.MaterialItem.Material],
        MaterialTileSize = v29.MaterialBrowserReducer.MaterialTileSize,
        MenuHover = v29.MaterialBrowserReducer.MenuHover,
        ViewType = v29.MaterialBrowserReducer.ViewType
    };
end, function(v31)
    return {
        dispatchSetMaterial = function(v32)
            v31(v10(v32));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v8,
    Localization = l_Localization_0
})(v17)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_Button_0 = l_UI_0.Button;
local l_Container_0 = l_UI_0.Container;
local l_Pane_0 = l_UI_0.Pane;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_Components_0 = l_Parent_0.Src.Components;
local v17 = require(l_Components_0.MaterialPreview);
local v18 = require(l_Components_0.StatusIcon);
local v19 = require(l_Parent_0.Src.Util.CalculateFillWidth);
local v20 = v2.PureComponent:extend("MaterialListItem");
v20.render = function(v21)
    local l_props_0 = v21.props;
    local l_Localization_1 = l_props_0.Localization;
    local l_MaterialListItem_0 = l_props_0.Stylizer.MaterialListItem;
    local l_ApplyToSelection_0 = l_props_0.ApplyToSelection;
    local l_Hover_0 = l_props_0.Hover;
    local l_Material_0 = l_props_0.Material;
    local l_MaterialDescription_0 = l_props_0.MaterialDescription;
    local l_MaterialName_0 = l_props_0.MaterialName;
    local l_MaterialVariant_0 = l_Material_0.MaterialVariant;
    local l_Material_1 = l_Material_0.Material;
    local l_Selected_0 = l_props_0.Selected;
    local l_Status_0 = l_props_0.Status;
    local l_Height_0 = l_MaterialListItem_0.Height;
    return v2.createElement(l_Button_0, {
        DisableHover = l_props_0.MenuHover,
        LayoutOrder = l_props_0.LayoutOrder,
        OnClick = l_props_0.OnClick,
        OnMouseEnter = l_props_0.OnMouseEnter,
        OnMouseLeave = l_props_0.OnMouseLeave,
        Style = not l_Selected_0 and "Round" or "RoundActive",
        Size = UDim2.fromScale(1, 1)
    }, {
        Content = v2.createElement(l_Pane_0, {
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Horizontal,
            Spacing = l_MaterialListItem_0.Spacing,
            Size = UDim2.new(1, -10, 1, 0)
        }, {
            MaterialPreview = v2.createElement(v17, {
                Clone = false,
                Hover = l_Hover_0,
                LayoutOrder = 1,
                Material = l_Material_1,
                MaterialVariant = l_MaterialVariant_0,
                Size = UDim2.fromOffset(l_Height_0, l_Height_0),
                Static = true
            }),
            NameLabel = v2.createElement(l_Pane_0, {
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = 2,
                Size = UDim2.new(v19({
                    UDim.new(0, l_Height_0),
                    if not (not not l_MaterialVariant_0 or false) then UDim.new(0, 0) else l_MaterialListItem_0.IconSize.X,
                    if not ((not l_MaterialVariant_0 and l_Status_0) and l_Status_0 ~= Enum.PropertyStatus.Ok) then UDim.new(0, 0) else l_MaterialListItem_0.IconSize.X,
                    if not l_Hover_0 then UDim.new(0, 0) else l_MaterialListItem_0.ButtonSize.X
                }, 0, l_MaterialListItem_0.Spacing), UDim.new(0, l_Height_0))
            }, {
                Name = v2.createElement(l_TextLabel_0, {
                    Size = UDim2.fromScale(1, 1),
                    Text = l_MaterialName_0,
                    TextSize = l_MaterialListItem_0.TextSize,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Center,
                    TextWrapped = false
                })
            }),
            ApplyToSelection = if not l_Hover_0 then nil else v2.createElement(l_Button_0, {
                LayoutOrder = 3,
                OnClick = l_ApplyToSelection_0,
                Position = l_MaterialListItem_0.ApplyIconPosition,
                Size = l_MaterialListItem_0.ButtonSize,
                Style = "Round"
            }, {
                Image = v2.createElement(l_Image_0, {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Position = UDim2.fromScale(0.5, 0.5),
                    Size = l_MaterialListItem_0.IconSize,
                    Style = l_MaterialListItem_0.ApplyIcon
                }),
                Tooltip = v2.createElement(l_Tooltip_0, {
                    Text = l_Localization_1:getText("TopBar", "Apply")
                })
            }),
            MaterialVariantIcon = if not l_MaterialVariant_0 then nil else v2.createElement(l_Container_0, {
                LayoutOrder = 4,
                Size = l_MaterialListItem_0.IconSize
            }, {
                Image = v2.createElement(l_Image_0, {
                    Style = l_MaterialListItem_0.MaterialVariantIcon
                }),
                Tooltip = v2.createElement(l_Tooltip_0, {
                    Text = l_MaterialDescription_0
                })
            }),
            StatusIcon = if not not l_Status_0 and l_Status_0 ~= Enum.PropertyStatus.Ok then v2.createElement(v18, {
                LayoutOrder = 5,
                Material = l_Material_0,
                Size = l_MaterialListItem_0.IconSize,
                Status = l_Status_0
            }) else nil
        })
    });
end;
return l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v20);


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_Button_0 = l_UI_0.Button;
local l_Container_0 = l_UI_0.Container;
local l_Image_0 = l_UI_0.Image;
local l_Pane_0 = l_UI_0.Pane;
local l_TruncatedTextLabel_0 = l_UI_0.TruncatedTextLabel;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_Components_0 = l_Parent_0.Src.Components;
local v17 = require(l_Components_0.MaterialPreview);
local v18 = require(l_Components_0.StatusIcon);
local v19 = v2.PureComponent:extend("MaterialTileItem");
v19.render = function(v20)
    local l_props_0 = v20.props;
    local l_Localization_1 = l_props_0.Localization;
    local l_MaterialTileItem_0 = l_props_0.Stylizer.MaterialTileItem;
    local l_ApplyToSelection_0 = l_props_0.ApplyToSelection;
    local l_Hover_0 = l_props_0.Hover;
    local l_Material_0 = l_props_0.Material;
    local l_MaterialDescription_0 = l_props_0.MaterialDescription;
    local l_MaterialName_0 = l_props_0.MaterialName;
    local l_MaterialVariant_0 = l_Material_0.MaterialVariant;
    local l_MaterialTileSize_0 = l_props_0.MaterialTileSize;
    local l_Material_1 = l_Material_0.Material;
    local l_Selected_0 = l_props_0.Selected;
    local l_Status_0 = l_props_0.Status;
    local v34 = UDim2.fromOffset(l_MaterialTileSize_0, l_MaterialTileSize_0);
    local l_Padding_0 = l_MaterialTileItem_0.Padding;
    local l_TextSize_0 = l_MaterialTileItem_0.TextSize;
    return v2.createElement(l_Button_0, {
        DisableHover = l_props_0.MenuHover,
        LayoutOrder = l_props_0.LayoutOrder,
        OnClick = l_props_0.OnClick,
        OnMouseEnter = l_props_0.OnMouseEnter,
        OnMouseLeave = l_props_0.OnMouseLeave,
        Style = not l_Selected_0 and "Round" or "RoundActive",
        Size = v34
    }, {
        Content = v2.createElement(l_Container_0, {
            Size = v34
        }, {
            MaterialPreview = v2.createElement(v17, {
                Clone = false,
                Hover = l_Hover_0,
                LayoutOrder = 1,
                Material = l_Material_1,
                MaterialVariant = l_MaterialVariant_0,
                Position = UDim2.fromOffset(0, 0),
                Size = v34,
                Static = true
            }),
            Gradient = if l_MaterialTileSize_0 >= 100 then v2.createElement(l_Pane_0, {
                AnchorPoint = Vector2.new(0.5, 1),
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = 2,
                Position = l_MaterialTileItem_0.GradientPosition,
                Size = l_MaterialTileItem_0.GradientSize,
                ZIndex = 2
            }, {
                Gradient = v2.createElement(l_Image_0, {
                    Size = UDim2.fromScale(1, 1),
                    Style = {
                        Image = if not l_Hover_0 then l_MaterialTileItem_0.Gradient else l_MaterialTileItem_0.GradientHover
                    }
                })
            }) else nil,
            NameLabel = if l_MaterialTileSize_0 >= 100 then v2.createElement(l_Pane_0, {
                AnchorPoint = Vector2.new(0, 1),
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = 2,
                Position = UDim2.new(0, l_Padding_0, 1, -l_Padding_0),
                Size = if not l_MaterialVariant_0 then UDim2.new(1, -2 * l_Padding_0, 0, l_TextSize_0) else UDim2.new(1, -2 * l_Padding_0 - l_MaterialTileItem_0.IconSize.X.Offset, 0, l_TextSize_0),
                ZIndex = 3
            }, {
                Name = v2.createElement(l_TruncatedTextLabel_0, {
                    Size = UDim2.fromScale(1, 1),
                    Text = l_MaterialName_0,
                    TextSize = l_TextSize_0,
                    TextTruncate = Enum.TextTruncate.AtEnd,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Top,
                    TextWrapped = false
                })
            }) else nil
        }),
        MaterialVariantIcon = if not l_Material_0.MaterialVariant then nil else v2.createElement(l_Container_0, {
            AnchorPoint = l_MaterialTileItem_0.MaterialVariantIconAnchorPoint,
            LayoutOrder = 2,
            Position = l_MaterialTileItem_0.MaterialVariantIconPosition,
            Size = l_MaterialTileItem_0.IconSize,
            ZIndex = 2
        }, {
            Image = v2.createElement(l_Image_0, {
                Style = l_MaterialTileItem_0.MaterialVariantIcon
            }),
            Tooltip = v2.createElement(l_Tooltip_0, {
                Text = l_MaterialDescription_0
            })
        }),
        StatusIcon = if not not l_Status_0 and l_Status_0 ~= Enum.PropertyStatus.Ok then v2.createElement(v18, {
            LayoutOrder = 3,
            Material = l_Material_0,
            Position = l_MaterialTileItem_0.StatusIconPosition,
            Size = l_MaterialTileItem_0.IconSize,
            Status = l_Status_0,
            ZIndex = 2
        }) else nil,
        ApplyToSelection = if not l_Hover_0 then nil else v2.createElement(l_Button_0, {
            AnchorPoint = l_MaterialTileItem_0.ApplyIconAnchorPoint,
            LayoutOrder = 4,
            OnClick = l_ApplyToSelection_0,
            Position = l_MaterialTileItem_0.ApplyIconPosition,
            Size = l_MaterialTileItem_0.ButtonSize,
            Style = "Round"
        }, {
            Image = v2.createElement(l_Image_0, {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.fromScale(0.5, 0.5),
                Size = l_MaterialTileItem_0.IconSize,
                Style = l_MaterialTileItem_0.ApplyIcon
            }),
            Tooltip = v2.createElement(l_Tooltip_0, {
                Text = l_Localization_1:getText("TopBar", "Apply")
            })
        })
    });
end;
return l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v19);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_InfiniteScrollingGrid_0 = l_UI_0.InfiniteScrollingGrid;
local l_IconButton_0 = l_UI_0.IconButton;
local v14 = require(l_Parent_0.Src.Actions.SetMenuHover);
local v15 = require(l_Parent_0.Src.Components.MaterialBrowser.MaterialGrid.MaterialItem);
local v16 = v2.PureComponent:extend("MaterialGrid");
v16.init = function(v17)
    v17.renderItem = function(v18, v19)
        return v2.createElement(v15, {
            MaterialItem = v19,
            LayoutOrder = v18
        });
    end;
    v17.onMouseEnter = function()
        v17.props.dispatchSetMenuHover(true);
    end;
    v17.onMouseLeave = function()
        v17.props.dispatchSetMenuHover(false);
    end;
end;
v16.render = function(v20)
    local l_props_0 = v20.props;
    local l_MaterialGrid_0 = l_props_0.Stylizer.MaterialGrid;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_MaterialTileSize_0 = l_props_0.MaterialTileSize;
    local l_Size_0 = l_props_0.Size;
    local l_ViewType_0 = l_props_0.ViewType;
    return v2.createElement(l_Pane_0, {
        BackgroundColor = l_MaterialGrid_0.BackgroundColor,
        LayoutOrder = l_LayoutOrder_0,
        Size = l_Size_0
    }, {
        Grid = v2.createElement(l_InfiniteScrollingGrid_0, {
            AbsoluteMax = #l_props_0.MaterialList,
            CellPadding = if l_ViewType_0 == "Grid" then UDim2.fromOffset(l_MaterialGrid_0.GridPadding, l_MaterialGrid_0.GridPadding) else UDim2.fromOffset(l_MaterialGrid_0.ListPadding, l_MaterialGrid_0.ListPadding),
            CellSize = if l_ViewType_0 == "Grid" then UDim2.fromOffset(l_MaterialTileSize_0, l_MaterialTileSize_0) else UDim2.new(1, -20, 0, l_MaterialGrid_0.ListHeight),
            BufferedRows = 2,
            Items = l_props_0.MaterialList,
            Loading = false,
            Padding = l_MaterialGrid_0.Padding,
            RenderItem = v20.renderItem,
            Size = UDim2.fromScale(1, 1),
            ZIndex = 1
        }),
        SidebarButton = if l_props_0.SideBarVisible then nil else v2.createElement(l_IconButton_0, {
            Size = l_MaterialGrid_0.IconSize,
            LeftIcon = l_MaterialGrid_0.ChevronRight,
            IconColor = l_MaterialGrid_0.IconColor,
            OnClick = l_props_0.OnShowButtonClicked or function()
            end,
            OnMouseEnter = v20.onMouseEnter,
            OnMouseLeave = v20.onMouseLeave,
            AnchorPoint = Vector2.new(0, 1),
            Position = UDim2.new(0, 5, 1, -5),
            ZIndex = 2
        })
    });
end;
return v3.connect(function(v27, _)
    return {
        MaterialList = v27.MaterialBrowserReducer.MaterialList,
        MaterialTileSize = v27.MaterialBrowserReducer.MaterialTileSize,
        ViewType = v27.MaterialBrowserReducer.ViewType
    };
end, function(v29)
    return {
        dispatchSetMenuHover = function(v30)
            v29(v14(v30));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v16)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_join_0 = v4.Dash.join;
local l_deepEqual_0 = v4.Util.deepEqual;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_TreeView_0 = v4.UI.TreeView;
local v12 = require(l_Parent_0.Src.Actions.SetPath);
local v13 = require(l_Parent_0.Src.Util.getCategories);
local v14 = require(l_Parent_0.Src.Controllers.MaterialServiceController);
local v15 = v2.PureComponent:extend("SideBar");
v15.updateSelection = function(v16)
    local l_props_0 = v16.props;
    if #l_props_0.Path ~= 0 and v16.state.lastPath ~= l_props_0.Path then
        local v18 = {};
        local function v19(v20, v21, v22)
            table.insert(v18, v21);
            for _, v24 in pairs(v20) do
                if not v24.path or not l_deepEqual_0(v24.path, v22) then
                    if v24.children and next(v16.currentCategory) == nil then
                        v19(v24.children, v24, v22);
                    end;
                else
                    v16.currentCategory = v24;
                end;
            end;
            if next(v16.currentCategory) == nil then
                table.remove(v18, #v18);
            end;
        end;
        v19(v16.categories, {}, l_props_0.Path);
        if not ((not next(v18) or not v16.currentCategory.path) or l_deepEqual_0(v16.categories, v18)) then
            local v25 = {};
            local v26 = {};
            for _, v28 in ipairs(v18) do
                v26[v28] = true;
            end;
            v25[v16.currentCategory] = true;
            if not l_deepEqual_0(v16.state.Selection, v25) then
                v16:setState(function(v29)
                    return {
                        Expansion = l_join_0(v29.Expansion, v26),
                        Selection = v25
                    };
                end);
            end;
        end;
        v16.currentCategory = {};
        v16:setState({
            lastPath = l_props_0.Path
        });
    end;
end;
v15.init = function(v30)
    v30.currentCategory = {};
    v30.onExpansionChange = function(v31)
        v30:setState(function(v32)
            return {
                Expansion = l_join_0(v32.Expansion, v31)
            };
        end);
    end;
    v30.onSelectionChange = function(v33)
        local l_props_1 = v30.props;
        for v35, _ in pairs(v33) do
            l_props_1.MaterialServiceController:setPath(v35.path);
        end;
        l_props_1.Analytics:report("clickOnCategoriesOpen");
        v30:setState({
            Selection = v33
        });
    end;
    v30.state = {
        Expansion = {},
        Selection = {},
        lastPath = {}
    };
end;
v15.didMount = function(v37)
    local l_props_2 = v37.props;
    local l_Localization_1 = l_props_2.Localization;
    local v40 = l_props_2.MaterialServiceController:getRootCategory();
    if not v37.categories then
        v37.categories = v13(v40, l_Localization_1);
        local v41 = v37.categories[1];
        v37:setState({
            Expansion = {
                [v41] = true
            },
            Selection = {
                [v41] = true
            }
        });
    end;
    v37:updateSelection();
end;
v15.didUpdate = function(v42)
    v42:updateSelection();
end;
v15.render = function(v43)
    local l_props_3 = v43.props;
    local l_state_0 = v43.state;
    return v2.createElement(l_TreeView_0, {
        Size = l_props_3.Size,
        ZIndex = l_props_3.ZIndex,
        Expansion = l_state_0.Expansion,
        Selection = l_state_0.Selection,
        RootItems = v43.categories or {},
        OnExpansionChange = v43.onExpansionChange,
        OnSelectionChange = v43.onSelectionChange
    });
end;
return v3.connect(function(v46, _)
    return {
        Path = v46.MaterialBrowserReducer.Path
    };
end, function(v48)
    return {
        dispatchSetPath = function(v49)
            v48(v12(v49));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    MaterialServiceController = v14
})(v15)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local l_StyleModifier_0 = v3.Util.StyleModifier;
local l_withContext_0 = v3.ContextServices.withContext;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_Button_0 = l_UI_0.Button;
local l_Image_0 = l_UI_0.Image;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v11 = v2.PureComponent:extend("ActionButton");
v11.render = function(v12)
    local l_props_0 = v12.props;
    local l_ButtonSize_0 = l_props_0.Stylizer.ActionButton.ButtonSize;
    local v15 = nil;
    if not l_props_0.IsDisabled then
        if l_props_0.IsPressed then
            v15 = l_StyleModifier_0.Pressed;
        end;
    else
        v15 = l_StyleModifier_0.Disabled;
    end;
    return v2.createElement(l_Button_0, {
        LayoutOrder = l_props_0.LayoutOrder,
        OnClick = l_props_0.OnClick,
        Size = l_ButtonSize_0,
        Style = "Round",
        StyleModifier = v15
    }, {
        Image = v2.createElement(l_Image_0, {
            Style = l_props_0.ImageStyle,
            StyleModifier = v15
        }),
        Tooltip = v2.createElement(l_Tooltip_0, {
            Text = l_props_0.TooltipText
        })
    });
end;
return l_withContext_0({
    Stylizer = l_Stylizer_0
})(v11);


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Button_0 = l_UI_0.Button;
local l_Pane_0 = l_UI_0.Pane;
local l_Slider_0 = l_UI_0.Slider;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v15 = require(l_Parent_0.Src.Resources.Constants.getViewTypes);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v17 = require(l_Parent_0.Src.Controllers.PluginController);
local v18 = require(l_Parent_0.Src.Actions.SetMaterialTileSize);
local v19 = v15();
local v20 = v2.PureComponent:extend("ViewTypeButton");
v20.init = function(v21)
    v21.selectMaterialTileSize = function(v22)
        local l_props_0 = v21.props;
        l_props_0.dispatchSetMaterialTileSize(v22);
        l_props_0.PluginController:setMaterialTileSize(v22);
    end;
end;
v20.render = function(v24)
    local l_props_1 = v24.props;
    local l_ViewTypeButton_0 = l_props_1.Stylizer.ViewTypeButton;
    return v2.createElement(l_Pane_0, {
        BackgroundColor = l_ViewTypeButton_0.ViewTypeBackground,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_1.LayoutOrder,
        Size = if l_props_1.ViewType == v19.Grid then UDim2.new(1, 0, 0, 60) else UDim2.new(1, 0, 0, 40)
    }, {
        Button = v2.createElement(l_Button_0, {
            Size = UDim2.new(1, 0, 0, 40),
            LayoutOrder = l_props_1.LayoutOrder,
            OnClick = l_props_1.OnClick
        }, {
            ImageContainer = v2.createElement(l_Pane_0, {
                LayoutOrder = 1,
                Size = UDim2.fromOffset(40, 40)
            }, {
                Image = v2.createElement(l_Image_0, {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Position = UDim2.fromScale(0.5, 0.5),
                    Size = UDim2.fromOffset(16, 16),
                    Style = {
                        Image = if l_props_1.ViewType == v19.Grid then l_ViewTypeButton_0.Grid else l_ViewTypeButton_0.List
                    }
                })
            }),
            Label = v2.createElement(l_TextLabel_0, {
                LayoutOrder = 2,
                Size = UDim2.new(1, -40, 1, 0),
                Text = l_props_1.Localization:getText("ViewType", l_props_1.ViewType),
                TextXAlignment = Enum.TextXAlignment.Left
            }, {
                Padding = v2.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, 40)
                })
            })
        }),
        Slider = if l_props_1.ViewType == v19.Grid then v2.createElement(l_Slider_0, {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Disabled = false,
            Value = v24.props.MaterialTileSize,
            Min = 60,
            Max = 200,
            LayoutOrder = 2,
            OnValueChanged = v24.selectMaterialTileSize,
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = UDim2.new(1, 0, 0, 20),
            SnapIncrement = 10,
            VerticalDragTolerance = 300
        }) else nil
    });
end;
return v3.connect(function(v27)
    return {
        MaterialTileSize = v27.MaterialBrowserReducer.MaterialTileSize
    };
end, function(v28)
    return {
        dispatchSetMaterialTileSize = function(v29)
            v28(v18(v29));
        end
    };
end)((l_withContext_0({
    Localization = l_Localization_0,
    PluginController = v17,
    Stylizer = l_Stylizer_0
})(v20)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_withContext_0 = v4.ContextServices.withContext;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_SelectInput_0 = l_UI_0.SelectInput;
local v10 = require(l_Parent_0.Src.Resources.Constants.getViewTypes);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local v12 = require(l_Parent_0.Src.Controllers.PluginController);
local v13 = require(l_Parent_0.Src.Components.MaterialBrowser.TopBar.ViewTypeButton);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v15 = require(l_Actions_0.SetMenuHover);
local v16 = require(l_Actions_0.SetViewType);
local v17 = v10();
local v18 = v2.PureComponent:extend("ViewTypeSelector");
v18.init = function(v19)
    v19.selectViewType = function(v20, _)
        v19.props.dispatchSetViewType(v20);
        v19.props.dispatchSetMenuHover(false);
        v19.props.PluginController:setViewType(v20);
    end;
    v19.onRenderViewType = function(v22, v23, v24)
        return v2.createElement(v13, {
            LayoutOrder = v23,
            OnClick = v24,
            ViewType = v22
        });
    end;
    v19.onMouseEnter = function()
        v19.props.dispatchSetMenuHover(true);
    end;
    v19.onMouseLeave = function()
        v19.props.dispatchSetMenuHover(false);
    end;
end;
v18.render = function(v25)
    local l_props_0 = v25.props;
    local l_ViewTypeButton_0 = l_props_0.Stylizer.ViewTypeButton;
    return v2.createElement(l_Pane_0, {
        LayoutOrder = l_props_0.LayoutOrder,
        Size = l_ViewTypeButton_0.ViewTypeSize
    }, {
        SelectInput = v2.createElement(l_SelectInput_0, {
            Icons = {
                l_ViewTypeButton_0.Grid,
                l_ViewTypeButton_0.List
            },
            Items = {
                v17.Grid,
                v17.List
            },
            HideText = true,
            OnItemActivated = v25.selectViewType,
            OnRenderItem = v25.onRenderViewType,
            OnMouseEnter = v25.onMouseEnter,
            OnMouseLeave = v25.onMouseLeave,
            SelectedIndex = l_props_0.ViewType == v17.Grid and 1 or 2,
            Size = l_ViewTypeButton_0.ViewTypeSize
        })
    });
end;
return v3.connect(function(v28)
    return {
        ViewType = v28.MaterialBrowserReducer.ViewType
    };
end, function(v29)
    return {
        dispatchSetViewType = function(v30)
            v29(v16(v30));
        end,
        dispatchSetMenuHover = function(v31)
            v29(v15(v31));
        end
    };
end)((l_withContext_0({
    PluginController = v12,
    Stylizer = l_Stylizer_0
})(v18)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_withAbsoluteSize_0 = v4.Wrappers.withAbsoluteSize;
local l_join_0 = v4.Dash.join;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_SearchBar_0 = l_UI_0.SearchBar;
local l_Pane_0 = l_UI_0.Pane;
local v16 = require(l_Parent_0.Src.Actions.SetMaterialVariant);
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local l_Controllers_0 = l_Parent_0.Src.Controllers;
local v19 = require(l_Controllers_0.GeneralServiceController);
local v20 = require(l_Controllers_0.MaterialServiceController);
local v21 = require(l_Controllers_0.PluginController);
local l_Components_0 = l_Parent_0.Src.Components;
local v23 = require(l_Components_0.MaterialBrowser.MaterialEditor);
local l_TopBar_0 = l_Components_0.MaterialBrowser.TopBar;
local v25 = require(l_TopBar_0.ActionButton);
local v26 = require(l_TopBar_0.ViewTypeSelector);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v28 = require(l_Constants_0.getMaterialName);
local v29 = require(l_Constants_0.getMaterialPath);
local v30 = require(l_Constants_0.getSupportedMaterials);
local v31 = require(l_Parent_0.Src.Flags.getFFlagMaterialActionAsTool);
local l_game_FastInt_0 = game:GetFastInt("InfluxReportMaterialManagerHundrethPercent2");
local v33 = v30();
local v34 = v2.PureComponent:extend("TopBar");
local v35 = not v31() and 3 or 2;
v34.init = function(v36)
    v36.createMaterialVariant = function()
        local l_props_0 = v36.props;
        local v38 = if not l_props_0.Material then l_props_0.MaterialServiceController:getCategoryDefaultMaterial(l_props_0.Path) else l_props_0.Material.Material;
        if not v33[v38] then
            v38 = Enum.Material.Plastic;
        end;
        local v39 = l_props_0.GeneralServiceController:createMaterialVariant(v38, l_props_0.Search);
        l_props_0.Analytics:report("newMaterialVariant", {
            BaseMaterial = v28(v38)
        }, l_game_FastInt_0);
        l_props_0.Analytics:report("newMaterialVariantCounter");
        l_props_0.MaterialServiceController:setPath(v29(v38));
        l_props_0.dispatchSetMaterialVariant(v39);
        v23 = v2.createElement(v23, {
            LayoutOrder = 1,
            Size = UDim2.fromScale(1, 1)
        });
    end;
    v36.showInExplorer = function()
        local l_props_1 = v36.props;
        if not (not l_props_1.Material or not l_props_1.Material.MaterialVariant) then
            l_props_1.GeneralServiceController:SetSelection({
                l_props_1.Material.MaterialVariant
            });
            l_props_1.Analytics:report("showInExplorer");
        end;
    end;
    v36.DEPRECATED_materialAsTool = function()
        local l_props_2 = v36.props;
        if l_props_2.DEPRECATED_ActiveAsTool or not l_props_2.Material then
            if l_props_2.DEPRECATED_ActiveAsTool then
                l_props_2.PluginController:DEPRECATED_untoggleMaterialAsTool();
            end;
        else
            l_props_2.PluginController:DEPRECATED_toggleMaterialAsTool();
        end;
        l_props_2.Analytics:report("materialAsTool");
    end;
    v36.setSearch = function(v42)
        local l_props_3 = v36.props;
        l_props_3.MaterialServiceController:setSearch(v42);
        l_props_3.Analytics:report("searchBar");
    end;
end;
v34.render = function(v44)
    local l_props_4 = v44.props;
    local l_TopBar_1 = l_props_4.Stylizer.TopBar;
    local l_LayoutOrder_0 = l_props_4.LayoutOrder;
    local l_Size_0 = l_props_4.Size;
    local l_Localization_1 = l_props_4.Localization;
    local v50 = l_LayoutOrderIterator_0.new();
    local l_CreateNewVariant_0 = l_TopBar_1.CreateNewVariant;
    local l_ShowInExplorer_0 = l_TopBar_1.ShowInExplorer;
    local v53 = if not v31() then l_TopBar_1.DEPRECATED_MaterialAsToolMouseIcon else nil;
    local l_BackgroundColor_0 = l_TopBar_1.BackgroundColor;
    local l_Offset_0 = l_TopBar_1.ButtonSize.X.Offset;
    local l_Padding_0 = l_TopBar_1.Padding;
    local l_SpacerWidth_0 = l_TopBar_1.SpacerWidth;
    local l_SearchBarMaxWidth_0 = l_TopBar_1.SearchBarMaxWidth;
    local l_TopBarButtonWidth_0 = l_TopBar_1.TopBarButtonWidth;
    local l_Offset_1 = l_TopBar_1.ViewTypeSize.X.Offset;
    return v2.createElement(l_Pane_0, l_join_0({
        BackgroundColor = l_BackgroundColor_0,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        LayoutOrder = l_LayoutOrder_0,
        Padding = l_Padding_0,
        Size = l_Size_0,
        Spacing = l_Padding_0
    }, l_props_4.WrapperProps), {
        CreateMaterialVariant = v2.createElement(v25, {
            ImageStyle = l_CreateNewVariant_0,
            IsDisabled = false,
            LayoutOrder = v50:getNextOrder(),
            OnClick = v44.createMaterialVariant,
            TooltipText = l_Localization_1:getText("TopBar", "Create")
        }),
        ShowInExplorer = v2.createElement(v25, {
            ImageStyle = l_ShowInExplorer_0,
            IsDisabled = not l_props_4.Material and true or (not l_props_4.Material.MaterialVariant or false),
            LayoutOrder = v50:getNextOrder(),
            OnClick = v44.showInExplorer,
            TooltipText = l_Localization_1:getText("TopBar", "Show")
        }),
        MaterialAsTool = if not v31() then v2.createElement(v25, {
            ImageStyle = v53,
            IsPressed = if not v31() then if not v31() then l_props_4.DEPRECATED_ActiveAsTool else nil else nil,
            LayoutOrder = v50:getNextOrder(),
            OnClick = v44.DEPRECATED_materialAsTool,
            TooltipText = l_Localization_1:getText("TopBar", "MaterialAsTool")
        }) else nil,
        RestPane = v2.createElement(l_Pane_0, {
            Size = UDim2.new(1, -(v35 * (l_Offset_0 + l_Padding_0) + (l_Offset_1 + l_Padding_0)), 1, 0),
            LayoutOrder = v50:getNextOrder()
        }, {
            SearchBar = v2.createElement(l_SearchBar_0, {
                Position = UDim2.new(0.5, 0, 0, 0),
                AnchorPoint = Vector2.new(0.5, 0),
                OnSearchRequested = v44.setSearch,
                PlaceholderText = l_Localization_1:getText("TopBar", "Search"),
                ShowSearchButton = false,
                ShowSearchIcon = true,
                Size = UDim2.new(0, l_SearchBarMaxWidth_0 * math.min(1, (l_props_4.AbsoluteSize.X - (v35 * (l_Offset_0 + l_Padding_0) + (l_Offset_1 + l_Padding_0))) / (2 * l_SpacerWidth_0 + l_SearchBarMaxWidth_0)), 0, l_TopBarButtonWidth_0)
            })
        }),
        ViewType = v2.createElement(v26, {
            LayoutOrder = v50:getNextOrder()
        })
    });
end;
return v3.connect(function(v61)
    return {
        DEPRECATED_ActiveAsTool = if not v31() then v61.MaterialBrowserReducer.DEPRECATED_ActiveAsTool else nil,
        Material = v61.MaterialBrowserReducer.Material,
        Path = v61.MaterialBrowserReducer.Path,
        Search = v61.MaterialBrowserReducer.Search
    };
end, function(v62)
    return {
        dispatchSetMaterialVariant = function(v63)
            v62(v16(v63));
        end
    };
end)(l_withAbsoluteSize_0((l_withContext_0({
    Analytics = l_Analytics_0,
    GeneralServiceController = v19,
    Localization = l_Localization_0,
    MaterialServiceController = v20,
    PluginController = v21,
    Stylizer = l_Stylizer_0
})(v34))));