local b=require(script.makeEnum)local w={}w.ActionKind=b("\074\111\121\116\111\110\046\065\099\116\105\111\110\075\105\110\100",{"\079\110\101\079\102\102","\067\111\110\116\105\110\117\111\117\115";"\065\120\105\115\049\100","\065\120\105\115\050\100"})w.InputKind=b("\074\111\121\116\111\110\046\073\110\112\117\116\075\105\110\100",{"\066\117\116\116\111\110","\068\080\097\100";"\065\120\105\115\049\100\065\098\115\111\108\117\116\101","\065\120\105\115\050\100\065\098\115\111\108\117\116\101";"\065\120\105\115\050\100\082\101\108\097\116\105\118\101"})function w.createMapping(b)local w={}function w.loadUserBindings(w,b)error("\110\111\116 \121\101\116 \105\109\112\108\101\109\101\110\116\101\100")end function w.saveUserBindings(b)error("\110\111\116 \121\101\116 \105\109\112\108\101\109\101\110\116\101\100")end return w end return w
local makeEnum = require(script.makeEnum)

local Joyton = {}

-- Kinds of semantic inputs that can be handled. These are separate from the
-- actual device used for input.
Joyton.ActionKind = makeEnum("Joyton.ActionKind", {
	-- Triggered and completed, like jumping.
	-- Value of type boolean
	-- TODO: Better name
	"OneOff",

	-- Triggered continuously, like aiming a weapon, even if toggled.
	-- Value of type boolean
	-- TODO: Better name
	"Continuous",

	-- One-dimensional and analog, like throttle in a car.
	-- Value of type number
	"Axis1d",

	-- Two-dimensional and analog, like player movement.
	-- Value of type Vector2
	"Axis2d",
})

-- Kinds of inputs that can come from devices and be mapped into semantically
-- meaningful actions.
Joyton.InputKind = makeEnum("Joyton.InputKind", {
	-- A button, like the space key or A button.
	"Button",

	-- A d-pad-ish input, like an actual d-pad or WASD on a keyboard.
	"DPad",

	-- An absolute single axis input, like triggers on a controller.
	"Axis1dAbsolute",

	-- An absolute dual axis input, like a gamepad stick.
	"Axis2dAbsolute",

	-- A relative dual axis input, like mouse movement.
	"Axis2dRelative",
})

function Joyton.createMapping(options)
	local mapping = {}

	function mapping:loadUserBindings(savedBindings)
		error("not yet implemented")
	end

	function mapping:saveUserBindings()
		error("not yet implemented")
	end

	return mapping
end

return Joyton