/**
 * Pseudo-random generation through Effect's service context. The module exposes
 * effectful generators for booleans, doubles, safe integers, bounded numbers,
 * shuffling, and deterministic seeded runs.
 *
 * **Mental model**
 *
 * Randomness is read from the current {@link Random} service instead of a
 * global singleton. That makes random programs reproducible in tests and local
 * simulations with {@link withSeed}, while still allowing applications to
 * replace the service at the edge.
 *
 * **Common tasks**
 *
 * - Draw a floating-point value in `[0, 1)` with {@link next}
 * - Draw an integer with {@link nextInt} or {@link nextIntBetween}
 * - Draw a floating-point value in a custom range with {@link nextBetween}
 * - Randomize an iterable with {@link shuffle}
 * - Run the same random sequence repeatedly with {@link withSeed}
 *
 * **Gotchas**
 *
 * - The default service is not suitable for secrets, session identifiers,
 *   tokens, or other security-sensitive values.
 * - `withSeed` is deterministic by design. A predictable seed does not make
 *   generated values cryptographically secure.
 * - Bounded integer generation rounds bounds before drawing from the range.
 *
 * **Example** (Generating random values)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const randomFloat = yield* Random.next
 *   const randomInt = yield* Random.nextInt
 *   const diceRoll = yield* Random.nextIntBetween(1, 6)
 *
 *   return { randomFloat, randomInt, diceRoll }
 * })
 * ```
 *
 * @since 4.0.0
 */
import type * as Context from "./Context.ts";
import * as Effect from "./Effect.ts";
/**
 * Represents a service for generating pseudo-random numbers.
 *
 * **When to use**
 *
 * Use to access or provide the random-number generator service used by Effect
 * programs.
 *
 * **Gotchas**
 *
 * The default implementation is based on `Math.random` and is not
 * cryptographically secure. Replace the service with a cryptographically secure
 * implementation before using these generators for security-sensitive values.
 *
 * **Example** (Accessing the random service)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const float = yield* Random.next
 *   const integer = yield* Random.nextInt
 *   const inRange = yield* Random.nextIntBetween(1, 100)
 *
 *   console.log("Float:", float)
 *   console.log("Integer:", integer)
 *   console.log("In range:", inRange)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 2.0.0
 */
export declare const Random: Context.Reference<{
    nextIntUnsafe(): number;
    nextDoubleUnsafe(): number;
}>;
/**
 * Generates a random number between 0 (inclusive) and 1 (exclusive).
 *
 * **When to use**
 *
 * Use to generate a pseudo-random floating-point number in the standard
 * `[0, 1)` range.
 *
 * **Example** (Generating a random number)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const randomDouble = yield* Random.next
 *   console.log("Random double:", randomDouble)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 2.0.0
 */
export declare const next: Effect.Effect<number>;
/**
 * Generates a random boolean value.
 *
 * **When to use**
 *
 * Use to make a pseudo-random true-or-false choice.
 *
 * **Example** (Generating a random boolean)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const value = yield* Random.nextBoolean
 *   console.log("Random boolean:", value)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 2.0.0
 */
export declare const nextBoolean: Effect.Effect<boolean>;
/**
 * Generates a random integer between `Number.MIN_SAFE_INTEGER` (inclusive)
 * and `Number.MAX_SAFE_INTEGER` (inclusive).
 *
 * **When to use**
 *
 * Use to generate a pseudo-random safe integer across the full safe-integer
 * range.
 *
 * **Example** (Generating a random integer)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const randomInt = yield* Random.nextInt
 *   console.log("Random integer:", randomInt)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 2.0.0
 */
export declare const nextInt: Effect.Effect<number>;
/**
 * Generates a random number between `min` (inclusive) and `max` (exclusive).
 *
 * **When to use**
 *
 * Use to generate a pseudo-random floating-point number within a numeric range.
 *
 * **Example** (Generating a bounded random number)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const randomDouble = yield* Random.nextBetween(0, 1)
 *   console.log("Random double: ", randomDouble)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 4.0.0
 */
export declare const nextBetween: (min: number, max: number) => Effect.Effect<number>;
/**
 * Generates a random integer between `min` and `max`.
 *
 * **When to use**
 *
 * Use to generate a pseudo-random integer within a rounded numeric range.
 *
 * **Details**
 *
 * The lower bound is rounded up with `Math.ceil` and the upper bound is
 * rounded down with `Math.floor`. By default the range is inclusive; set
 * `options.halfOpen: true` to exclude the upper bound.
 *
 * **Example** (Generating a bounded random integer)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const diceRoll1 = yield* Random.nextIntBetween(1, 6)
 *   const diceRoll2 = yield* Random.nextIntBetween(1, 6, {
 *     halfOpen: true
 *   })
 *   const diceRoll3 = yield* Random.nextIntBetween(0, 10)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 2.0.0
 */
export declare const nextIntBetween: (min: number, max: number, options?: {
    readonly halfOpen?: boolean;
}) => Effect.Effect<number>;
/**
 * Uses the pseudo-random number generator to shuffle the specified iterable.
 *
 * **When to use**
 *
 * Use to randomly reorder an iterable using the active `Random` service.
 *
 * **Example** (Shuffling values)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const values = yield* Random.shuffle([1, 2, 3, 4, 5])
 *   console.log(values)
 * })
 * ```
 *
 * @category Random Number Generators
 * @since 2.0.0
 */
export declare const shuffle: <A>(elements: Iterable<A>) => Effect.Effect<Array<A>>;
/**
 * Seeds the pseudo-random number generator with the specified value.
 *
 * **When to use**
 *
 * Use to run an effect with a deterministic pseudo-random sequence.
 *
 * **Details**
 *
 * Using the same seed produces the same random sequence, which is useful for
 * tests and reproducible simulations.
 *
 * **Gotchas**
 *
 * Use an unpredictable seed when uniqueness or unpredictability matters.
 *
 * **Example** (Seeding random generation)
 *
 * ```ts
 * import { Effect, Random } from "effect"
 *
 * const program = Effect.gen(function*() {
 *   const value1 = yield* Random.next
 *   const value2 = yield* Random.next
 *   console.log(value1, value2)
 * })
 *
 * // Same seed produces same sequence
 * const seeded1 = program.pipe(Random.withSeed("my-seed"))
 * const seeded2 = program.pipe(Random.withSeed("my-seed"))
 *
 * // Both will output identical values
 * Effect.runPromise(seeded1)
 * Effect.runPromise(seeded2)
 * ```
 *
 * @category Seeding
 * @since 4.0.0
 */
export declare const withSeed: {
    /**
     * Seeds the pseudo-random number generator with the specified value.
     *
     * **When to use**
     *
     * Use to run an effect with a deterministic pseudo-random sequence.
     *
     * **Details**
     *
     * Using the same seed produces the same random sequence, which is useful for
     * tests and reproducible simulations.
     *
     * **Gotchas**
     *
     * Use an unpredictable seed when uniqueness or unpredictability matters.
     *
     * **Example** (Seeding random generation)
     *
     * ```ts
     * import { Effect, Random } from "effect"
     *
     * const program = Effect.gen(function*() {
     *   const value1 = yield* Random.next
     *   const value2 = yield* Random.next
     *   console.log(value1, value2)
     * })
     *
     * // Same seed produces same sequence
     * const seeded1 = program.pipe(Random.withSeed("my-seed"))
     * const seeded2 = program.pipe(Random.withSeed("my-seed"))
     *
     * // Both will output identical values
     * Effect.runPromise(seeded1)
     * Effect.runPromise(seeded2)
     * ```
     *
     * @category Seeding
     * @since 4.0.0
     */
    (seed: string | number): <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
    /**
     * Seeds the pseudo-random number generator with the specified value.
     *
     * **When to use**
     *
     * Use to run an effect with a deterministic pseudo-random sequence.
     *
     * **Details**
     *
     * Using the same seed produces the same random sequence, which is useful for
     * tests and reproducible simulations.
     *
     * **Gotchas**
     *
     * Use an unpredictable seed when uniqueness or unpredictability matters.
     *
     * **Example** (Seeding random generation)
     *
     * ```ts
     * import { Effect, Random } from "effect"
     *
     * const program = Effect.gen(function*() {
     *   const value1 = yield* Random.next
     *   const value2 = yield* Random.next
     *   console.log(value1, value2)
     * })
     *
     * // Same seed produces same sequence
     * const seeded1 = program.pipe(Random.withSeed("my-seed"))
     * const seeded2 = program.pipe(Random.withSeed("my-seed"))
     *
     * // Both will output identical values
     * Effect.runPromise(seeded1)
     * Effect.runPromise(seeded2)
     * ```
     *
     * @category Seeding
     * @since 4.0.0
     */
    <A, E, R>(self: Effect.Effect<A, E, R>, seed: string | number): Effect.Effect<A, E, R>;
};
//# sourceMappingURL=Random.d.ts.map