local w=require(script.Parent.Parent.Core.Aggregate.Aggregate)return{serializers={[w]=function(w,O)return{type="\095\097\103\103\114\101\103\097\116\101",name=w.name;instance=O.replicator:_serialize(w.instance)}end};deserializers={_aggregate=function(w,O)local T=O.replicator:_deserialize(w.instance)return(O:getEntity(T,"\114\101\112\108\105\099\097\116\111\114")):getComponent(w.name)end}}
local Aggregate = require(script.Parent.Parent.Core.Aggregate.Aggregate)

return {
	serializers = {
		[Aggregate] = function(aggregate, rocs)

			return {
				type = "_aggregate";
				name = aggregate.name;
				instance = rocs.replicator:_serialize(aggregate.instance);
			}
		end
	};

	deserializers = {
		_aggregate = function(data, rocs)
			local instance = rocs.replicator:_deserialize(data.instance)

			return rocs:getEntity(instance, "replicator"):getComponent(data.name)
		end
	};
}
