import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { Selection, TextDocumentPositionParameters, IModelService, IViewerService, Viewer, ViewerUpdate, ViewerId, CodeEditorWithModel } from '@adminide-stack/extension-api';
/**
 * Creates a {@link IViewerService} instance.
 *
 * @sri we have converted to class.
 */
export declare class ViewerService implements IViewerService {
    private modelSerivce;
    private id;
    private nextId;
    /** A map of viewer ids to code viewers. */
    private _viewers;
    private _viewerUpdates;
    private _activeViewerUpdates;
    private modelReferences;
    constructor(modelSerivce: Pick<IModelService, 'removeModel'>);
    /**
     * Returns the Viewer with teh given viewerId.
     * Throws if no viewer exists with the given viewerId.
     */
    private getViewer;
    get viewers(): Map<string, Viewer>;
    get viewerUpdates(): Subject<ViewerUpdate[]>;
    get activeViewerUpdates(): BehaviorSubject<Viewer>;
    addViewer: (viewerData: any) => Viewer;
    observeViewer: ({ viewerId }: {
        viewerId: any;
    }) => Observable<Viewer>;
    setSelections({ viewerId }: ViewerId, selections: Selection[]): void;
    removeViewer({ viewerId }: ViewerId): void;
    removeAllViewers(): void;
}
/**
 * Helper function to get the active viewer's {@link TextDocumentPositionParams} from
 * {@link ViewerSErvice#viewers}. IF there is no active viewer or it has no position, it returns
 * null.
 */
export declare function getActiveCodeEditorPosition(activeViewer: Viewer | undefined): TextDocumentPositionParameters | null;
/**
 * Observe a viewer and its model for changes.
 *
 * @param viewerId The ID of a **CodeEditor**.
 */
export declare function observeEditorAndModel({ viewerId }: ViewerId, { observeViewer }: Pick<IViewerService, 'observeViewer'>, { observeModel }: Pick<IModelService, 'observeModel'>): Observable<CodeEditorWithModel>;
