local J=Roact.PureComponent:extend(script.Name)function J.init(J)J:setState({IsHovering=false})end function J.render(J)return new("\073\109\097\103\101\066\117\116\116\111\110",{BackgroundTransparency=1,Image=J.props.IconAssetId;LayoutOrder=J.props.LayoutOrder;ImageTransparency=J.props.IsActive and 0 or.5;[Roact.Event.Activated]=J.props.OnActivated;[Roact.Event.InputBegan]=function(k,d)if d.UserInputType.Name=="\077\111\117\115\101\077\111\118\101\109\101\110\116"then J:setState({IsHovering=true})end end,[Roact.Event.InputEnded]=function(k,d)if d.UserInputType.Name=="\077\111\117\115\101\077\111\118\101\109\101\110\116"then J:setState({IsHovering=false})end end},{Tooltip=new(Tooltip,{IsVisible=J.state.IsHovering;Text=J.props.TooltipText or""})})end return J

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

function SelectionButton:init()
    self:setState({
        IsHovering = false;
    })
end

function SelectionButton:render()
    return new('ImageButton', {
        BackgroundTransparency = 1;
        Image = self.props.IconAssetId;
        LayoutOrder = self.props.LayoutOrder;
        ImageTransparency = self.props.IsActive and 0 or 0.5;
        [Roact.Event.Activated] = self.props.OnActivated;
        [Roact.Event.InputBegan] = function (rbx, Input)
            if Input.UserInputType.Name == 'MouseMovement' then
                self:setState({
                    IsHovering = true;
                })
            end
        end;
        [Roact.Event.InputEnded] = function (rbx, Input)
            if Input.UserInputType.Name == 'MouseMovement' then
                self:setState({
                    IsHovering = false;
                })
            end
        end;
    }, {
        Tooltip = new(Tooltip, {
            IsVisible = self.state.IsHovering;
            Text = self.props.TooltipText or '';
        })
    });
end

return SelectionButton
