local z=require(script.Parent.Parent.Shared.Util)return function(s)local B={Transform=function(B)local o=z.MakeFuzzyFinder(s:GetCommandNames())return o(B)end,Validate=function(z)return#z>0,"\078\111 \099\111\109\109\097\110\100 \119\105\116\104 \116\104\097\116 \110\097\109\101 \099\111\117\108\100 \098\101 \102\111\117\110\100\046"end,Autocomplete=function(z)return z end,Parse=function(z)return z[1]end}s:RegisterType("\099\111\109\109\097\110\100",B)s:RegisterType("\099\111\109\109\097\110\100\115",z.MakeListableType(B))end
local Util = require(script.Parent.Parent.Shared.Util)

return function(cmdr)
	local commandType = {
		Transform = function(text)
			local findCommand = Util.MakeFuzzyFinder(cmdr:GetCommandNames())

			return findCommand(text)
		end,

		Validate = function(commands)
			return #commands > 0, "No command with that name could be found."
		end,

		Autocomplete = function(commands)
			return commands
		end,

		Parse = function(commands)
			return commands[1]
		end,
	}

	cmdr:RegisterType("command", commandType)
	cmdr:RegisterType("commands", Util.MakeListableType(commandType))
end
