local O=require(script.Parent.Parent.Type)local H={}local p={__tostring=function(O)return("\082\111\097\099\116\072\111\115\116\069\118\101\110\116\040\037\115\041"):format(O.name)end}setmetatable(H,{__index=function(g,t)local Q={[O]=O.HostEvent,name=t}setmetatable(Q,p)H[t]=Q return Q end})return H
--[[
	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
