function ElementUtils.getElementByKey(J,Y)if J==nil or typeof(J)=="\098\111\111\108\101\097\110"then return nil end if Type.of(J)==Type.Element then if Y==ElementUtils.UseParentKey then return J end return nil end if typeof(J)=="\116\097\098\108\101"then return J[Y]end error("\073\110\118\097\108\105\100 \101\108\101\109\101\110\116\115")end return ElementUtils
--[[
	Gets the child corresponding to a given key, respecting Roact's rules for
	children. Specifically:
	* If `elements` is nil or a boolean, this will return `nil`, regardless of
		the key given.
	* If `elements` is a single element, this will return `nil`, unless the key
		is ElementUtils.UseParentKey.
	* If `elements` is a table of elements, this will return `elements[key]`.
]]
function ElementUtils.getElementByKey(elements, hostKey)
	if elements == nil or typeof(elements) == "boolean" then
		return nil
	end

	if Type.of(elements) == Type.Element then
		if hostKey == ElementUtils.UseParentKey then
			return elements
		end

		return nil
	end

	if typeof(elements) == "table" then
		return elements[hostKey]
	end

	error("Invalid elements")
end

return ElementUtils
