local S=Roact.PureComponent:extend(script.Name)function S.init(S)S.DockSize,S.SetDockSize=Roact.createBinding(UDim2.new())S.Maid=Maid.new()end function S.willUnmount(S)S.Maid:Destroy()end function S.render(S)return new("\073\109\097\103\101\066\117\116\116\111\110",{Image="";BackgroundTransparency=.75;BackgroundColor3=Color3.fromRGB(0,0,0),LayoutOrder=S.props.LayoutOrder,Size=UDim2.new(1,0,0,32),[Roact.Event.Activated]=function(G)S:setState({IsManualOpen=not S.state.IsManualOpen})end;[Roact.Event.MouseButton1Down]=function(G)local E=G.Parent local F=UserInputService:GetMouseLocation()-GuiService:GetGuiInset()local o=E.Position S.Maid.DockDragging=UserInputService.InputChanged:Connect(function(S)if S.UserInputType.Name=="\077\111\117\115\101\077\111\118\101\109\101\110\116"or S.UserInputType.Name=="\084\111\117\099\104"then if(Vector2.new(S.Position.X,S.Position.Y)-F).Magnitude>3 then G.Active=false end E.Position=UDim2.new(o.X.Scale,o.X.Offset+(S.Position.X-F.X),o.Y.Scale,o.Y.Offset+(S.Position.Y-F.Y))end end)S.Maid.DockDraggingEnd=UserInputService.InputEnded:Connect(function(E)if E.UserInputType.Name=="\077\111\117\115\101\066\117\116\116\111\110\049"or E.UserInputType.Name=="\084\111\117\099\104"then S.Maid.DockDragging=nil S.Maid.DockDraggingEnd=nil G.Active=true end end)end},{Corners=new("\085\073\067\111\114\110\101\114",{CornerRadius=UDim.new(0,3)}),Signature=new("\073\109\097\103\101\076\097\098\101\108",{AnchorPoint=Vector2.new(0,.5);BackgroundTransparency=1,Size=UDim2.new(1,0,0,13);Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\051\050\054\054\056\053\048\054\054";Position=UDim2.new(0,6,.5,0)},{AspectRatio=new("\085\073\065\115\112\101\099\116\082\097\116\105\111\067\111\110\115\116\114\097\105\110\116",{AspectRatio=2.385})});HelpIcon=new("\073\109\097\103\101\076\097\098\101\108",{AnchorPoint=Vector2.new(1,.5),BackgroundTransparency=1,Position=UDim2.new(1,0,.5,0),Size=UDim2.new(0,30,0,30);Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\052\049\057\049\049\057\055\051"}),ManualWindowPortal=new(Roact.Portal,{target=S.props.Core.UI},{ManualWindow=(S.state.IsManualOpen or nil)and new(ToolManualWindow,{Text=MANUAL_CONTENT;ThemeColor=Color3.fromRGB(255,176,0)})})})end return S

local AboutPane = Roact.PureComponent:extend(script.Name)

function AboutPane:init()
    self.DockSize, self.SetDockSize = Roact.createBinding(UDim2.new())
    self.Maid = Maid.new()
end

function AboutPane:willUnmount()
    self.Maid:Destroy()
end

function AboutPane:render()
    return new('ImageButton', {
        Image = '';
        BackgroundTransparency = 0.75;
        BackgroundColor3 = Color3.fromRGB(0, 0, 0);
        LayoutOrder = self.props.LayoutOrder;
        Size = UDim2.new(1, 0, 0, 32);
        [Roact.Event.Activated] = function (rbx)
            self:setState({
                IsManualOpen = not self.state.IsManualOpen;
            })
        end;
        [Roact.Event.MouseButton1Down] = function (rbx)
            local Dock = rbx.Parent
            local InitialAbsolutePosition = UserInputService:GetMouseLocation() - GuiService:GetGuiInset()
            local InitialPosition = Dock.Position

            self.Maid.DockDragging = UserInputService.InputChanged:Connect(function (Input)
                if (Input.UserInputType.Name == 'MouseMovement') or (Input.UserInputType.Name == 'Touch') then

                    -- Suppress activation response if dragging detected
                    if (Vector2.new(Input.Position.X, Input.Position.Y) - InitialAbsolutePosition).Magnitude > 3 then
                        rbx.Active = false
                    end

                    -- Reposition dock
                    Dock.Position = UDim2.new(
                        InitialPosition.X.Scale,
                        InitialPosition.X.Offset + (Input.Position.X - InitialAbsolutePosition.X),
                        InitialPosition.Y.Scale,
                        InitialPosition.Y.Offset + (Input.Position.Y - InitialAbsolutePosition.Y)
                    )
                end
            end)

            self.Maid.DockDraggingEnd = UserInputService.InputEnded:Connect(function (Input)
                if (Input.UserInputType.Name == 'MouseButton1') or (Input.UserInputType.Name == 'Touch') then
                    self.Maid.DockDragging = nil
                    self.Maid.DockDraggingEnd = nil
                    rbx.Active = true
                end
            end)
        end;
    }, {
        Corners = new('UICorner', {
            CornerRadius = UDim.new(0, 3);
        });
        Signature = new('ImageLabel', {
            AnchorPoint = Vector2.new(0, 0.5);
            BackgroundTransparency = 1;
            Size = UDim2.new(1, 0, 0, 13);
            Image = 'rbxassetid://2326685066';
            Position = UDim2.new(0, 6, 0.5, 0);
        }, {
            AspectRatio = new('UIAspectRatioConstraint', {
                AspectRatio = 2.385;
            });
        });
        HelpIcon = new('ImageLabel', {
            AnchorPoint = Vector2.new(1, 0.5);
            BackgroundTransparency = 1;
            Position = UDim2.new(1, 0, 0.5, 0);
            Size = UDim2.new(0, 30, 0, 30);
            Image = 'rbxassetid://141911973';

        });
        ManualWindowPortal = new(Roact.Portal, {
            target = self.props.Core.UI;
        }, {
            ManualWindow = (self.state.IsManualOpen or nil) and new(ToolManualWindow, {
                Text = MANUAL_CONTENT;
                ThemeColor = Color3.fromRGB(255, 176, 0);
            });
        });
    })
end

return AboutPane
