function Util.MakeEnumType(o,V)local q=Util.MakeFuzzyFinder(V)return{Validate=function(V)return q(V,true)~=nil,("\086\097\108\117\101 \037\113 \105\115 \110\111\116 \097 \118\097\108\105\100 \037\115\046"):format(V,o)end,Autocomplete=function(o)local V=q(o)return type(V[1])~="\115\116\114\105\110\103"and Util.GetNames(V)or V end;Parse=function(o)return q(o,true)end}end
--- Makes an Enum type.
function Util.MakeEnumType(name, values)
	local findValue = Util.MakeFuzzyFinder(values)
	return {
		Validate = function(text)
			return findValue(text, true) ~= nil, ("Value %q is not a valid %s."):format(text, name)
		end,
		Autocomplete = function(text)
			local list = findValue(text)
			return type(list[1]) ~= "string" and Util.GetNames(list) or list
		end,
		Parse = function(text)
			return findValue(text, true)
		end,
	}
end
