local z=require(script.Stream)local A={}A.__index=A function A.new(z)local Y=setmetatable({CmdrAdditions=z,_streams={}},A)z.Network:HandleEvent("\083\116\114\101\097\109\069\118\101\110\116",function(z,A)local m=Y._streams[z]if m then m:_emit(A)end end)return Y end function A.GetStream(Y,A)local m=Y._streams[A]if not m then m=z.new(Y,A)Y._streams[A]=m end return m end return A
local Stream = require(script.Stream)

local StreamsClient = {}
StreamsClient.__index = StreamsClient

function StreamsClient.new(cmdrAdditions)
	local self = setmetatable({
		CmdrAdditions = cmdrAdditions,
		_streams = {}
	}, StreamsClient)

	cmdrAdditions.Network:HandleEvent("StreamEvent", function(streamName, event)
		local stream = self._streams[streamName]
		if stream then
			stream:_emit(event)
		end
	end)

	return self
end

function StreamsClient:GetStream(streamName)
	local stream = self._streams[streamName]

	if not stream then
		stream = Stream.new(self, streamName)
		self._streams[streamName] = stream
	end

	return stream
end

return StreamsClient