local Y=require(script.Parent.Parent.Type)local i={}local h={__tostring=function(Y)return("\082\111\097\099\116\072\111\115\116\069\118\101\110\116\040\037\115\041"):format(Y.name)end}setmetatable(i,{__index=function(x,C)local P={[Y]=Y.HostEvent;name=C}setmetatable(P,h)i[C]=P return P end})return i
--[[
	Index into `Event` to get a prop key for attaching to an event on a Roblox
	Instance.

	Example:

		Roact.createElement("TextButton", {
			Text = "Hello, world!",

			[Roact.Event.MouseButton1Click] = function(rbx)
				print("Clicked", rbx)
			end
		})
]]

local Type = require(script.Parent.Parent.Type)

local Event = {}

local eventMetatable = {
	__tostring = function(self)
		return ("RoactHostEvent(%s)"):format(self.name)
	end,
}

setmetatable(Event, {
	__index = function(_self, eventName)
		local event = {
			[Type] = Type.HostEvent,
			name = eventName,
		}

		setmetatable(event, eventMetatable)

		Event[eventName] = event

		return event
	end,
})

return Event
