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.PromiseRemoteFunctionMixin)assert(not Y._remoteFunctionName)Y.PromiseRemoteFunction=T.PromiseRemoteFunction Y._remoteFunctionName=w end function T.PromiseRemoteFunction(Y)return Y._maid:GivePromise(w(Y._obj,Y._remoteFunctionName))end return T
--- Intended for classes that extend BaseObject only
-- @module PromiseRemoteFunctionMixin
-- @author Quenty

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

local promiseChild = require("promiseChild")

local PromiseRemoteFunctionMixin = {}

function PromiseRemoteFunctionMixin:Add(class, remoteFunctionName)
	assert(remoteFunctionName)
	assert(not class.PromiseRemoteFunctionMixin)
	assert(not class._remoteFunctionName)

	class.PromiseRemoteFunction = self.PromiseRemoteFunction
	class._remoteFunctionName = remoteFunctionName
end

-- Initialize PromiseRemoteFunctionMixin
function PromiseRemoteFunctionMixin:PromiseRemoteFunction()
	return self._maid:GivePromise(promiseChild(self._obj, self._remoteFunctionName))
end


return PromiseRemoteFunctionMixin