import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/empty";
import * as tsplus_module_2 from "@effect/core/stm/THub/operations/TDequeue/takeRemainder";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/suspend";
/**
 * Takes a number of elements from the queue between the specified minimum and
 * maximum. If there are fewer than the minimum number of elements available,
 * retries until at least the minimum number of elements have been collected.
 *
 * @tsplus fluent ets/THub/TDequeue takeBetween
 */

export function takeBetween_(self, min, max) {
  return tsplus_module_3.suspend(() => tsplus_module_2.takeRemainder_(self, min, max, tsplus_module_1.empty()));
}
/**
 * Takes a number of elements from the queue between the specified minimum and
 * maximum. If there are fewer than the minimum number of elements available,
 * retries until at least the minimum number of elements have been collected.
 *
 * @tsplus static ets/THub/TDequeue/Aspects takeBetween
 */

export const takeBetween = (min, max) => self => takeBetween_(self, min, max);
//# sourceMappingURL=takeBetween.mjs.map