import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { MonitorEngine, MonitorEngineInterface } from '../api/monitor-engine.interface';
import { AbstractEditableDataStream } from '../utility/editable-data-stream';
declare type MonitoringControllerSubject = BehaviorSubject<Partial<MonitoringController.State>>;
export declare namespace MonitoringController {
    interface State {
        /**
         * If due time is a number, start will be delayed by dueTime value
         * If it's a date, monitoring will start on given date
         */
        dueTime: number | Date;
        /**
         * New monitoring state to activate
         */
        state: MonitorEngine.State;
        /**
         * Monitoring period in milliseconds
         */
        period: number;
        /**
         * True to trigger immediate refresh
         */
        refresh: boolean;
    }
}
export declare class MonitoringController implements MonitorEngineInterface {
    readonly initalState: MonitoringController.State;
    private subject;
    constructor(initalState?: MonitoringController.State);
    get state(): MonitorEngine.State | undefined;
    start(options?: MonitorEngine.StartOptions): this;
    stop(): this;
    pause(): this;
    setPeriod(period: number): void;
    asSubject(): MonitoringControllerSubject;
}
export declare function createDataStreamMonitor<StreamType extends AbstractEditableDataStream<unknown, DataType>, DataType>(stream: StreamType, ticker: Observable<MonitoringTickerState>, eventSubject: Subject<{
    type: 'error';
    error: Error;
    stream: StreamType;
    timerState: MonitoringTickerState;
}>): Observable<void | DataType>;
interface MonitoringTickerState {
    time: number;
    state: MonitoringController.State;
}
export declare function createMonitoringTicker(controller: MonitoringControllerSubject | MonitoringController): Observable<MonitoringTickerState>;
export {};
