import { BaseEvent, BaseRequestEvent } from ".";
import { DataChannel } from "../data-channel";
import { InputBody, LogBody } from "../models";
import { OutboundStreamOptions, PeerOptions } from "../options";
import { OutboundStream } from "../outbound-stream";
import { Peer } from "../peer";
import { RainwayConnection } from "../rainway-connection";
import { RainwayIncomingConnectionRequestType, RainwayInputEvent, RainwayInputLevel, RainwayPeerState, RainwayStreamRequestEvent } from "../rainway-ffi";
/**
 * An event that occurs when a {@link DataChannel} is created.
 */
export declare class DataChannelEvent extends BaseEvent<DataChannel> {
}
/**
 * An event that occurs when something is closed.
 */
export declare class CloseEvent extends BaseEvent<Error> {
}
/**
 * An event that occurs when input arrives for a given {@link OutboundStream}.
 * Can be used to prevent input event processing, preventing the host from handling the input.
 */
export declare class InputEvent extends BaseEvent<InputBody> {
    private _isPrevented;
    /**
     * Flag indicating if the input event has been prevented, in which case it will be ignored by the host.
     */
    get defaultPrevented(): boolean;
    /**
     * The ID of the peer emitting the input.
     */
    readonly id: BigInt;
    /**
     * Prevents the input event from being processed by the host.
     */
    preventDefault(): void;
    constructor(native: RainwayInputEvent);
}
/**
 * An event that occurs when the {@link RainwaySDK} logs data.
 */
export declare class LogEvent extends BaseEvent<LogBody> {
}
/**
 * An event that occurs when a {@link DataChannel} gets a message.
 */
export declare class MessageEvent extends BaseEvent<Uint8Array> {
    /**
     * UTF8 representation of the message data.
     */
    get asString(): string;
}
/**
 * An event that occurs when a {@link Peer} changes {@link RainwayPeerState}.
 */
export declare class PeerStateChangeEvent extends BaseEvent<RainwayPeerState> {
}
/**
 *  An event that occurs when a {@link Peer} joins a {@link OutboundStream}.
 */
export declare class PeerJoinEvent extends BaseEvent<Peer> {
}
/**
 * An event that occurs when a {@link Peer} leaves a {@link OutboundStream}.
 */
export declare class PeerLeaveEvent extends BaseEvent<Peer> {
}
/**
 * An event that occurs when a remote peer requests to connect.
 */
export declare class PeerRequestEvent extends BaseRequestEvent<PeerOptions, Peer> {
    private owner;
    private input;
    /**
     * The ID of the peer requesting the connection.
     */
    readonly id: BigInt;
    /**
     * The ExternalId of the peer requesting the connection.
     */
    readonly externalId: string;
    constructor(owner: RainwayConnection, input: RainwayIncomingConnectionRequestType, onAccepted?: (peer: Peer) => void, onRejected?: (reason?: string) => void);
    protected acceptInternal(options?: PeerOptions): Promise<Peer>;
    protected rejectInternal(reason?: string): Promise<void>;
}
/**
 * An event that occurs when a remote peer requests an {@link OutboundStream}.
 */
export declare class StreamRequestEvent extends BaseRequestEvent<OutboundStreamOptions, OutboundStream> {
    private owner;
    private input;
    /**
     * The ID of the peer requesting the stream.
     */
    readonly id: BigInt;
    /**
     * The ExternalId of the peer requesting the stream.
     */
    readonly externalId: string;
    /**
     * The permissions requested by the peer.
     */
    readonly permissions: RainwayInputLevel;
    /**
     * Indicates if the peer requesting the stream supports app isolation.
     */
    readonly supportsAppIsolation: boolean;
    /** @internal */
    constructor(owner: Peer, input: RainwayStreamRequestEvent, onAccepted?: (stream: OutboundStream) => void, onRejected?: (reason?: string) => void);
    protected acceptInternal(options?: OutboundStreamOptions): Promise<OutboundStream>;
    protected rejectInternal(reason?: string): Promise<void>;
}
