import { Fiber } from "@effect/core/io/Fiber/definition";
import { Either } from "@tsplus/stdlib/data/Either/definition";
import { Exit } from "@effect/core/io/Exit/definition";
import { Effect } from "@effect/core/io/Effect/definition";
/**
 * @tsplus type ets/Channel/MergeState
 */
export declare type MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> = BothRunning<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> | LeftDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> | RightDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>;
export declare class BothRunning<_Env, Err, Err1, _Err2, Elem, Done, Done1, _Done2> {
    readonly left: Fiber<Err, Either<Done, Elem>>;
    readonly right: Fiber<Err1, Either<Done1, Elem>>;
    readonly _tag = "BothRunning";
    constructor(left: Fiber<Err, Either<Done, Elem>>, right: Fiber<Err1, Either<Done1, Elem>>);
}
export declare class LeftDone<Env, _Err, Err1, Err2, _Elem, _Done, Done1, Done2> {
    readonly f: (exit: Exit<Err1, Done1>) => Effect<Env, Err2, Done2>;
    readonly _tag = "LeftDone";
    constructor(f: (exit: Exit<Err1, Done1>) => Effect<Env, Err2, Done2>);
}
export declare class RightDone<Env, Err, _Err1, Err2, _Elem, Done, _Done1, Done2> {
    readonly f: (ex: Exit<Err, Done>) => Effect<Env, Err2, Done2>;
    readonly _tag = "RightDone";
    constructor(f: (ex: Exit<Err, Done>) => Effect<Env, Err2, Done2>);
}
/**
 * @tsplus type ets/Channel/MergeState/Ops
 */
export interface MergeStateOps {
}
export declare const MergeState: MergeStateOps;
/**
 * @tsplus static ets/Channel/MergeState/Ops BothRunning
 * @tsplus location "@effect/core/stream/Channel/MergeState"
 */
export declare function bothRunning<_Env, Err, Err1, _Err2, Elem, Done, Done1, _Done2>(left: Fiber<Err, Either<Done, Elem>>, right: Fiber<Err1, Either<Done1, Elem>>): MergeState<_Env, Err, Err1, _Err2, Elem, Done, Done1, _Done2>;
/**
 * @tsplus static ets/Channel/MergeState/Ops LeftDone
 * @tsplus location "@effect/core/stream/Channel/MergeState"
 */
export declare function leftDone<Env, _Err, Err1, Err2, _Elem, _Done, Done1, Done2>(f: (exit: Exit<Err1, Done1>) => Effect<Env, Err2, Done2>): MergeState<Env, _Err, Err1, Err2, _Elem, _Done, Done1, Done2>;
/**
 * @tsplus static ets/Channel/MergeState/Ops RightDone
 * @tsplus location "@effect/core/stream/Channel/MergeState"
 */
export declare function rightDone<Env, Err, _Err1, Err2, _Elem, Done, _Done1, Done2>(f: (ex: Exit<Err, Done>) => Effect<Env, Err2, Done2>): MergeState<Env, Err, _Err1, Err2, _Elem, Done, _Done1, Done2>;
//# sourceMappingURL=MergeState.d.ts.map