//#region src/channels/outbound/queue.ts
let seq = 0;
function createDeliveryQueue() {
	const pending = [];
	return {
		enqueue(item) {
			const id = `q:${Date.now()}:${++seq}`;
			pending.push({
				id,
				item,
				enqueuedAt: Date.now()
			});
			return id;
		},
		dequeue() {
			return pending.shift();
		},
		size() {
			return pending.length;
		}
	};
}
//#endregion
export { createDeliveryQueue };

//# sourceMappingURL=queue.js.map