import { Stream } from "@effect/core/stream/Stream/definition";
import { Effect } from "@effect/core/io/Effect/definition";
import { Exit } from "@effect/core/io/Exit/definition";
import { Maybe } from "@tsplus/stdlib/data/Maybe/definition";
import { Scope } from "@effect/core/io/Scope/definition";
import { Tuple } from "@tsplus/stdlib/data/Tuple/definition";
import { Dequeue, Queue } from "@effect/core/io/Queue/definition/common";
import { HashMap } from "@tsplus/stdlib/collections/HashMap/definition";
import { Ref } from "@effect/core/io/Ref/definition";
import { List } from "@tsplus/stdlib/collections/List/definition";
import type { UniqueKey } from "@effect/core/stream/GroupBy/definition";
/**
 * More powerful version of `Stream.distributedWith`. This returns a function
 * that will produce new queues and corresponding indices. You can also provide
 * a function that will be executed after the final events are enqueued in all
 * queues. Shutdown of the queues is handled by the driver. Downstream users can
 * also shutdown queues manually. In this case the driver will continue but no
 * longer backpressure on them.
 * @tsplus fluent ets/Stream distributedWithDynamic
 * @tsplus location "@effect/core/stream/Stream/operations/distributedWithDynamic"
 */
export declare function distributedWithDynamic_<R, E, A, Z>(self: Stream<R, E, A>, maximumLag: number, decide: (a: A) => Effect<never, never, (key: UniqueKey) => boolean>, done?: (exit: Exit<Maybe<E>, never>) => Effect<never, never, Z>, __tsplusTrace?: string): Effect<R | Scope, never, Effect<never, never, Tuple<[UniqueKey, Dequeue<Exit<Maybe<E>, A>>]>>>;
/**
 * More powerful version of `Stream.distributedWith`. This returns a function
 * that will produce new queues and corresponding indices. You can also provide
 * a function that will be executed after the final events are enqueued in all
 * queues. Shutdown of the queues is handled by the driver. Downstream users can
 * also shutdown queues manually. In this case the driver will continue but no
 * longer backpressure on them.
 * @tsplus pipeable ets/Stream distributedWithDynamic
 * @tsplus location "@effect/core/stream/Stream/operations/distributedWithDynamic"
 */
export declare const distributedWithDynamic: <E, A, Z>(maximumLag: number, decide: (a: A) => import("../../../io/Effect").Effect<never, never, (key: UniqueKey) => boolean>, done?: (exit: import("../../../io/Exit").Exit<import("@tsplus/stdlib/data/Maybe").Maybe<E>, never>) => import("../../../io/Effect").Effect<never, never, Z>, __tsplusTrace?: string) => <R>(self: import("../definition").Stream<R, E, A>) => import("../../../io/Effect").Effect<import("../../../io/Scope").Scope | R, never, import("../../../io/Effect").Effect<never, never, import("@tsplus/stdlib/data/Tuple").Tuple<[number, import("../../../io/Queue").Dequeue<import("../../../io/Exit").Exit<import("@tsplus/stdlib/data/Maybe").Maybe<E>, A>>]>>>;
//# sourceMappingURL=distributedWithDynamic.d.ts.map