const fileName_1 = "(@effect/core) _src/stream/GroupBy/operations/_internal/mapDequeue.ts";
import * as tsplus_module_1 from "@effect/core/io/Effect/operations/map";
import * as tsplus_module_2 from "@tsplus/stdlib/collections/Chunk/map";
import { QueueProto } from "@effect/core/io/Queue/definition";
export function mapDequeue(dequeue, f) {
  const base = {
    capacity: dequeue.capacity,
    size: dequeue.size,
    awaitShutdown: dequeue.awaitShutdown,
    shutdown: dequeue.shutdown,
    isShutdown: dequeue.isShutdown,
    take: tsplus_module_1.map_(dequeue.take, a => f(a), fileName_1 + ":11:27"),
    takeAll: tsplus_module_1.map_(dequeue.takeAll, chunk => tsplus_module_2.map_(chunk, a => f(a)), fileName_1 + ":12:33"),

    takeUpTo(max, __tsplusTrace) {
      return tsplus_module_1.map_(dequeue.takeUpTo(max, fileName_1 + ":14:30"), chunk => tsplus_module_2.map_(chunk, a => f(a)), fileName_1 + ":14:39");
    }

  };
  return Object.assign(Object.create(QueueProto), base);
}
//# sourceMappingURL=mapDequeue.mjs.map