import { BehaviorSubject, Observable } from 'rxjs';
import { IMotionMasterMessage } from './types';
export interface MotionMasterPubSubSocket {
    /**
     * Emits a boolean value when socket gets opened or closed.
     */
    readonly opened$: BehaviorSubject<boolean>;
    /**
     * Emits close events with code and reason data.
     * @link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close_event
     */
    readonly close$: Observable<{
        code: number;
        reason: string;
    }>;
    /**
     * Incoming data is a tuple of topic and decoded message.
     */
    readonly data$: Observable<[string, IMotionMasterMessage]>;
    /**
     * URL set in call to open.
     */
    get url(): string | undefined;
    /**
     * Open socket.
     *
     * The connected$ and eventually alive$ observables will emit true values.
     */
    open(url: string): void;
    /**
     * Reopen socket.
     *
     * Reopen if closed using the same url previously set in open.
     */
    reopen(): void;
    /**
     * Close socket.
     *
     * The opened$ and alive$ observables will emit false values.
     */
    close(): void;
}
