import { DocumentsMain } from '../../common/plugin-api-rpc';
import { UriComponents } from '../../common/uri-components';
import { EditorsAndDocumentsMain } from './editors-and-documents-main';
import { Disposable, UntitledResourceResolver } from '@theia/core';
import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
import { RPCProtocol } from '../../common/rpc-protocol';
import { EditorModelService } from './text-editor-model-service';
import { EditorManager, EditorOpenerOptions } from '@theia/editor/lib/browser';
import { ApplicationShell } from '@theia/core/lib/browser';
import { TextDocumentShowOptions } from '../../common/plugin-api-rpc-model';
import { OpenerService } from '@theia/core/lib/browser/opener-service';
import { Reference } from '@theia/core/lib/common/reference';
import { MonacoLanguages } from '@theia/monaco/lib/browser/monaco-languages';
import { NotebookDocumentsMainImpl } from './notebooks/notebook-documents-main';
export declare class ModelReferenceCollection {
    private readonly maxAge;
    private readonly maxLength;
    private data;
    private length;
    constructor(maxAge?: number, maxLength?: number);
    dispose(): void;
    add(ref: Reference<MonacoEditorModel>): void;
    private cleanup;
}
export declare class DocumentsMainImpl implements DocumentsMain, Disposable {
    private readonly modelService;
    private editorManager;
    private openerService;
    private shell;
    private untitledResourceResolver;
    private languageService;
    private readonly proxy;
    private readonly syncedModels;
    private readonly modelReferenceCache;
    protected saveTimeout: number;
    private readonly toDispose;
    constructor(editorsAndDocuments: EditorsAndDocumentsMain, notebookDocuments: NotebookDocumentsMainImpl, modelService: EditorModelService, rpc: RPCProtocol, editorManager: EditorManager, openerService: OpenerService, shell: ApplicationShell, untitledResourceResolver: UntitledResourceResolver, languageService: MonacoLanguages);
    dispose(): void;
    private onModelChanged;
    private onModelAdded;
    private onModelRemoved;
    $tryCreateDocument(options?: {
        language?: string;
        content?: string;
    }): Promise<UriComponents>;
    $tryShowDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise<void>;
    $trySaveDocument(uri: UriComponents): Promise<boolean>;
    $tryOpenDocument(uri: UriComponents): Promise<boolean>;
    $tryCloseDocument(uri: UriComponents): Promise<boolean>;
    static toEditorOpenerOptions(shell: ApplicationShell, options?: TextDocumentShowOptions): EditorOpenerOptions | undefined;
}
//# sourceMappingURL=documents-main.d.ts.map