local Y=require((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\078\101\118\101\114\109\111\114\101"))local w=Y("\112\114\111\109\105\115\101\067\104\105\108\100")local T={}function T.Add(T,Y,w)assert(w)assert(not Y.PromiseRemoteEventMixin)assert(not Y._remoteEventName)Y.PromiseRemoteEvent=T.PromiseRemoteEvent Y._remoteEventName=w end function T.PromiseRemoteEvent(Y)return Y._maid:GivePromise(w(Y._obj,Y._remoteEventName))end return T
--- Intended for classes that extend BaseObject only
-- @module PromiseRemoteEventMixin
-- @author Quenty

local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))

local promiseChild = require("promiseChild")

local PromiseRemoteEventMixin = {}

function PromiseRemoteEventMixin:Add(class, remoteEventName)
	assert(remoteEventName)
	assert(not class.PromiseRemoteEventMixin)
	assert(not class._remoteEventName)

	class.PromiseRemoteEvent = self.PromiseRemoteEvent
	class._remoteEventName = remoteEventName
end

-- Initialize PromiseRemoteEventMixin
function PromiseRemoteEventMixin:PromiseRemoteEvent()
	return self._maid:GivePromise(promiseChild(self._obj, self._remoteEventName))
end


return PromiseRemoteEventMixin