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