local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChooseBrushShape);
local v9 = require(l_Actions_0.SetAutoMaterial);
local v10 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v11 = require(l_Actions_0.SetEditPlaneMode);
local v12 = require(l_Actions_0.SetIgnoreWater);
local v13 = require(l_Actions_0.SetIgnoreParts);
local v14 = require(l_Actions_0.SetMaterial);
local v15 = require(l_Actions_0.SetPlaneCFrame);
local v16 = require(l_Actions_0.SetPlaneLock);
local v17 = require(l_Actions_0.SetSnapToVoxels);
local v18 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v19, _)
    return {
        toolName = v18.ToolId.Add,
        autoMaterial = v19.AddTool.autoMaterial,
        baseSize = v19.AddTool.baseSize,
        baseSizeHeightLocked = v19.AddTool.baseSizeHeightLocked,
        brushShape = v19.AddTool.brushShape,
        height = v19.AddTool.height,
        ignoreWater = v19.AddTool.ignoreWater,
        ignoreParts = v19.AddTool.ignoreParts,
        material = v19.AddTool.material,
        pivot = v19.AddTool.pivot,
        planeLock = v19.BaseTool.planeLock,
        snapToVoxels = v19.AddTool.snapToVoxels,
        editPlaneMode = v19.BaseTool.editPlaneMode,
        planeCFrame = v19.BaseTool.planeCFrame
    };
end, function(v21)
    local function _(v22)
        v21(v4("AddTool", v22));
    end;
    local function _(v24)
        v21(v4("BaseTool", v24));
    end;
    return {
        dispatchSetAutoMaterial = function(v26)
            v21(v4("AddTool", (v9(v26))));
        end,
        dispatchChangeBaseSize = function(v27)
            v21(v4("AddTool", (v5(v27))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v28)
            v21(v4("AddTool", (v10(v28))));
        end,
        dispatchChooseBrushShape = function(v29)
            v21(v4("AddTool", (v8(v29))));
        end,
        dispatchChangeHeight = function(v30)
            v21(v4("AddTool", (v6(v30))));
        end,
        dispatchSetIgnoreWater = function(v31)
            v21(v4("AddTool", (v12(v31))));
        end,
        dispatchSetIgnoreParts = function(v32)
            v21(v4("AddTool", (v13(v32))));
        end,
        dispatchSetMaterial = function(v33)
            v21(v4("AddTool", (v14(v33))));
        end,
        dispatchChangePivot = function(v34)
            v21(v4("AddTool", (v7(v34))));
        end,
        dispatchSetPlaneLock = function(v35)
            v21(v4("BaseTool", (v16(v35))));
        end,
        dispatchSetEditPlaneMode = function(v36)
            v21(v4("BaseTool", (v11(v36))));
        end,
        dispatchSetPlaneCFrame = function(v37)
            v21(v4("BaseTool", (v15(v37))));
        end,
        dispatchSetSnapToVoxels = function(v38)
            v21(v4("AddTool", (v17(v38))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.ContextItems);
local l_Button_0 = v1.UI.Button;
local l_Dialog_0 = v1.UI.Dialog;
local v9 = require(l_Parent_0.Src.Actions.ChangeTool);
local l_ToolId_0 = require(l_Parent_0.Src.Util.TerrainEnums).ToolId;
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_TextService_0 = game:GetService("TextService");
local v13 = v2.PureComponent:extend(script.Name);
v13.init = function(v14)
    v14.state = {
        showingDialog = false
    };
    v14.onYesClicked = function()
        if not v14.state.clearing then
            v14:setState({
                clearingStarted = true,
                showingDialog = false
            });
            v14.props.Terrain:get():Clear();
            l_ChangeHistoryService_0:SetWaypoint("Terrain Clear");
            v14.props.dispatchChangeTool(l_ToolId_0.None);
            return ;
        else
            return ;
        end;
    end;
    v14.onNoClicked = function()
        v14.props.dispatchChangeTool(l_ToolId_0.None);
    end;
    v14.onButtonClicked = function(v15)
        if v15 == "yes" then
            v14.onYesClicked();
            return ;
        else
            if v15 == "no" then
                v14.onNoClicked();
            end;
            return ;
        end;
    end;
end;
v13.didMount = function(v16)
    spawn(function()
        v16:setState({
            showingDialog = true
        });
    end);
end;
v13.render = function(v17)
    local v18 = v17.props.Theme:get();
    local l_Localization_0 = v17.props.Localization;
    if v17.state.showingDialog then
        local l_x_0 = l_TextService_0:GetTextSize(l_Localization_0:getText("ClearTool", "ConfirmationMessage"), v18.textSize, v18.font, Vector2.new()).x;
        local v21 = math.max(168, (48 + l_x_0) + 8);
        local v22 = {
            {
                Key = "no",
                Text = l_Localization_0:getText("Confirmation", "No"),
                Style = "Round"
            },
            {
                Key = "yes",
                Text = l_Localization_0:getText("Confirmation", "Yes"),
                Style = "RoundPrimary"
            }
        };
        local v23 = {
            UIListLayout = v2.createElement("UIListLayout", {
                Padding = UDim.new(0, 8),
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Top
            })
        };
        local function v27(v24, v25, v26)
            return v2.createElement(l_Button_0, {
                LayoutOrder = v25,
                OnClick = v26,
                Size = UDim2.new(0, 72, 0, 24),
                Style = v24.Style,
                Text = v24.Text
            });
        end;
        for v28, v29 in ipairs(v22) do
            table.insert(v23, v27(v29, v28, function()
                v17.onButtonClicked(v29.Key);
            end));
        end;
        return v2.createElement(l_Dialog_0, {
            Title = l_Localization_0:getText("ClearTool", "ConfirmationTitle"),
            Size = Vector2.new(v21, 80),
            MinSize = Vector2.new(v21, 80),
            Resizable = false,
            Modal = true,
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            Enabled = true,
            OnClose = v17.onNoClicked
        }, {
            Background = v2.createElement("Frame", {
                Position = UDim2.new(0, 0, 0, 0),
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundColor3 = v18.backgroundColor
            }, {
                UIPadding = v2.createElement("UIPadding", {
                    PaddingBottom = UDim.new(0, 8),
                    PaddingLeft = UDim.new(0, 8),
                    PaddingRight = UDim.new(0, 8),
                    PaddingTop = UDim.new(0, 8)
                }),
                Content = v2.createElement("Frame", {
                    AnchorPoint = Vector2.new(0.5, 0),
                    Position = UDim2.new(0.5, 0, 0, 0),
                    Size = UDim2.new(1, 0, 1, -32),
                    BackgroundTransparency = 1
                }, {
                    Icon = v2.createElement("ImageLabel", {
                        Size = UDim2.new(0, 32, 0, 32),
                        BackgroundTransparency = 1,
                        Image = "rbxasset://textures/DevConsole/Info.png"
                    }),
                    Message = v2.createElement("TextLabel", {
                        Position = UDim2.new(0, 40, 0, 0),
                        Size = UDim2.new(0, l_x_0, 1, 0),
                        BackgroundTransparency = 1,
                        Text = l_Localization_0:getText("ClearTool", "ConfirmationMessage"),
                        Font = v18.font,
                        TextSize = v18.textSize,
                        TextColor3 = v18.textColor,
                        TextYAlignment = Enum.TextYAlignment.Top
                    })
                }),
                Buttons = v2.createElement("Frame", {
                    AnchorPoint = Vector2.new(0.5, 1),
                    Position = UDim2.new(0.5, 0, 1, 0),
                    Size = UDim2.new(1, 0, 0, 24),
                    BackgroundTransparency = 1
                }, v23)
            })
        });
    else
        return nil;
    end;
end;
return v3.connect(nil, function(v30)
    return {
        dispatchChangeTool = function(v31)
            v30(v9(v31));
        end
    };
end)((l_withContext_0({
    Theme = v6.DEPRECATED_Theme,
    Localization = l_ContextServices_0.Localization,
    Terrain = v6.Terrain
})(v13)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChooseBrushShape);
local v9 = require(l_Actions_0.SetAutoMaterial);
local v10 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v11 = require(l_Actions_0.SetBrushMode);
local v12 = require(l_Actions_0.SetEditPlaneMode);
local v13 = require(l_Actions_0.SetIgnoreWater);
local v14 = require(l_Actions_0.SetIgnoreParts);
local v15 = require(l_Actions_0.SetMaterial);
local v16 = require(l_Actions_0.SetPlaneCFrame);
local v17 = require(l_Actions_0.SetPlaneLock);
local v18 = require(l_Actions_0.SetSnapToVoxels);
local v19 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v20, _)
    return {
        toolName = v19.ToolId.Draw,
        autoMaterial = v20.DrawTool.autoMaterial,
        baseSize = v20.DrawTool.baseSize,
        baseSizeHeightLocked = v20.DrawTool.baseSizeHeightLocked,
        brushMode = v20.DrawTool.brushMode,
        brushShape = v20.DrawTool.brushShape,
        height = v20.DrawTool.height,
        ignoreWater = v20.DrawTool.ignoreWater,
        ignoreParts = v20.DrawTool.ignoreParts,
        material = v20.DrawTool.material,
        pivot = v20.DrawTool.pivot,
        planeLock = v20.BaseTool.planeLock,
        snapToVoxels = v20.DrawTool.snapToVoxels,
        editPlaneMode = v20.BaseTool.editPlaneMode,
        planeCFrame = v20.BaseTool.planeCFrame
    };
end, function(v22)
    local function _(v23)
        v22(v4("DrawTool", v23));
    end;
    local function _(v25)
        v22(v4("BaseTool", v25));
    end;
    return {
        dispatchSetAutoMaterial = function(v27)
            v22(v4("DrawTool", (v9(v27))));
        end,
        dispatchChangeBaseSize = function(v28)
            v22(v4("DrawTool", (v5(v28))));
        end,
        dispatchChangeHeight = function(v29)
            v22(v4("DrawTool", (v6(v29))));
        end,
        dispatchChangePivot = function(v30)
            v22(v4("DrawTool", (v7(v30))));
        end,
        dispatchChooseBrushShape = function(v31)
            v22(v4("DrawTool", (v8(v31))));
        end,
        dispatchSetBrushMode = function(v32)
            v22(v4("DrawTool", (v11(v32))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v33)
            v22(v4("DrawTool", (v10(v33))));
        end,
        dispatchSetIgnoreWater = function(v34)
            v22(v4("DrawTool", (v13(v34))));
        end,
        dispatchSetIgnoreParts = function(v35)
            v22(v4("DrawTool", (v14(v35))));
        end,
        dispatchSetMaterial = function(v36)
            v22(v4("DrawTool", (v15(v36))));
        end,
        dispatchSetPlaneLock = function(v37)
            v22(v4("BaseTool", (v17(v37))));
        end,
        dispatchSetEditPlaneMode = function(v38)
            v22(v4("BaseTool", (v12(v38))));
        end,
        dispatchSetPlaneCFrame = function(v39)
            v22(v4("BaseTool", (v16(v39))));
        end,
        dispatchSetSnapToVoxels = function(v40)
            v22(v4("DrawTool", (v18(v40))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChangeStrength);
local v9 = require(l_Actions_0.ChooseBrushShape);
local v10 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v11 = require(l_Actions_0.SetEditPlaneMode);
local v12 = require(l_Actions_0.SetIgnoreWater);
local v13 = require(l_Actions_0.SetIgnoreParts);
local v14 = require(l_Actions_0.SetPlaneCFrame);
local v15 = require(l_Actions_0.SetPlaneLock);
local v16 = require(l_Actions_0.SetSnapToVoxels);
local v17 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v18, _)
    return {
        toolName = v17.ToolId.Erode,
        baseSize = v18.ErodeTool.baseSize,
        baseSizeHeightLocked = v18.ErodeTool.baseSizeHeightLocked,
        brushShape = v18.ErodeTool.brushShape,
        height = v18.ErodeTool.height,
        ignoreWater = v18.ErodeTool.ignoreWater,
        ignoreParts = v18.ErodeTool.ignoreParts,
        pivot = v18.ErodeTool.pivot,
        planeLock = v18.BaseTool.planeLock,
        snapToVoxels = v18.ErodeTool.snapToVoxels,
        strength = v18.ErodeTool.strength,
        editPlaneMode = v18.BaseTool.editPlaneMode,
        planeCFrame = v18.BaseTool.planeCFrame
    };
end, function(v20)
    local function _(v21)
        v20(v4("ErodeTool", v21));
    end;
    local function _(v23)
        v20(v4("BaseTool", v23));
    end;
    return {
        dispatchChangeBaseSize = function(v25)
            v20(v4("ErodeTool", (v5(v25))));
        end,
        dispatchChangeHeight = function(v26)
            v20(v4("ErodeTool", (v6(v26))));
        end,
        dispatchChangePivot = function(v27)
            v20(v4("ErodeTool", (v7(v27))));
        end,
        dispatchChangeStrength = function(v28)
            v20(v4("ErodeTool", (v8(v28))));
        end,
        dispatchChooseBrushShape = function(v29)
            v20(v4("ErodeTool", (v9(v29))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v30)
            v20(v4("ErodeTool", (v10(v30))));
        end,
        dispatchSetIgnoreWater = function(v31)
            v20(v4("ErodeTool", (v12(v31))));
        end,
        dispatchSetIgnoreParts = function(v32)
            v20(v4("ErodeTool", (v13(v32))));
        end,
        dispatchSetPlaneLock = function(v33)
            v20(v4("BaseTool", (v15(v33))));
        end,
        dispatchSetEditPlaneMode = function(v34)
            v20(v4("BaseTool", (v11(v34))));
        end,
        dispatchSetPlaneCFrame = function(v35)
            v20(v4("BaseTool", (v14(v35))));
        end,
        dispatchSetSnapToVoxels = function(v36)
            v20(v4("ErodeTool", (v16(v36))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_ToolParts_0 = l_Parent_0.Src.Components.Tools.ToolParts;
local v7 = require(l_ToolParts_0.ButtonGroup);
local v8 = require(l_ToolParts_0.EditSettings);
local v9 = require(l_ToolParts_0.MaterialSettings);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v11 = require(l_Actions_0.ApplyToolAction);
local v12 = require(l_Actions_0.SetMaterial);
local v13 = require(l_Actions_0.SetMergeEmpty);
local v14 = require(l_Parent_0.Src.Util.TerrainEnums);
local v15 = require(l_Parent_0.Src.Components.Functions.TerrainRegionEditor);
local v16 = v2.PureComponent:extend(script.Name);
v16.init = function(v17)
    v17.onFillClicked = function()
        if v17.props.material then
            v15.OnButtonClick();
        end;
    end;
    v17.updateProperties = function()
        v15.ChangeProperties({
            material = v17.props.material,
            mergeEmpty = v17.props.mergeEmpty
        });
    end;
end;
v16.didUpdate = function(v18)
    v18.updateProperties();
end;
v16.didMount = function(v19)
    v19.updateProperties();
end;
v16.render = function(v20)
    return v2.createFragment({
        EditSettings = v2.createElement(v8, {
            LayoutOrder = 1,
            mergeEmpty = v20.props.mergeEmpty,
            setMergeEmpty = v20.props.dispatchSetMergeEmpty
        }),
        MaterialSettings = v2.createElement(v9, {
            LayoutOrder = 2,
            material = v20.props.material,
            setMaterial = v20.props.dispatchSetMaterial
        }),
        FillButtonFrame = v2.createElement(v7, {
            LayoutOrder = 3,
            Buttons = {
                {
                    Key = "Fill",
                    Name = v20.props.Localization:getText("ToolName", "Fill"),
                    Active = true,
                    OnClicked = v20.onFillClicked
                }
            }
        })
    });
end;
return v3.connect(function(v21, _)
    return {
        toolName = v14.ToolId.Fill,
        material = v21.FillTool.material,
        mergeEmpty = v21.FillTool.mergeEmpty
    };
end, function(v23)
    local function _(v24)
        v23(v11("FillTool", v24));
    end;
    return {
        dispatchSetMaterial = function(v26)
            v23(v11("FillTool", (v12(v26))));
        end,
        dispatchSetMergeEmpty = function(v27)
            v23(v11("FillTool", (v13(v27))));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v16)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChangePlanePositionY);
local v9 = require(l_Actions_0.ChangeStrength);
local v10 = require(l_Actions_0.ChooseBrushShape);
local v11 = require(l_Actions_0.ChooseFlattenMode);
local v12 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v13 = require(l_Actions_0.SetFixedPlane);
local v14 = require(l_Actions_0.SetHeightPicker);
local v15 = require(l_Actions_0.SetIgnoreWater);
local v16 = require(l_Actions_0.SetIgnoreParts);
local v17 = require(l_Actions_0.SetSnapToVoxels);
local l_ToolId_0 = require(l_Parent_0.Src.Util.TerrainEnums).ToolId;
return v1.connect(function(v19, _)
    return {
        toolName = l_ToolId_0.Flatten,
        baseSize = v19.FlattenTool.baseSize,
        baseSizeHeightLocked = v19.FlattenTool.baseSizeHeightLocked,
        brushShape = v19.FlattenTool.brushShape,
        fixedPlane = v19.FlattenTool.fixedPlane,
        flattenMode = v19.FlattenTool.flattenMode,
        height = v19.FlattenTool.height,
        heightPicker = v19.FlattenTool.heightPicker,
        ignoreWater = v19.FlattenTool.ignoreWater,
        ignoreParts = v19.FlattenTool.ignoreParts,
        pivot = v19.FlattenTool.pivot,
        planePositionY = v19.FlattenTool.planePositionY,
        snapToVoxels = v19.FlattenTool.snapToVoxels,
        strength = v19.FlattenTool.strength
    };
end, function(v21)
    local function _(v22)
        v21(v4("FlattenTool", v22));
    end;
    return {
        dispatchChangeBaseSize = function(v24)
            v21(v4("FlattenTool", (v5(v24))));
        end,
        dispatchChangeHeight = function(v25)
            v21(v4("FlattenTool", (v6(v25))));
        end,
        dispatchChangePivot = function(v26)
            v21(v4("FlattenTool", (v7(v26))));
        end,
        dispatchChangePlanePositionY = function(v27)
            v21(v4("FlattenTool", (v8(v27))));
        end,
        dispatchChangeStrength = function(v28)
            v21(v4("FlattenTool", (v9(v28))));
        end,
        dispatchChooseBrushShape = function(v29)
            v21(v4("FlattenTool", (v10(v29))));
        end,
        dispatchChooseFlattenMode = function(v30)
            v21(v4("FlattenTool", (v11(v30))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v31)
            v21(v4("FlattenTool", (v12(v31))));
        end,
        dispatchSetFixedPlane = function(v32)
            v21(v4("FlattenTool", (v13(v32))));
        end,
        dispatchSetHeightPicker = function(v33)
            v21(v4("FlattenTool", (v14(v33))));
        end,
        dispatchSetIgnoreWater = function(v34)
            v21(v4("FlattenTool", (v15(v34))));
        end,
        dispatchSetIgnoreParts = function(v35)
            v21(v4("FlattenTool", (v16(v35))));
        end,
        dispatchSetSnapToVoxels = function(v36)
            v21(v4("FlattenTool", (v17(v36))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.ContextItems);
local v7 = require(l_Parent_0.Src.Util.TerrainEnums);
local l_ToolParts_0 = script.Parent.ToolParts;
local v9 = require(l_ToolParts_0.BiomeSettingsFragment);
local v10 = require(l_ToolParts_0.ButtonGroup);
local v11 = require(l_ToolParts_0.MapSettingsWithPreview);
local v12 = require(l_ToolParts_0.OtherGenerateSettings);
local _ = require(l_ToolParts_0.RegionFragment);
local v14 = require(l_ToolParts_0.Panel);
local v15 = require(l_Parent_0.Src.Components.ProgressDialog);
local v16 = require(l_ToolParts_0.RegionFragment);
local _ = require(l_ToolParts_0.VolumeDragger);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v19 = require(l_Actions_0.ApplyToolAction);
local v20 = require(l_Actions_0.ChangePosition);
local v21 = require(l_Actions_0.ChangeSelection);
local v22 = require(l_Actions_0.ChangeSize);
local v23 = require(l_Actions_0.SetBiomeSelection);
local v24 = require(l_Actions_0.SetBiomeSize);
local v25 = require(l_Actions_0.SetHaveCaves);
local v26 = require(l_Actions_0.SetSeed);
local v27 = require(l_Actions_0.SetSnapToVoxels);
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local v29 = v2.PureComponent:extend(script.Name);
v29.init = function(v30)
    v30.warnings = {};
    v30.state = {
        mapSettingsValid = true
    };
    v30.selectBiome = function(v31)
        v30.props.dispatchSetBiomeSelection(v31, not v30.props.biomeSelection[v31]);
    end;
    v30.onBiomeSizeChanged = function(v32)
        local v33 = tonumber(v32);
        if v33 and v33 > 0 then
            v30.props.dispatchSetBiomeSize(v32);
        end;
    end;
    v30.updateGenerateProps = function()
        local l_props_0 = v30.props;
        v30.props.TerrainGeneration:updateSettings({
            position = l_props_0.position,
            size = l_props_0.size,
            biomeSelection = l_props_0.biomeSelection,
            biomeSize = l_props_0.biomeSize,
            haveCaves = l_props_0.haveCaves,
            seed = l_props_0.seed
        });
    end;
    v30.setMapSettingsValidated = function(v35)
        v30:setState({
            mapSettingsValid = v35
        });
    end;
    v30.onSeedFocusLost = function(_, v37)
        v30.props.dispatchSetSeed(v37);
    end;
    v30.tryGenerate = function()
        for v38, v39 in pairs(v30.warnings) do
            if v39 then
                warn(v38 .. " is invalid.");
                return ;
            end;
        end;
        v30.updateGenerateProps();
        v30.props.TerrainGeneration:startGeneration();
    end;
    v30.onGenerationPauseRequested = function()
        v30.props.TerrainGeneration:togglePauseGeneration();
    end;
    v30.onGenerationCancelRequested = function()
        v30.props.TerrainGeneration:cancelGeneration();
    end;
    v30.onRegionChanged = function(v40, v41)
        local l_props_1 = v30.props;
        local l_Position_0 = v40.Position;
        l_props_1.dispatchChangePosition({
            X = l_Position_0.X,
            Y = l_Position_0.Y,
            Z = l_Position_0.Z
        });
        l_props_1.dispatchChangeSize({
            X = v41.X,
            Y = v41.Y,
            Z = v41.Z
        });
    end;
    v30.setWarnings = function(v44)
        v30.warnings = v44;
    end;
end;
v29.didUpdate = function(v45)
    v45.updateGenerateProps();
end;
v29.didMount = function(v46)
    v46.updateGenerateProps();
end;
v29.render = function(v47)
    local l_props_2 = v47.props;
    local l_Localization_0 = l_props_2.Localization;
    local l_position_0 = l_props_2.position;
    local l_size_0 = l_props_2.size;
    local l_biomeSelection_0 = l_props_2.biomeSelection;
    local l_biomeSize_0 = l_props_2.biomeSize;
    local l_haveCaves_0 = l_props_2.haveCaves;
    local l_seed_0 = l_props_2.seed;
    local l_selectBiome_0 = v47.selectBiome;
    local _ = l_props_2.snapToVoxels;
    local l_transform_0 = l_props_2.transform;
    local v59 = l_props_2.TerrainGeneration:isGenerating();
    return v2.createFragment({
        MapSettingsWithPreview = if l_TerrainEditorOverhaul_0 then nil else v2.createElement(v11, {
            toolName = l_props_2.toolName,
            LayoutOrder = 1,
            Position = l_position_0,
            Size = l_size_0,
            OnPositionChanged = l_props_2.dispatchChangePosition,
            OnSizeChanged = l_props_2.dispatchChangeSize,
            SetMapSettingsValid = v47.setMapSettingsValidated,
            SetWarnings = v47.setWarnings
        }),
        RegionSettings = if (not not l_TerrainEditorOverhaul_0 and l_transform_0) and l_size_0 then v2.createElement(v14, {
            Padding = UDim.new(0, 12),
            LayoutOrder = 1,
            isSubsection = false,
            Title = l_Localization_0:getText("SelectionSettings", "SelectionSettings")
        }, {
            Region = v2.createElement(v16, {
                HideWireframe = true,
                LayoutOrder = 1,
                SetRegion = function(v60, v61)
                    l_props_2.dispatchChangeSelection(v60, v61);
                end,
                Size = l_size_0,
                SourceSize = l_size_0,
                SourceTransform = l_transform_0,
                Transform = l_transform_0,
                ToolName = l_props_2.toolName
            })
        }) else nil,
        MaterialSettings = v2.createElement(v14, {
            Title = l_Localization_0:getText("MaterialSettings", "MaterialSettings"),
            LayoutOrder = 2
        }, {
            BiomeSettingsFragment = v2.createElement(v9, {
                LayoutOrder = 1,
                biomeSelection = l_biomeSelection_0,
                selectBiome = l_selectBiome_0,
                biomeSize = l_biomeSize_0,
                setBiomeSize = l_props_2.dispatchSetBiomeSize,
                haveCaves = l_haveCaves_0,
                setHaveCaves = l_props_2.dispatchSetHaveCaves
            })
        }),
        OtherSettings = v2.createElement(v12, {
            LayoutOrder = 3,
            seed = l_seed_0,
            setSeed = l_props_2.dispatchSetSeed
        }),
        GenerateButtonFrame = v2.createElement(v10, {
            LayoutOrder = 4,
            Buttons = {
                {
                    Key = "Generate",
                    Name = l_Localization_0:getText("Generate", "ButtonGenerate"),
                    Active = v47.state.mapSettingsValid and not v59,
                    OnClicked = v47.tryGenerate
                }
            },
            Style = if not l_TerrainEditorOverhaul_0 then nil else "RoundPrimary"
        }),
        ProgressDialog = v59 and v2.createElement(v15, {
            Title = l_Localization_0:getText("Generate", "GenerateProgressTitle"),
            SubText = l_Localization_0:getText("Generate", "GenerateVoxels"),
            Progress = not not v59 and l_props_2.TerrainGeneration:getProgress() or 0,
            IsPaused = not not v59 and (l_props_2.TerrainGeneration:isPaused() or false),
            OnPauseButtonClicked = v47.onGenerationPauseRequested,
            OnCancelButtonClicked = v47.onGenerationCancelRequested
        })
    });
end;
return v3.connect(function(v62, _)
    return {
        toolName = v7.ToolId.Generate,
        biomeSelection = v62.GenerateTool.biomeSelection,
        biomeSize = v62.GenerateTool.biomeSize,
        haveCaves = v62.GenerateTool.haveCaves,
        position = if not l_TerrainEditorOverhaul_0 then v62.GenerateTool.position else v62.Tools.SelectionTransform.Position,
        seed = v62.GenerateTool.seed,
        size = if not l_TerrainEditorOverhaul_0 then v62.GenerateTool.size else v62.Tools.SelectionSize,
        snapToVoxels = if not l_TerrainEditorOverhaul_0 then nil else v62.Tools.SnapToVoxels,
        transform = if not l_TerrainEditorOverhaul_0 then nil else v62.Tools.SelectionTransform
    };
end, function(v64)
    local function _(v65)
        v64(v19("GenerateTool", v65));
    end;
    return {
        dispatchSetBiomeSelection = function(v67, v68)
            v64(v19("GenerateTool", (v23(v67, v68))));
        end,
        dispatchSetBiomeSize = function(v69)
            v64(v19("GenerateTool", (v24(v69))));
        end,
        dispatchSetHaveCaves = function(v70)
            v64(v19("GenerateTool", (v25(v70))));
        end,
        dispatchChangePosition = function(v71)
            v64(v19("GenerateTool", (v20(v71))));
        end,
        dispatchSetSeed = function(v72)
            v64(v19("GenerateTool", (v26(v72))));
        end,
        dispatchSetSnapToVoxels = function(v73)
            v64(v27(v73));
        end,
        dispatchChangeSize = function(v74)
            v64(v19("GenerateTool", (v22(v74))));
        end,
        dispatchChangeSelection = function(v75, v76)
            v64(v21(v75, v76));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    TerrainGeneration = v6.TerrainGeneration
})(v29)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChangeStrength);
local v9 = require(l_Actions_0.ChooseBrushShape);
local v10 = require(l_Actions_0.SetAutoMaterial);
local v11 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v12 = require(l_Actions_0.SetEditPlaneMode);
local v13 = require(l_Actions_0.SetIgnoreWater);
local v14 = require(l_Actions_0.SetIgnoreParts);
local v15 = require(l_Actions_0.SetMaterial);
local v16 = require(l_Actions_0.SetPlaneCFrame);
local v17 = require(l_Actions_0.SetPlaneLock);
local v18 = require(l_Actions_0.SetSnapToVoxels);
local v19 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v20, _)
    return {
        toolName = v19.ToolId.Grow,
        autoMaterial = v20.GrowTool.autoMaterial,
        baseSize = v20.GrowTool.baseSize,
        baseSizeHeightLocked = v20.GrowTool.baseSizeHeightLocked,
        brushShape = v20.GrowTool.brushShape,
        height = v20.GrowTool.height,
        ignoreWater = v20.GrowTool.ignoreWater,
        ignoreParts = v20.GrowTool.ignoreParts,
        material = v20.GrowTool.material,
        pivot = v20.GrowTool.pivot,
        planeLock = v20.BaseTool.planeLock,
        snapToVoxels = v20.GrowTool.snapToVoxels,
        strength = v20.GrowTool.strength,
        editPlaneMode = v20.BaseTool.editPlaneMode,
        planeCFrame = v20.BaseTool.planeCFrame
    };
end, function(v22)
    local function _(v23)
        v22(v4("GrowTool", v23));
    end;
    local function _(v25)
        v22(v4("BaseTool", v25));
    end;
    return {
        dispatchChangeBaseSize = function(v27)
            v22(v4("GrowTool", (v5(v27))));
        end,
        dispatchChangeHeight = function(v28)
            v22(v4("GrowTool", (v6(v28))));
        end,
        dispatchChangePivot = function(v29)
            v22(v4("GrowTool", (v7(v29))));
        end,
        dispatchChangeStrength = function(v30)
            v22(v4("GrowTool", (v8(v30))));
        end,
        dispatchChooseBrushShape = function(v31)
            v22(v4("GrowTool", (v9(v31))));
        end,
        dispatchSetAutoMaterial = function(v32)
            v22(v4("GrowTool", (v10(v32))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v33)
            v22(v4("GrowTool", (v11(v33))));
        end,
        dispatchSetIgnoreWater = function(v34)
            v22(v4("GrowTool", (v13(v34))));
        end,
        dispatchSetIgnoreParts = function(v35)
            v22(v4("GrowTool", (v14(v35))));
        end,
        dispatchSetMaterial = function(v36)
            v22(v4("GrowTool", (v15(v36))));
        end,
        dispatchSetPlaneLock = function(v37)
            v22(v4("BaseTool", (v17(v37))));
        end,
        dispatchSetEditPlaneMode = function(v38)
            v22(v4("BaseTool", (v12(v38))));
        end,
        dispatchSetPlaneCFrame = function(v39)
            v22(v4("BaseTool", (v16(v39))));
        end,
        dispatchSetSnapToVoxels = function(v40)
            v22(v4("GrowTool", (v18(v40))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_ToolId_0 = require(l_Parent_0.Src.Util.TerrainEnums).ToolId;
local v7 = require(l_Parent_0.Src.ContextItems);
local l_PluginActionsController_0 = v7.PluginActionsController;
local l_Terrain_0 = v7.Terrain;
local l_LayoutOrderIterator_0 = v1.Util.LayoutOrderIterator;
local l_ToolParts_0 = l_Parent_0.Src.Components.Tools.ToolParts;
local v12 = require(l_ToolParts_0.ButtonGroup);
local v13 = require(l_ToolParts_0.MaterialSettings);
local v14 = require(l_ToolParts_0.Panel);
local v15 = require(l_ToolParts_0.RegionFragment);
local _ = require(l_ToolParts_0.VolumeDragger);
local v17 = require(l_Parent_0.Src.Components.FillDialog);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v19 = require(l_Actions_0.ApplyToolAction);
local v20 = require(l_Actions_0.ChangeSelection);
local v21 = require(l_Actions_0.SetMaterial);
local v22 = require(l_Actions_0.SetReplaceMaterial);
local v23 = require(l_Actions_0.SetSnapToVoxels);
local v24 = require(l_Actions_0.SetSourceMaterial);
local v25 = require(l_Actions_0.SetTargetMaterial);
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local v28 = v2.PureComponent:extend(script.Name);
v28.init = function(v29)
    v29.onClick = function()
        local l_props_0 = v29.props;
        local l_Analytics_0 = l_props_0.Analytics;
        local l_ReplaceMaterial_0 = l_props_0.ReplaceMaterial;
        v29:setState({
            applying = true
        });
        if not l_ReplaceMaterial_0 then
            l_Analytics_0:report("regionAction", "Fill");
        else
            l_Analytics_0:report("regionAction", "Replace");
        end;
        l_ChangeHistoryService_0:SetWaypoint("TerrainFill");
    end;
    v29.onFinish = function()
        v29:setState({
            applying = false
        });
    end;
end;
if l_TerrainEditorOverhaul_0 then
    v28.didMount = function(v33)
        local l_props_1 = v33.props;
        v33.applyAction = l_props_1.PluginActionsController:Connect("Apply", v33.onClick);
        l_props_1.PluginActionsController:Enable("Apply");
    end;
    v28.willUnmount = function(v35)
        local l_props_2 = v35.props;
        if v35.applyAction then
            l_props_2.PluginActionsController:Disable("Apply");
            v35.applyAction:disconnect();
        end;
    end;
end;
v28.render = function(v37)
    local l_props_3 = v37.props;
    local l_Material_0 = l_props_3.Material;
    local l_ReplaceMaterial_1 = l_props_3.ReplaceMaterial;
    local l_SourceMaterial_0 = l_props_3.SourceMaterial;
    local l_TargetMaterial_0 = l_props_3.TargetMaterial;
    local l_SelectionSize_0 = l_props_3.SelectionSize;
    local l_SelectionTransform_0 = l_props_3.SelectionTransform;
    local l_SnapToVoxels_0 = l_props_3.SnapToVoxels;
    local l_Localization_0 = l_props_3.Localization;
    local v47 = l_LayoutOrderIterator_0.new();
    return v2.createFragment({
        RegionSettings = v2.createElement(v14, {
            Padding = UDim.new(0, 12),
            LayoutOrder = v47:getNextOrder(),
            isSubsection = false,
            Title = l_Localization_0:getText("SelectionSettings", "SelectionSettings")
        }, {
            v2.createElement(v15, {
                LayoutOrder = 1,
                SetRegion = function(v48, v49)
                    l_props_3.dispatchChangeSelection(v48, v49);
                end,
                SetSnapToVoxels = l_props_3.dispatchSetSnapToVoxels,
                Size = l_SelectionSize_0,
                SnapToVoxels = l_SnapToVoxels_0,
                SourceSize = l_SelectionSize_0,
                SourceTransform = l_SelectionTransform_0,
                Transform = l_SelectionTransform_0,
                ToolName = l_props_3.toolName
            })
        }),
        Source = v2.createElement(v13, {
            LayoutOrder = v47:getNextOrder(),
            AllowAir = true,
            currentTool = l_ToolId_0.Material,
            material = l_Material_0,
            replaceMaterial = l_ReplaceMaterial_1,
            source = l_SourceMaterial_0,
            target = l_TargetMaterial_0,
            setMaterial = v37.props.dispatchSetMaterial,
            setReplaceMaterial = v37.props.dispatchSetReplaceMaterial,
            setSource = v37.props.dispatchSetSourceMaterial,
            setTarget = v37.props.dispatchSetTargetMaterial
        }),
        FillButtonFrame = v2.createElement(v12, {
            LayoutOrder = v47:getNextOrder(),
            Buttons = {
                {
                    Key = "Action",
                    Name = l_Localization_0:getText("MaterialSettings", "Apply"),
                    Active = not v37.state.applying,
                    OnClicked = v37.onClick
                }
            },
            Style = "RoundPrimary"
        }),
        FillDialog = if not v37.state.applying then nil else v2.createElement(v17, {
            OnFinish = v37.onFinish,
            Material = l_Material_0,
            Replace = l_ReplaceMaterial_1,
            Size = l_SelectionSize_0,
            SourceMaterial = l_SourceMaterial_0,
            TargetMaterial = l_TargetMaterial_0,
            Transform = l_SelectionTransform_0,
            Terrain = l_props_3.Terrain:get()
        })
    });
end;
return v3.connect(function(v50, _)
    return {
        Material = v50.MaterialTool.Material,
        ReplaceMaterial = v50.MaterialTool.ReplaceMaterial,
        SourceMaterial = v50.MaterialTool.SourceMaterial,
        TargetMaterial = v50.MaterialTool.TargetMaterial,
        SelectionTransform = v50.Tools.SelectionTransform,
        SelectionSize = v50.Tools.SelectionSize,
        SnapToVoxels = v50.Tools.SnapToVoxels
    };
end, function(v52)
    local function _(v53)
        v52(v19("MaterialTool", v53));
    end;
    return {
        dispatchChangeSelection = function(v55, v56)
            v52(v20(v55, v56));
        end,
        dispatchSetMaterial = function(v57)
            v52(v19("MaterialTool", (v21(v57))));
        end,
        dispatchSetReplaceMaterial = function(v58)
            v52(v19("MaterialTool", (v22(v58))));
        end,
        dispatchSetSnapToVoxels = function(v59)
            v52(v23(v59));
        end,
        dispatchSetSourceMaterial = function(v60)
            v52(v19("MaterialTool", (v24(v60))));
        end,
        dispatchSetTargetMaterial = function(v61)
            v52(v19("MaterialTool", (v25(v61))));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Localization = l_ContextServices_0.Localization,
    PluginActionsController = l_PluginActionsController_0,
    Terrain = l_Terrain_0
})(v28)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChooseBrushShape);
local v9 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v10 = require(l_Actions_0.SetEditPlaneMode);
local v11 = require(l_Actions_0.SetIgnoreWater);
local v12 = require(l_Actions_0.SetIgnoreParts);
local v13 = require(l_Actions_0.SetMaterial);
local v14 = require(l_Actions_0.SetReplaceMaterial);
local v15 = require(l_Actions_0.SetSourceMaterial);
local v16 = require(l_Actions_0.SetTargetMaterial);
local v17 = require(l_Actions_0.SetPlaneCFrame);
local v18 = require(l_Actions_0.SetPlaneLock);
local v19 = require(l_Actions_0.SetSnapToVoxels);
local v20 = require(l_Parent_0.Src.Util.TerrainEnums);
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
return v1.connect(function(v22, _)
    return {
        toolName = v20.ToolId.Paint,
        allowAir = true,
        baseSize = v22.PaintTool.baseSize,
        baseSizeHeightLocked = v22.PaintTool.baseSizeHeightLocked,
        brushShape = v22.PaintTool.brushShape,
        height = v22.PaintTool.height,
        ignoreWater = v22.PaintTool.ignoreWater,
        ignoreParts = v22.PaintTool.ignoreParts,
        material = v22.PaintTool.material,
        replaceMaterial = if not l_TerrainEditorOverhaul_0 then nil else v22.PaintTool.replaceMaterial,
        source = if not l_TerrainEditorOverhaul_0 then nil else v22.PaintTool.sourceMaterial,
        target = if not l_TerrainEditorOverhaul_0 then nil else v22.PaintTool.targetMaterial,
        pivot = v22.PaintTool.pivot,
        planeLock = v22.BaseTool.planeLock,
        snapToVoxels = v22.PaintTool.snapToVoxels,
        editPlaneMode = v22.BaseTool.editPlaneMode,
        planeCFrame = v22.BaseTool.planeCFrame
    };
end, function(v24)
    local function _(v25)
        v24(v4("PaintTool", v25));
    end;
    local function _(v27)
        v24(v4("BaseTool", v27));
    end;
    return {
        dispatchChangeBaseSize = function(v29)
            v24(v4("PaintTool", (v5(v29))));
        end,
        dispatchChangeHeight = function(v30)
            v24(v4("PaintTool", (v6(v30))));
        end,
        dispatchChangePivot = function(v31)
            v24(v4("PaintTool", (v7(v31))));
        end,
        dispatchChooseBrushShape = function(v32)
            v24(v4("PaintTool", (v8(v32))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v33)
            v24(v4("PaintTool", (v9(v33))));
        end,
        dispatchSetIgnoreWater = function(v34)
            v24(v4("PaintTool", (v11(v34))));
        end,
        dispatchSetIgnoreParts = function(v35)
            v24(v4("PaintTool", (v12(v35))));
        end,
        dispatchSetMaterial = function(v36)
            v24(v4("PaintTool", (v13(v36))));
        end,
        dispatchSetReplaceMaterial = if not l_TerrainEditorOverhaul_0 then nil else function(v37)
            v24(v4("PaintTool", (v14(v37))));
        end,
        dispatchSetSourceMaterial = if not l_TerrainEditorOverhaul_0 then nil else function(v38)
            v24(v4("PaintTool", (v15(v38))));
        end,
        dispatchSetTargetMaterial = if not l_TerrainEditorOverhaul_0 then nil else function(v39)
            v24(v4("PaintTool", (v16(v39))));
        end,
        dispatchSetPlaneLock = function(v40)
            v24(v4("BaseTool", (v18(v40))));
        end,
        dispatchSetEditPlaneMode = function(v41)
            v24(v4("BaseTool", (v10(v41))));
        end,
        dispatchSetPlaneCFrame = function(v42)
            v24(v4("BaseTool", (v17(v42))));
        end,
        dispatchSetSnapToVoxels = function(v43)
            v24(v4("PaintTool", (v19(v43))));
        end
    };
end)(v2);


local l_Parent_0 = script.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.Src.Components.Tools.ToolParts.EditSettings);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v5 = require(l_Actions_0.ApplyToolAction);
local v6 = require(l_Actions_0.SetMergeEmpty);
local v7 = require(l_Parent_0.Src.Components.Functions.TerrainRegionEditor);
local v8 = v1.PureComponent:extend(script.Name);
v8.init = function(v9)
    v9.updateProperties = function()
        v7.ChangeProperties({
            mergeEmpty = v9.props.mergeEmpty
        });
    end;
end;
v8.didUpdate = function(v10)
    v10.updateProperties();
end;
v8.didMount = function(v11)
    v11.updateProperties();
end;
v8.render = function(v12)
    return v1.createElement(v3, {
        LayoutOrder = 1,
        mergeEmpty = v12.props.mergeEmpty,
        setMergeEmpty = v12.props.dispatchSetMergeEmpty
    });
end;
return v2.connect(function(v13, _)
    return {
        toolName = v13.Tools.currentTool,
        mergeEmpty = v13.RegionTool.mergeEmpty
    };
end, function(v15)
    local function _(v16)
        v15(v5("RegionTool", v16));
    end;
    return {
        dispatchSetMergeEmpty = function(v18)
            v15(v5("RegionTool", (v6(v18))));
        end
    };
end)(v8);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.ContextItems);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v8 = require(l_Actions_0.ApplyToolAction);
local v9 = require(l_Actions_0.ChangePosition);
local v10 = require(l_Actions_0.ChangeSize);
local v11 = require(l_Actions_0.SetSourceMaterial);
local v12 = require(l_Actions_0.SetTargetMaterial);
local v13 = require(l_Actions_0.SetReplaceMode);
local v14 = require(l_Actions_0.ChangeBaseSize);
local v15 = require(l_Actions_0.ChangeHeight);
local v16 = require(l_Actions_0.ChangePivot);
local v17 = require(l_Actions_0.ChooseBrushShape);
local v18 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v19 = require(l_Actions_0.SetEditPlaneMode);
local v20 = require(l_Actions_0.SetIgnoreWater);
local v21 = require(l_Actions_0.SetIgnoreParts);
local v22 = require(l_Actions_0.SetPlaneCFrame);
local v23 = require(l_Actions_0.SetPlaneLock);
local v24 = require(l_Actions_0.SetSnapToVoxels);
local l_ToolParts_0 = script.Parent.ToolParts;
local v26 = require(l_ToolParts_0.ButtonGroup);
local v27 = require(l_ToolParts_0.Panel);
local v28 = require(l_ToolParts_0.MapSettingsWithPreview);
local v29 = require(l_ToolParts_0.MaterialSelector);
local v30 = require(l_Parent_0.Src.Components.ProgressDialog);
local v31 = require(l_ToolParts_0.ModeSelector);
local v32 = require(l_ToolParts_0.MouseListener);
local v33 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local v34 = require(l_Parent_0.Src.Util.TerrainEnums);
local l_PlaneLockType_0 = v34.PlaneLockType;
local l_ReplaceMode_0 = v34.ReplaceMode;
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local v38 = v2.PureComponent:extend(script.Name);
v38.init = function(v39)
    v39.tryGenerateReplace = function()
        v39.props.Replace:replaceMaterial(Vector3.new(v39.props.Position.X, v39.props.Position.Y, v39.props.Position.Z), Vector3.new(v39.props.Size.X, v39.props.Size.Y, v39.props.Size.Z), v39.props.Source, v39.props.Target, v39.props.toolName);
    end;
    v39.setSourceMaterial = function(v40)
        if v40 == Enum.Material.Water and v39.props.ignoreWater == true then
            v39.props.dispatchSetIgnoreWater(false);
        end;
        if v40 == Enum.Material.Air and v39.props.planeLock == l_PlaneLockType_0.Off then
            v39.props.dispatchSetPlaneLock(l_PlaneLockType_0.Auto);
        end;
        v39.props.dispatchSetSourceMaterial(v40);
    end;
    v39.setIgnoreWater = function(v41)
        if v39.props.Source == Enum.Material.Water then
            if v39.props.ignoreWater then
                v39.props.dispatchSetIgnoreWater(false);
                return ;
            end;
        else
            v39.props.dispatchSetIgnoreWater(v41);
        end;
    end;
    v39.setPlaneLock = function(v42)
        if v39.props.Source == Enum.Material.Air then
            if v42 ~= l_PlaneLockType_0.Off then
                v39.props.dispatchSetPlaneLock(v42);
                return ;
            end;
        else
            v39.props.dispatchSetPlaneLock(v42);
        end;
    end;
    v39.cancel = function()
        v39.props.Replace:cancel();
    end;
end;
v38.render = function(v43)
    local l_Localization_0 = v43.props.Localization;
    local l_Position_0 = v43.props.Position;
    local l_Size_0 = v43.props.Size;
    local v47 = v43.props.Replace:isReplacing();
    return v2.createFragment({
        ReplaceTool = v2.createElement(v27, {
            Title = l_Localization_0:getText("Replace", "ReplaceMaterial"),
            LayoutOrder = 1
        }, {
            ModeButtonsWithBoxToggled = if l_TerrainEditorOverhaul_0 then nil else v2.createElement(v31, {
                Selected = v43.props.Mode,
                Select = v43.props.dispatchSetReplaceMode,
                Options = {
                    {
                        Data = l_ReplaceMode_0.Box,
                        Text = l_Localization_0:getText("ReplaceMode", "Box")
                    },
                    {
                        Data = l_ReplaceMode_0.Brush,
                        Text = l_Localization_0:getText("ReplaceMode", "Brush")
                    }
                }
            }),
            Brush = if not l_TerrainEditorOverhaul_0 and v43.props.Mode == l_ReplaceMode_0.Brush then v2.createElement(v33, {
                LayoutOrder = 2,
                isSubsection = true,
                toolName = v43.props.toolName,
                baseSize = v43.props.baseSize,
                baseSizeHeightLocked = v43.props.baseSizeHeightLocked,
                brushShape = v43.props.brushShape,
                height = v43.props.height,
                ignoreWater = v43.props.ignoreWater,
                ignoreParts = v43.props.ignoreParts,
                pivot = v43.props.pivot,
                planeLock = v43.props.planeLock,
                planeCFrame = v43.props.planeCFrame,
                editPlaneMode = v43.props.editPlaneMode,
                snapToVoxels = v43.props.snapToVoxels,
                strength = v43.props.strength,
                source = v43.props.Source,
                target = v43.props.Target,
                dispatchChangeBaseSize = v43.props.dispatchChangeBaseSize,
                dispatchSetBaseSizeHeightLocked = v43.props.dispatchSetBaseSizeHeightLocked,
                dispatchChooseBrushShape = v43.props.dispatchChooseBrushShape,
                dispatchChangeHeight = v43.props.dispatchChangeHeight,
                dispatchSetEditPlaneMode = v43.props.dispatchSetEditPlaneMode,
                dispatchSetIgnoreWater = v43.setIgnoreWater,
                dispatchSetIgnoreParts = v43.props.dispatchSetIgnoreParts,
                dispatchChangePivot = v43.props.dispatchChangePivot,
                dispatchSetPlaneCFrame = v43.props.dispatchSetPlaneCFrame,
                dispatchSetPlaneLock = v43.setPlaneLock,
                dispatchSetSnapToVoxels = v43.props.dispatchSetSnapToVoxels,
                dispatchSetSourceMaterial = v43.props.dispatchSetSourceMaterial,
                dispatchSetTargetMaterial = v43.props.dispatchSetTargetMaterial,
                disablePlaneLock = v43.props.Source == Enum.Material.Air,
                disableIgnoreWater = v43.props.Source == Enum.Material.Water
            }) else nil,
            MouseListener = if l_TerrainEditorOverhaul_0 or v43.props.Mode == l_ReplaceMode_0.Box then v2.createElement(v32, {
                dispatchSetSourceMaterial = v43.props.dispatchSetSourceMaterial,
                dispatchSetTargetMaterial = v43.props.dispatchSetTargetMaterial
            }) else nil,
            MapSettingsWithPreview = if l_TerrainEditorOverhaul_0 or v43.props.Mode == l_ReplaceMode_0.Box then v2.createElement(v28, {
                LayoutOrder = 3,
                isSubsection = true,
                toolName = v43.props.toolName,
                Position = l_Position_0,
                Size = l_Size_0,
                OnPositionChanged = v43.props.dispatchChangePosition,
                OnSizeChanged = v43.props.dispatchChangeSize
            }) else nil,
            MaterialPanel = v2.createElement(v27, {
                Title = l_Localization_0:getText("Replace", "MaterialSettings"),
                LayoutOrder = 4,
                isSubsection = true
            }, {
                SourceMaterialSelector = v2.createElement(v29, {
                    LayoutOrder = 1,
                    AllowAir = true,
                    Label = l_Localization_0:getText("Replace", "SourceMaterial"),
                    material = v43.props.Source,
                    setMaterial = v43.setSourceMaterial
                }),
                TargetMaterialSelector = v2.createElement(v29, {
                    LayoutOrder = 2,
                    AllowAir = true,
                    Label = l_Localization_0:getText("Replace", "TargetMaterial"),
                    material = v43.props.Target,
                    setMaterial = v43.props.dispatchSetTargetMaterial
                })
            }),
            ReplaceButtons = if l_TerrainEditorOverhaul_0 or v43.props.Mode == l_ReplaceMode_0.Box then v2.createElement(v26, {
                LayoutOrder = 5,
                Buttons = {
                    {
                        Key = "Replace",
                        Name = l_Localization_0:getText("Replace", "Replace"),
                        Active = not v47,
                        OnClicked = v43.tryGenerateReplace
                    }
                }
            }) else nil
        }),
        ProgressDialog = v47 and v2.createElement(v30, {
            Title = l_Localization_0:getText("Replace", "ReplaceProgressTitle"),
            SubText = l_Localization_0:getText("Replace", "Replacing"),
            Progress = not not v47 and v43.props.Replace:getProgress() or 0,
            OnCancelButtonClicked = v43.cancel
        })
    });
end;
return v3.connect(function(v48, _)
    return {
        toolName = v34.ToolId.Replace,
        Position = v48.ReplaceTool.position,
        Size = v48.ReplaceTool.size,
        Source = v48.ReplaceTool.SourceMaterial,
        Target = v48.ReplaceTool.TargetMaterial,
        Mode = v48.ReplaceTool.ReplaceMode,
        baseSize = v48.ReplaceTool.baseSize,
        baseSizeHeightLocked = v48.ReplaceTool.baseSizeHeightLocked,
        brushShape = v48.ReplaceTool.brushShape,
        height = v48.ReplaceTool.height,
        ignoreWater = v48.ReplaceTool.ignoreWater,
        ignoreParts = v48.ReplaceTool.ignoreParts,
        pivot = v48.ReplaceTool.pivot,
        planeLock = v48.BaseTool.planeLock,
        planeCFrame = v48.BaseTool.planeCFrame,
        editPlaneMode = v48.BaseTool.editPlaneMode
    };
end, function(v50)
    local function _(v51)
        v50(v8("ReplaceTool", v51));
    end;
    local function _(v53)
        v50(v8("BaseTool", v53));
    end;
    return {
        dispatchChangePosition = function(v55)
            v50(v8("ReplaceTool", (v9(v55))));
        end,
        dispatchChangeSize = function(v56)
            v50(v8("ReplaceTool", (v10(v56))));
        end,
        dispatchSetSourceMaterial = function(v57)
            v50(v8("ReplaceTool", (v11(v57))));
        end,
        dispatchSetTargetMaterial = function(v58)
            v50(v8("ReplaceTool", (v12(v58))));
        end,
        dispatchSetReplaceMode = function(v59)
            v50(v8("ReplaceTool", (v13(v59))));
        end,
        dispatchChangeBaseSize = function(v60)
            v50(v8("ReplaceTool", (v14(v60))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v61)
            v50(v8("ReplaceTool", (v18(v61))));
        end,
        dispatchChooseBrushShape = function(v62)
            v50(v8("ReplaceTool", (v17(v62))));
        end,
        dispatchChangeHeight = function(v63)
            v50(v8("ReplaceTool", (v15(v63))));
        end,
        dispatchSetEditPlaneMode = function(v64)
            v50(v8("ReplaceTool", (v19(v64))));
        end,
        dispatchSetIgnoreWater = function(v65)
            v50(v8("ReplaceTool", (v20(v65))));
        end,
        dispatchSetIgnoreParts = function(v66)
            v50(v8("ReplaceTool", (v21(v66))));
        end,
        dispatchChangePivot = function(v67)
            v50(v8("ReplaceTool", (v16(v67))));
        end,
        dispatchSetPlaneCFrame = function(v68)
            v50(v8("BaseTool", (v22(v68))));
        end,
        dispatchSetPlaneLock = function(v69)
            v50(v8("BaseTool", (v23(v69))));
        end,
        dispatchSetSnapToVoxels = function(v70)
            v50(v8("BaseTool", (v24(v70))));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Replace = v6.SeaLevel
})(v38)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChangeStrength);
local v9 = require(l_Actions_0.ChooseBrushShape);
local v10 = require(l_Actions_0.SetAutoMaterial);
local v11 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v12 = require(l_Actions_0.SetBrushMode);
local v13 = require(l_Actions_0.SetEditPlaneMode);
local v14 = require(l_Actions_0.SetIgnoreWater);
local v15 = require(l_Actions_0.SetIgnoreParts);
local v16 = require(l_Actions_0.SetMaterial);
local v17 = require(l_Actions_0.SetPlaneCFrame);
local v18 = require(l_Actions_0.SetPlaneLock);
local v19 = require(l_Actions_0.SetSnapToVoxels);
local v20 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v21, _)
    return {
        toolName = v20.ToolId.Sculpt,
        autoMaterial = v21.SculptTool.autoMaterial,
        baseSize = v21.SculptTool.baseSize,
        baseSizeHeightLocked = v21.SculptTool.baseSizeHeightLocked,
        brushMode = v21.SculptTool.brushMode,
        brushShape = v21.SculptTool.brushShape,
        height = v21.SculptTool.height,
        ignoreWater = v21.SculptTool.ignoreWater,
        ignoreParts = v21.SculptTool.ignoreParts,
        material = v21.SculptTool.material,
        pivot = v21.SculptTool.pivot,
        planeLock = v21.BaseTool.planeLock,
        snapToVoxels = v21.SculptTool.snapToVoxels,
        strength = v21.SculptTool.strength,
        editPlaneMode = v21.BaseTool.editPlaneMode,
        planeCFrame = v21.BaseTool.planeCFrame
    };
end, function(v23)
    local function _(v24)
        v23(v4("SculptTool", v24));
    end;
    local function _(v26)
        v23(v4("BaseTool", v26));
    end;
    return {
        dispatchSetAutoMaterial = function(v28)
            v23(v4("SculptTool", (v10(v28))));
        end,
        dispatchChangeBaseSize = function(v29)
            v23(v4("SculptTool", (v5(v29))));
        end,
        dispatchChangeHeight = function(v30)
            v23(v4("SculptTool", (v6(v30))));
        end,
        dispatchChangePivot = function(v31)
            v23(v4("SculptTool", (v7(v31))));
        end,
        dispatchChangeStrength = function(v32)
            v23(v4("SculptTool", (v8(v32))));
        end,
        dispatchChooseBrushShape = function(v33)
            v23(v4("SculptTool", (v9(v33))));
        end,
        dispatchSetBrushMode = function(v34)
            v23(v4("SculptTool", (v12(v34))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v35)
            v23(v4("SculptTool", (v11(v35))));
        end,
        dispatchSetIgnoreWater = function(v36)
            v23(v4("SculptTool", (v14(v36))));
        end,
        dispatchSetIgnoreParts = function(v37)
            v23(v4("SculptTool", (v15(v37))));
        end,
        dispatchSetMaterial = function(v38)
            v23(v4("SculptTool", (v16(v38))));
        end,
        dispatchSetPlaneLock = function(v39)
            v23(v4("BaseTool", (v18(v39))));
        end,
        dispatchSetEditPlaneMode = function(v40)
            v23(v4("BaseTool", (v13(v40))));
        end,
        dispatchSetPlaneCFrame = function(v41)
            v23(v4("BaseTool", (v17(v41))));
        end,
        dispatchSetSnapToVoxels = function(v42)
            v23(v4("SculptTool", (v19(v42))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.ContextItems);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v8 = require(l_Actions_0.ApplyToolAction);
local v9 = require(l_Actions_0.ChangePosition);
local v10 = require(l_Actions_0.ChangeSize);
local l_ToolParts_0 = script.Parent.ToolParts;
local v12 = require(l_ToolParts_0.ButtonGroup);
local v13 = require(l_ToolParts_0.MapSettingsWithPreview);
local v14 = require(l_Parent_0.Src.Components.ProgressDialog);
local v15 = require(l_Parent_0.Src.Util.TerrainEnums);
if not game:GetFastFlag("TerrainEditorOverhaul") then
    local v16 = v2.PureComponent:extend(script.Name);
    v16.init = function(v17)
        v17.tryGenerateSeaLevel = function()
            v17.props.SeaLevel:replaceMaterial(Vector3.new(v17.props.Position.X, v17.props.Position.Y, v17.props.Position.Z), Vector3.new(v17.props.Size.X, v17.props.Size.Y, v17.props.Size.Z), Enum.Material.Air, Enum.Material.Water, v17.props.toolName);
        end;
        v17.tryEvaporateSeaLevel = function()
            v17.props.SeaLevel:replaceMaterial(Vector3.new(v17.props.Position.X, v17.props.Position.Y, v17.props.Position.Z), Vector3.new(v17.props.Size.X, v17.props.Size.Y, v17.props.Size.Z), Enum.Material.Water, Enum.Material.Air, v17.props.toolName);
        end;
        v17.cancel = function()
            v17.props.SeaLevel:cancel();
        end;
    end;
    v16.render = function(v18)
        local l_Localization_0 = v18.props.Localization;
        local l_Position_0 = v18.props.Position;
        local l_Size_0 = v18.props.Size;
        local v22 = v18.props.SeaLevel:isReplacing();
        return v2.createFragment({
            MapSettingsWithPreview = v2.createElement(v13, {
                toolName = v18.props.toolName,
                LayoutOrder = 1,
                Position = l_Position_0,
                Size = l_Size_0,
                OnPositionChanged = v18.props.dispatchChangePosition,
                OnSizeChanged = v18.props.dispatchChangeSize
            }),
            SeaLevelButtons = v2.createElement(v12, {
                LayoutOrder = 2,
                Buttons = {
                    {
                        Key = "Evaporate",
                        Name = l_Localization_0:getText("SeaLevel", "Evaporate"),
                        Active = not v22,
                        OnClicked = v18.tryEvaporateSeaLevel
                    },
                    {
                        Key = "Create",
                        Name = l_Localization_0:getText("SeaLevel", "Create"),
                        Active = not v22,
                        OnClicked = v18.tryGenerateSeaLevel
                    }
                }
            }),
            ProgressDialog = v22 and v2.createElement(v14, {
                Title = l_Localization_0:getText("SeaLevel", "SeaLevelProgressTitle"),
                SubText = l_Localization_0:getText("Replace", "Replacing"),
                Progress = not not v22 and v18.props.SeaLevel:getProgress() or 0,
                OnCancelButtonClicked = v18.cancel
            })
        });
    end;
    return v3.connect(function(v23, _)
        return {
            toolName = v15.ToolId.SeaLevel,
            Position = v23.SeaLevelTool.position,
            Size = v23.SeaLevelTool.size
        };
    end, function(v25)
        local function _(v26)
            v25(v8("SeaLevelTool", v26));
        end;
        return {
            dispatchChangePosition = function(v28)
                v25(v8("SeaLevelTool", (v9(v28))));
            end,
            dispatchChangeSize = function(v29)
                v25(v8("SeaLevelTool", (v10(v29))));
            end
        };
    end)((l_withContext_0({
        Localization = l_ContextServices_0.Localization,
        SeaLevel = v6.SeaLevel
    })(v16)));
else
    local l_PluginActionsController_0 = v6.PluginActionsController;
    local l_Terrain_0 = v6.Terrain;
    local l_LayoutOrderIterator_0 = v1.Util.LayoutOrderIterator;
    local v33 = require(l_ToolParts_0.Panel);
    local v34 = require(l_ToolParts_0.RegionFragment);
    local v35 = require(l_Parent_0.Src.Components.FillDialog);
    local v36 = require(l_Actions_0.ChangeSelection);
    local v37 = require(l_Actions_0.SetSnapToVoxels);
    local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
    local v39 = v2.PureComponent:extend(script.Name);
    v39.init = function(v40)
        v40.create = function()
            v40.onChangeSeaLevel(true);
        end;
        v40.evaporate = function()
            v40.onChangeSeaLevel(false);
        end;
        v40.onChangeSeaLevel = function(v41)
            local l_Analytics_0 = v40.props.Analytics;
            if not v41 then
                l_Analytics_0:report("regionAction", "Evaporate");
                v40:setState({
                    applying = true,
                    sourceMaterial = Enum.Material.Water,
                    targetMaterial = Enum.Material.Air
                });
            else
                l_Analytics_0:report("regionAction", "Water");
                v40:setState({
                    applying = true,
                    sourceMaterial = Enum.Material.Air,
                    targetMaterial = Enum.Material.Water
                });
            end;
            l_ChangeHistoryService_0:SetWaypoint("TerrainSeaLevel");
        end;
        v40.onFinish = function()
            v40:setState({
                applying = false
            });
        end;
    end;
    v39.render = function(v43)
        local l_props_0 = v43.props;
        local l_SelectionSize_0 = l_props_0.SelectionSize;
        local l_SelectionTransform_0 = l_props_0.SelectionTransform;
        local l_SnapToVoxels_0 = l_props_0.SnapToVoxels;
        local l_Localization_1 = l_props_0.Localization;
        local v49 = l_LayoutOrderIterator_0.new();
        return v2.createFragment({
            RegionSettings = v2.createElement(v33, {
                Padding = UDim.new(0, 12),
                LayoutOrder = v49:getNextOrder(),
                isSubsection = false,
                Title = l_Localization_1:getText("SelectionSettings", "SelectionSettings")
            }, {
                v2.createElement(v34, {
                    LayoutOrder = 1,
                    SetRegion = function(v50, v51)
                        l_props_0.dispatchChangeSelection(v50, v51);
                    end,
                    SetSnapToVoxels = l_props_0.dispatchSetSnapToVoxels,
                    Size = l_SelectionSize_0,
                    SnapToVoxels = l_SnapToVoxels_0,
                    SourceSize = l_SelectionSize_0,
                    SourceTransform = l_SelectionTransform_0,
                    Transform = l_SelectionTransform_0,
                    ToolName = l_props_0.toolName
                })
            }),
            EvaporateButtonFrame = v2.createElement(v12, {
                LayoutOrder = v49:getNextOrder(),
                Buttons = {
                    {
                        Key = "Evporate",
                        Name = l_Localization_1:getText("SeaLevel", "Evaporate"),
                        Active = not v43.state.applying,
                        OnClicked = v43.evaporate
                    },
                    {
                        Key = "Create",
                        Name = l_Localization_1:getText("SeaLevel", "Create"),
                        Active = not v43.state.applying,
                        OnClicked = v43.create
                    }
                },
                Style = "RoundPrimary"
            }),
            FillDialog = if not v43.state.applying then nil else v2.createElement(v35, {
                OnFinish = v43.onFinish,
                Replace = true,
                Size = l_SelectionSize_0,
                SourceMaterial = v43.state.sourceMaterial,
                TargetMaterial = v43.state.targetMaterial,
                Transform = l_SelectionTransform_0,
                Terrain = l_props_0.Terrain:get()
            })
        });
    end;
    return v3.connect(function(v52, _)
        return {
            SelectionTransform = v52.SeaLevelTool.SelectionTransform,
            SelectionSize = v52.SeaLevelTool.SelectionSize,
            SnapToVoxels = v52.SeaLevelTool.SnapToVoxels
        };
    end, function(v54)
        local function _(v55)
            v54(v8("SeaLevelTool", v55));
        end;
        return {
            dispatchChangeSelection = function(v57, v58)
                v54(v8("SeaLevelTool", (v36(v57, v58))));
            end,
            dispatchSetSnapToVoxels = function(v59)
                v54(v8("SeaLevelTool", (v37(v59))));
            end
        };
    end)((l_withContext_0({
        Analytics = l_ContextServices_0.Analytics,
        Localization = l_ContextServices_0.Localization,
        PluginActionsController = l_PluginActionsController_0,
        Terrain = l_Terrain_0
    })(v39)));
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.ContextItems);
local l_ToolParts_0 = l_Parent_0.Src.Components.Tools.ToolParts;
local v8 = require(l_ToolParts_0.Panel);
local v9 = require(l_ToolParts_0.RegionFragment);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v11 = require(l_Actions_0.ChangeSelection);
local v12 = require(l_Actions_0.ChangeTool);
local v13 = require(l_Actions_0.SetSnapToVoxels);
local v14 = require(l_Actions_0.SetTransformMode);
local v15 = require(l_Actions_0.SetTerrainRegion);
local v16 = require(l_Actions_0.SetTerrainRegionCopyBuffer);
local v17 = require(l_Parent_0.Src.Util.TerrainEnums);
local l_ToolId_0 = v17.ToolId;
local l_TransformMode_0 = v17.TransformMode;
local v20 = require(l_Parent_0.Src.Util.ConvertTransformToRegion);
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_Selection_0 = game:GetService("Selection");
local v24 = v2.PureComponent:extend(script.Name);
v24.init = function(v25)
    v25.setRegion = function(v26, v27)
        v25.props.dispatchChangeSelection(v26, v27);
    end;
    if l_TerrainEditorOverhaul_0 then
        v25.copy = function()
            local l_props_0 = v25.props;
            local l_Analytics_0 = l_props_0.Analytics;
            local v30 = l_props_0.Terrain:get();
            local l_SelectionTransform_0 = l_props_0.SelectionTransform;
            local l_SelectionSize_0 = l_props_0.SelectionSize;
            l_Analytics_0:report("regionAction", "Copy");
            l_props_0.dispatchSetTerrainRegionCopyBuffer(v30:CopyRegion(v20(l_SelectionTransform_0, l_SelectionSize_0, true)), l_SelectionTransform_0, l_SelectionSize_0);
        end;
        v25.delete = function()
            local l_props_1 = v25.props;
            local l_Analytics_1 = l_props_1.Analytics;
            local v35 = l_props_1.Terrain:get();
            local l_SelectionTransform_1 = l_props_1.SelectionTransform;
            local l_SelectionSize_1 = l_props_1.SelectionSize;
            l_Analytics_1:report("regionAction", "Delete");
            v35:SetMaterialInTransform(l_SelectionTransform_1, l_SelectionSize_1, Enum.Material.Air);
            l_ChangeHistoryService_0:SetWaypoint("TerrainDelete");
        end;
        v25.cut = function()
            local l_props_2 = v25.props;
            local l_Analytics_2 = l_props_2.Analytics;
            local v40 = l_props_2.Terrain:get();
            local l_SelectionTransform_2 = l_props_2.SelectionTransform;
            local l_SelectionSize_2 = l_props_2.SelectionSize;
            l_Analytics_2:report("regionAction", "Cut");
            local v43 = v40:CopyRegion(v20(l_SelectionTransform_2, l_SelectionSize_2, true));
            v40:SetMaterialInTransform(l_SelectionTransform_2, l_SelectionSize_2, Enum.Material.Air);
            l_props_2.dispatchSetTerrainRegionCopyBuffer(v43, l_SelectionTransform_2, l_SelectionSize_2);
            l_ChangeHistoryService_0:SetWaypoint("TerrainCut");
        end;
        v25.paste = function()
            local l_props_3 = v25.props;
            local l_Analytics_3 = l_props_3.Analytics;
            local l_TerrainRegionCopyBuffer_0 = l_props_3.TerrainRegionCopyBuffer;
            l_Analytics_3:report("regionAction", "Paste");
            if l_TerrainRegionCopyBuffer_0 then
                l_props_3.dispatchSetTransformMode(l_TransformMode_0.Paste);
            end;
        end;
        v25.duplicate = function()
            local l_props_4 = v25.props;
            local l_Analytics_4 = l_props_4.Analytics;
            local v49 = l_props_4.Terrain:get();
            local l_SelectionTransform_3 = l_props_4.SelectionTransform;
            local l_SelectionSize_3 = l_props_4.SelectionSize;
            l_Analytics_4:report("regionAction", "Duplicate");
            l_props_4.dispatchSetTerrainRegion((v49:CopyRegion(v20(l_SelectionTransform_3, l_SelectionSize_3, true))));
            l_props_4.dispatchSetTransformMode(l_TransformMode_0.Duplicate);
        end;
        v25.selection = {};
    end;
end;
if l_TerrainEditorOverhaul_0 then
    v24.enable = function(v52)
        local l_props_5 = v52.props;
        l_props_5.PluginActionsController:Enable("CopySelected");
        l_props_5.PluginActionsController:Enable("CutSelected");
        l_props_5.PluginActionsController:Enable("DeleteSelected");
        l_props_5.PluginActionsController:Enable("PasteSelected");
        l_props_5.PluginActionsController:Enable("DuplicateSelected");
    end;
    v24.disable = function(v54)
        local l_props_6 = v54.props;
        l_props_6.PluginActionsController:Disable("CopySelected");
        l_props_6.PluginActionsController:Disable("CutSelected");
        l_props_6.PluginActionsController:Disable("DeleteSelected");
        l_props_6.PluginActionsController:Disable("PasteSelected");
        l_props_6.PluginActionsController:Disable("DuplicateSelected");
    end;
    v24.didMount = function(v56)
        local l_props_7 = v56.props;
        v56.copyAction = l_props_7.PluginActionsController:Connect("CopySelected", v56.copy);
        v56.cutAction = l_props_7.PluginActionsController:Connect("CutSelected", v56.cut);
        v56.deleteAction = l_props_7.PluginActionsController:Connect("DeleteSelected", v56.delete);
        v56.pasteAction = l_props_7.PluginActionsController:Connect("PasteSelected", v56.paste);
        v56.duplicateAction = l_props_7.PluginActionsController:Connect("DuplicateSelected", v56.duplicate);
        v56.selection = l_Selection_0:Get() or {};
        l_Selection_0:Set({});
        v56.onSelectionChanged = l_Selection_0.SelectionChanged:Connect(function()
            task.defer(function()
                l_Selection_0:Set({});
            end);
        end);
        v56:enable();
    end;
    v24.willUnmount = function(v58)
        if v58.onSelectionChanged then
            v58.onSelectionChanged:Disconnect();
            v58.onSelectionChanged = nil;
        end;
        l_Selection_0:Set(v58.selection);
        v58:disable();
        if v58.copyAction then
            v58.copyAction:Disconnect();
        end;
        if v58.cutAction then
            v58.cutAction:Disconnect();
        end;
        if v58.deleteAction then
            v58.deleteAction:Disconnect();
        end;
        if v58.pasteAction then
            v58.pasteAction:Disconnect();
        end;
        if v58.duplicateAction then
            v58.duplicateAction:Disconnect();
        end;
    end;
end;
v24.render = function(v59)
    local l_props_8 = v59.props;
    local l_Localization_0 = l_props_8.Localization;
    local l_SelectionTransform_4 = l_props_8.SelectionTransform;
    local l_SelectionSize_4 = l_props_8.SelectionSize;
    return v2.createFragment({
        SelectionSettings = v2.createElement(v8, {
            Padding = UDim.new(0, 12),
            LayoutOrder = 1,
            isSubsection = false,
            Title = l_Localization_0:getText("SelectionSettings", "SelectionSettings")
        }, {
            Dragger = v2.createElement(v9, {
                LayoutOrder = 1,
                SetRegion = v59.setRegion,
                SetSnapToVoxels = l_props_8.dispatchSetSnapToVoxels,
                Size = l_SelectionSize_4,
                SnapToVoxels = l_props_8.SnapToVoxels,
                SourceSize = l_SelectionSize_4,
                SourceTransform = l_SelectionTransform_4,
                Transform = l_SelectionTransform_4,
                ToolName = l_ToolId_0.Select
            })
        })
    });
end;
return v3.connect(function(v64, _)
    return {
        SelectionTransform = v64.Tools.SelectionTransform,
        SelectionSize = v64.Tools.SelectionSize,
        SnapToVoxels = v64.Tools.SnapToVoxels,
        TerrainRegionCopyBuffer = v64.Tools.TerrainRegionCopyBuffer
    };
end, function(v66)
    return {
        dispatchChangeSelection = function(v67, v68)
            v66(v11(v67, v68));
        end,
        dispatchChangeTool = function(v69)
            v66(v12(v69));
        end,
        dispatchSetSnapToVoxels = function(v70)
            v66(v13(v70));
        end,
        dispatchSetTransformMode = function(v71)
            v66(v14(v71));
        end,
        dispatchSetTerrainRegion = function(v72)
            v66(v15(v72));
        end,
        dispatchSetTerrainRegionCopyBuffer = function(v73, v74, v75)
            v66(v16(v73, v74, v75));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Localization = l_ContextServices_0.Localization,
    PluginActionsController = v6.PluginActionsController,
    Terrain = v6.Terrain
})(v24)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_BrowserService_0 = game:GetService("BrowserService");
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Src.ContextItems);
local l_ToolParts_0 = script.Parent.ToolParts;
local v9 = require(l_ToolParts_0.Panel);
local v10 = require(l_ToolParts_0.ButtonGroup);
local v11 = require(l_Parent_0.Src.Util.ShorelineController);
local l_TextWithInlineLink_0 = v2.UI.TextWithInlineLink;
local l_Pane_0 = v2.UI.Pane;
local l_ScrollingFrame_0 = v2.UI.ScrollingFrame;
local l_game_FastString_0 = game:GetFastString("Shorelines_LearnMoreUrl");
local v16 = v3.PureComponent:extend(script.Name);
v16.render = function(v17)
    local l_props_0 = v17.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_ShorelineController_0 = l_props_0.ShorelineController;
    local v21 = l_props_0.Theme:get();
    local l_ShorelinesUpgradePercent_0 = l_props_0.ShorelinesUpgradePercent;
    local v23 = false;
    if l_ShorelinesUpgradePercent_0 >= 0 then
        v23 = l_ShorelinesUpgradePercent_0 < 1;
    end;
    return v3.createElement(l_ScrollingFrame_0, {
        LayoutOrder = l_props_0.LayoutOrder,
        Size = UDim2.new(1, 0, 1, -(l_props_0.UpperContentYSize or 0))
    }, {
        Panel = v3.createElement(v9, {
            isSubsection = true,
            Title = l_Localization_0:getText("UpgradeShorelines", "Title"),
            Padding = UDim.new(0, 12)
        }, {
            ExplanationTextFrame = v3.createElement(l_Pane_0, {
                Size = UDim2.new(1, 0, 0, 0),
                BackgroundTransparency = 1,
                LayoutOrder = 1,
                AutomaticSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Vertical,
                Padding = 8,
                Spacing = 12
            }, {
                ExplanationText = v3.createElement("TextLabel", {
                    LayoutOrder = 1,
                    Text = l_Localization_0:getText("UpgradeShorelines", "Description") .. "\n\n" .. l_Localization_0:getText("UpgradeShorelines", "Explanation"),
                    Font = v21.font,
                    TextSize = v21.textSize,
                    TextColor3 = v21.textColor,
                    Size = UDim2.new(1, 0, 0, 0),
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextWrapped = true,
                    AutomaticSize = Enum.AutomaticSize.Y,
                    Position = UDim2.new(0, 0, 0, 0),
                    BackgroundTransparency = 1
                }),
                LearnMoreLink = v3.createElement(l_TextWithInlineLink_0, {
                    Size = UDim2.new(1, 0, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.Y,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    LayoutOrder = 2,
                    OnLinkClicked = function()
                        l_BrowserService_0:OpenBrowserWindow(l_game_FastString_0);
                    end,
                    Text = l_Localization_0:getText("UpgradeShorelines", "LearnMore"),
                    LinkText = l_Localization_0:getText("UpgradeShorelines", "LearnMoreLink"),
                    LinkPlaceholder = "[link]",
                    MaxWidth = 300,
                    TextProps = {
                        BackgroundTransparency = 1,
                        Font = v21.font,
                        TextColor3 = v21.textColor,
                        TextSize = 16,
                        TextXAlignment = Enum.TextXAlignment.Left
                    }
                })
            }),
            UpgradeButtons = v3.createElement(v10, {
                LayoutOrder = 3,
                Buttons = {
                    {
                        Key = "UpgradeShorelines",
                        Name = l_Localization_0:getText("UpgradeShorelines", "ActionButton"),
                        Active = not v23,
                        OnClicked = function()
                            l_ShorelineController_0:start("Panel");
                        end
                    }
                }
            })
        })
    });
end;
return v4.connect(function(v24)
    return {
        ShorelinesUpgradePercent = v24.Tools.ShorelinesUpgradePercent
    };
end, function()
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Theme = v7.DEPRECATED_Theme,
    ShorelineController = v11,
    Terrain = v7.Terrain,
    analytics = l_ContextServices_0.Analytics,
    Plugin = l_ContextServices_0.Plugin
})(v16)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChangeStrength);
local v9 = require(l_Actions_0.ChooseBrushShape);
local v10 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v11 = require(l_Actions_0.SetEditPlaneMode);
local v12 = require(l_Actions_0.SetIgnoreWater);
local v13 = require(l_Actions_0.SetIgnoreParts);
local v14 = require(l_Actions_0.SetPlaneCFrame);
local v15 = require(l_Actions_0.SetPlaneLock);
local v16 = require(l_Actions_0.SetSnapToVoxels);
local v17 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v18, _)
    return {
        toolName = v17.ToolId.Smooth,
        baseSize = v18.SmoothTool.baseSize,
        baseSizeHeightLocked = v18.SmoothTool.baseSizeHeightLocked,
        brushShape = v18.SmoothTool.brushShape,
        height = v18.SmoothTool.height,
        ignoreWater = v18.SmoothTool.ignoreWater,
        ignoreParts = v18.SmoothTool.ignoreParts,
        pivot = v18.SmoothTool.pivot,
        planeLock = v18.BaseTool.planeLock,
        snapToVoxels = v18.SmoothTool.snapToVoxels,
        strength = v18.SmoothTool.strength,
        editPlaneMode = v18.BaseTool.editPlaneMode,
        planeCFrame = v18.BaseTool.planeCFrame
    };
end, function(v20)
    local function _(v21)
        v20(v4("SmoothTool", v21));
    end;
    local function _(v23)
        v20(v4("BaseTool", v23));
    end;
    return {
        dispatchChangeBaseSize = function(v25)
            v20(v4("SmoothTool", (v5(v25))));
        end,
        dispatchChangeHeight = function(v26)
            v20(v4("SmoothTool", (v6(v26))));
        end,
        dispatchChangePivot = function(v27)
            v20(v4("SmoothTool", (v7(v27))));
        end,
        dispatchChangeStrength = function(v28)
            v20(v4("SmoothTool", (v8(v28))));
        end,
        dispatchChooseBrushShape = function(v29)
            v20(v4("SmoothTool", (v9(v29))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v30)
            v20(v4("SmoothTool", (v10(v30))));
        end,
        dispatchSetIgnoreWater = function(v31)
            v20(v4("SmoothTool", (v12(v31))));
        end,
        dispatchSetIgnoreParts = function(v32)
            v20(v4("SmoothTool", (v13(v32))));
        end,
        dispatchSetPlaneLock = function(v33)
            v20(v4("BaseTool", (v15(v33))));
        end,
        dispatchSetEditPlaneMode = function(v34)
            v20(v4("BaseTool", (v11(v34))));
        end,
        dispatchSetPlaneCFrame = function(v35)
            v20(v4("BaseTool", (v14(v35))));
        end,
        dispatchSetSnapToVoxels = function(v36)
            v20(v4("SmoothTool", (v16(v36))));
        end
    };
end)(v2);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_BrowserService_0 = game:GetService("BrowserService");
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Src.ContextItems);
local l_ToolParts_0 = script.Parent.ToolParts;
local v9 = require(l_ToolParts_0.Panel);
local v10 = require(l_ToolParts_0.ButtonGroup);
local v11 = require(l_Parent_0.Src.Util.SmoothVoxelsController);
local l_TextWithInlineLink_0 = v2.UI.TextWithInlineLink;
local l_Pane_0 = v2.UI.Pane;
local l_ScrollingFrame_0 = v2.UI.ScrollingFrame;
local l_game_FastString_0 = game:GetFastString("SmoothVoxels_LearnMoreUrl");
local v16 = v3.PureComponent:extend(script.Name);
v16.render = function(v17)
    local l_props_0 = v17.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_SmoothVoxelsController_0 = l_props_0.SmoothVoxelsController;
    local v21 = l_props_0.Theme:get();
    local l_SmoothVoxelsUpgradePercent_0 = l_props_0.SmoothVoxelsUpgradePercent;
    local v23 = false;
    if l_SmoothVoxelsUpgradePercent_0 >= 0 then
        v23 = l_SmoothVoxelsUpgradePercent_0 < 1;
    end;
    return v3.createElement(l_ScrollingFrame_0, {
        LayoutOrder = l_props_0.LayoutOrder,
        Size = UDim2.new(1, 0, 1, -(l_props_0.UpperContentYSize or 0))
    }, {
        Panel = v3.createElement(v9, {
            isSubsection = true,
            Title = l_Localization_0:getText("UpgradeSmoothVoxels", "Title"),
            Padding = UDim.new(0, 12)
        }, {
            ExplanationTextFrame = v3.createElement(l_Pane_0, {
                Size = UDim2.new(1, 0, 0, 0),
                BackgroundTransparency = 1,
                LayoutOrder = 1,
                AutomaticSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Vertical,
                Padding = 8,
                Spacing = 12
            }, {
                ExplanationText = v3.createElement("TextLabel", {
                    LayoutOrder = 1,
                    Text = l_Localization_0:getText("UpgradeSmoothVoxels", "Description") .. "\n\n" .. l_Localization_0:getText("UpgradeSmoothVoxels", "Explanation"),
                    Font = v21.font,
                    TextSize = v21.textSize,
                    TextColor3 = v21.textColor,
                    Size = UDim2.new(1, 0, 0, 0),
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextWrapped = true,
                    AutomaticSize = Enum.AutomaticSize.Y,
                    Position = UDim2.new(0, 0, 0, 0),
                    BackgroundTransparency = 1
                }),
                LearnMoreLink = v3.createElement(l_TextWithInlineLink_0, {
                    Size = UDim2.new(1, 0, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.Y,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    LayoutOrder = 2,
                    OnLinkClicked = function()
                        l_BrowserService_0:OpenBrowserWindow(l_game_FastString_0);
                    end,
                    Text = l_Localization_0:getText("UpgradeSmoothVoxels", "LearnMore"),
                    LinkText = l_Localization_0:getText("UpgradeSmoothVoxels", "LearnMoreLink"),
                    LinkPlaceholder = "[link]",
                    MaxWidth = 300,
                    TextProps = {
                        BackgroundTransparency = 1,
                        Font = v21.font,
                        TextColor3 = v21.textColor,
                        TextSize = 16,
                        TextXAlignment = Enum.TextXAlignment.Left
                    }
                })
            }),
            UpgradeButtons = v3.createElement(v10, {
                LayoutOrder = 3,
                Buttons = {
                    {
                        Key = "UpgradeSmoothVoxels",
                        Name = l_Localization_0:getText("UpgradeSmoothVoxels", "ActionButton"),
                        Active = not v23,
                        OnClicked = function()
                            l_SmoothVoxelsController_0:start("Panel");
                        end
                    }
                }
            })
        })
    });
end;
return v4.connect(function(v24)
    return {
        SmoothVoxelsUpgradePercent = v24.Tools.SmoothVoxelsUpgradePercent
    };
end, function()
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Theme = v7.DEPRECATED_Theme,
    SmoothVoxelsController = v11,
    Terrain = v7.Terrain,
    analytics = l_ContextServices_0.Analytics,
    Plugin = l_ContextServices_0.Plugin
})(v16)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.RoactRodux);
local v2 = require(l_Parent_0.Src.Components.Tools.BaseBrush);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v4 = require(l_Actions_0.ApplyToolAction);
local v5 = require(l_Actions_0.ChangeBaseSize);
local v6 = require(l_Actions_0.ChangeHeight);
local v7 = require(l_Actions_0.ChangePivot);
local v8 = require(l_Actions_0.ChooseBrushShape);
local v9 = require(l_Actions_0.SetBaseSizeHeightLocked);
local v10 = require(l_Actions_0.SetEditPlaneMode);
local v11 = require(l_Actions_0.SetIgnoreWater);
local v12 = require(l_Actions_0.SetIgnoreParts);
local v13 = require(l_Actions_0.SetPlaneCFrame);
local v14 = require(l_Actions_0.SetPlaneLock);
local v15 = require(l_Actions_0.SetSnapToVoxels);
local v16 = require(l_Parent_0.Src.Util.TerrainEnums);
return v1.connect(function(v17, _)
    return {
        toolName = v16.ToolId.Subtract,
        baseSize = v17.SubtractTool.baseSize,
        baseSizeHeightLocked = v17.SubtractTool.baseSizeHeightLocked,
        brushShape = v17.SubtractTool.brushShape,
        height = v17.SubtractTool.height,
        ignoreWater = v17.SubtractTool.ignoreWater,
        ignoreParts = v17.SubtractTool.ignoreParts,
        pivot = v17.SubtractTool.pivot,
        planeLock = v17.BaseTool.planeLock,
        snapToVoxels = v17.SubtractTool.snapToVoxels,
        editPlaneMode = v17.BaseTool.editPlaneMode,
        planeCFrame = v17.BaseTool.planeCFrame
    };
end, function(v19)
    local function _(v20)
        v19(v4("SubtractTool", v20));
    end;
    local function _(v22)
        v19(v4("BaseTool", v22));
    end;
    return {
        dispatchChangeBaseSize = function(v24)
            v19(v4("SubtractTool", (v5(v24))));
        end,
        dispatchChangeHeight = function(v25)
            v19(v4("SubtractTool", (v6(v25))));
        end,
        dispatchChangePivot = function(v26)
            v19(v4("SubtractTool", (v7(v26))));
        end,
        dispatchChooseBrushShape = function(v27)
            v19(v4("SubtractTool", (v8(v27))));
        end,
        dispatchSetBaseSizeHeightLocked = function(v28)
            v19(v4("SubtractTool", (v9(v28))));
        end,
        dispatchSetIgnoreWater = function(v29)
            v19(v4("SubtractTool", (v11(v29))));
        end,
        dispatchSetIgnoreParts = function(v30)
            v19(v4("SubtractTool", (v12(v30))));
        end,
        dispatchSetPlaneLock = function(v31)
            v19(v4("BaseTool", (v14(v31))));
        end,
        dispatchSetEditPlaneMode = function(v32)
            v19(v4("BaseTool", (v10(v32))));
        end,
        dispatchSetPlaneCFrame = function(v33)
            v19(v4("BaseTool", (v13(v33))));
        end,
        dispatchSetSnapToVoxels = function(v34)
            v19(v4("SubtractTool", (v15(v34))));
        end
    };
end)(v2);


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.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.ContextItems);
local l_Checkbox_0 = v2.UI.Checkbox;
local v7 = require(l_Parent_0.Src.Util.Constants);
local l_Biome_0 = require(l_Parent_0.Src.Util.TerrainEnums).Biome;
local v9 = {
    l_Biome_0.Water,
    l_Biome_0.Marsh,
    l_Biome_0.Plains,
    l_Biome_0.Hills,
    l_Biome_0.Dunes,
    l_Biome_0.Canyons,
    l_Biome_0.Mountains,
    l_Biome_0.Lavascape,
    l_Biome_0.Arctic
};
local v10 = v1.PureComponent:extend("BiomeSelector");
v10.render = function(v11)
    local v12 = v11.props.Theme:get();
    local l_Localization_0 = v11.props.Localization;
    local l_selectBiome_0 = v11.props.selectBiome;
    local l_biomeSelection_0 = v11.props.biomeSelection;
    local l_LayoutOrder_0 = v11.props.LayoutOrder;
    local v17 = {
        LayoutPadding = v1.createElement("UIPadding", {
            PaddingTop = UDim.new(0, 9),
            PaddingBottom = UDim.new(0, 9),
            PaddingLeft = UDim.new(0, 9),
            PaddingRight = UDim.new(0, 9)
        }),
        GridLayout = v1.createElement("UIGridLayout", {
            CellSize = UDim2.new(0, 86, 0, 16),
            CellPadding = UDim2.new(0, 20, 0, 8),
            SortOrder = Enum.SortOrder.LayoutOrder
        })
    };
    for v18, v19 in ipairs(v9) do
        v17[v19] = v1.createElement(l_Checkbox_0, {
            Checked = l_biomeSelection_0[v19],
            OnClick = l_selectBiome_0,
            Key = v19,
            LayoutOrder = v18,
            Text = l_Localization_0:getText("Generate", v7.BiomeToLocalizationKey[v19])
        });
    end;
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 148),
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Label = v1.createElement("TextLabel", {
            Text = l_Localization_0:getText("MaterialSettings", "ChooseBiome"),
            Font = v12.font,
            TextSize = v12.textSize,
            TextColor3 = v12.textColor,
            Size = UDim2.new(1, 0, 0, 16),
            TextXAlignment = Enum.TextXAlignment.Left,
            Position = UDim2.new(0, 20, 0, 0),
            BackgroundTransparency = 1
        }),
        Border = v1.createElement("Frame", {
            Size = UDim2.new(0, 229, 0, 128),
            Position = UDim2.new(0, 20, 0, 20),
            BackgroundColor3 = v12.backgroundColor,
            BorderColor3 = v12.borderColor
        }, v17)
    });
end;
return (l_withContext_0({
    Theme = v5.DEPRECATED_Theme,
    Localization = l_ContextServices_0.Localization
})(v10));