import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/empty";
import * as tsplus_module_2 from "@tsplus/stdlib/collections/Chunk/concat";
import * as tsplus_module_3 from "@tsplus/stdlib/collections/SortedMap/reduce";
import * as tsplus_module_4 from "@tsplus/stdlib/data/Tuple/make";
import * as tsplus_module_5 from "@effect/core/stm/TRef/operations/modify";
import { concreteTPriorityQueue } from "@effect/core/stm/TPriorityQueue/operations/_internal/InternalTPriorityQueue";
/**
 * Takes all values from the queue.
 *
 * @tsplus getter ets/TPriorityQueue takeAll
 */

export function takeAll(self) {
  void 0;
  return tsplus_module_5.modify_(self.map, map => tsplus_module_4.make(tsplus_module_3.reduce_(map, tsplus_module_1.empty(), (acc, a) => tsplus_module_2.concat_(acc, a)), map));
}
//# sourceMappingURL=takeAll.mjs.map