-- Decompiled with the Synapse X Luau decompiler.


local u1 = require(game:GetService("ReplicatedStorage").Packages.Fusion);
return function(p1)
	local v1 = {
		Name = "Button", 
		Size = UDim2.fromScale(1, 1), 
		BackgroundTransparency = 1
	};
	local l__GuiButtonState__2 = p1.GuiButtonState;
	v1[u1.OnEvent("InputBegan")] = function(p2)
		if p2.UserInputType == Enum.UserInputType.MouseMovement and p2.UserInputState == Enum.UserInputState.Change then
			l__GuiButtonState__2:set("Hovering");
		end;
		if p2.UserInputType == Enum.UserInputType.MouseButton1 and p2.UserInputState == Enum.UserInputState.Begin then
			l__GuiButtonState__2:set("Pressing");
		end;
		if p2.UserInputType == Enum.UserInputType.Touch and p2.UserInputState == Enum.UserInputState.Begin then
			l__GuiButtonState__2:set("Pressing");
		end;
	end;
	v1[u1.OnEvent("InputEnded")] = function(p3)
		if p3.UserInputType == Enum.UserInputType.MouseMovement and p3.UserInputState == Enum.UserInputState.Change then
			l__GuiButtonState__2:set("None");
		end;
		if p3.UserInputType == Enum.UserInputType.MouseButton1 and p3.UserInputState == Enum.UserInputState.End and l__GuiButtonState__2:get() == "Pressing" then
			l__GuiButtonState__2:set("Hovering");
		end;
		if p3.UserInputType == Enum.UserInputType.Touch and p3.UserInputState == Enum.UserInputState.End then
			l__GuiButtonState__2:set("None");
		end;
		if p3.UserInputType == Enum.UserInputType.Touch and p3.UserInputState == Enum.UserInputState.Change then
			l__GuiButtonState__2:set("None");
		end;
	end;
	v1[u1.OnEvent("Activated")] = p1.OnActivated;
	return u1.New("ImageButton")(v1);
end;
