import * as tsplus_module_1 from "@effect/core/stream/Sink/operations/forEachChunk";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/succeed";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/map";
import * as tsplus_module_4 from "@effect/core/stream/Sink/operations/unwrap";
/**
 * Create a sink which enqueues each element into the specified queue.
 *
 * @tsplus static ets/Sink/Ops fromQueue
 */

export function fromQueue(queue, __tsplusTrace) {
  return tsplus_module_4.unwrap(() => tsplus_module_3.map_(tsplus_module_2.succeed(queue, __tsplusTrace), q => tsplus_module_1.forEachChunk(chunk => q.offerAll(chunk, __tsplusTrace), __tsplusTrace), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=fromQueue.mjs.map