import { Event } from "../../../../base/common/event.js";
import * as glob from "../../../../base/common/glob.js";
import { IDisposable } from "../../../../base/common/lifecycle.js";
import { URI } from "../../../../base/common/uri.js";
import { IUntypedEditorInput } from "../../../common/editor.js";
import { EditorAssociations, RegisteredEditorInfo, RegisteredEditorOptions, EditorInputFactoryObject, ResolvedEditor } from "./editorResolverService.js";
import { PreferredGroup } from "./editorService.js";
export declare const IEditorResolverService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IEditorResolverService>;
export interface IEditorResolverService {
    readonly _serviceBrand: undefined;
    /**
    * Given a resource finds the editor associations that match it from the user's settings
    * @param resource The resource to match
    * @return The matching associations
    */
    getAssociationsForResource(resource: URI): EditorAssociations;
    /**
    * Updates the user's association to include a specific editor ID as a default for the given glob pattern
    * @param globPattern The glob pattern (must be a string as settings don't support relative glob)
    * @param editorID The ID of the editor to make a user default
    */
    updateUserAssociations(globPattern: string, editorID: string): void;
    /**
    * Emitted when an editor is registered or unregistered.
    */
    readonly onDidChangeEditorRegistrations: Event<void>;
    /**
    * Given a callback, run the callback pausing the registration emitter
    */
    bufferChangeEvents(callback: Function): void;
    /**
    * Registers a specific editor. Editors with the same glob pattern and ID will be grouped together by the resolver.
    * This allows for registration of the factories in different locations
    * @param globPattern The glob pattern for this registration
    * @param editorInfo Information about the registration
    * @param options Specific options which apply to this registration
    * @param editorFactoryObject The editor input factory functions
    */
    registerEditor(globPattern: string | glob.IRelativePattern, editorInfo: RegisteredEditorInfo, options: RegisteredEditorOptions, editorFactoryObject: EditorInputFactoryObject): IDisposable;
    /**
    * Given an editor resolves it to the suitable ResolvedEitor based on user extensions, settings, and built-in editors
    * @param editor The editor to resolve
    * @param preferredGroup The group you want to open the editor in
    * @returns An EditorInputWithOptionsAndGroup if there is an available editor or a status of how to proceed
    */
    resolveEditor(editor: IUntypedEditorInput, preferredGroup: PreferredGroup | undefined): Promise<ResolvedEditor>;
    /**
    * Given a resource returns all the editor ids that match that resource. If there is exclusive editor we return an empty array
    * @param resource The resource
    * @returns A list of editor ids
    */
    getEditors(resource: URI): RegisteredEditorInfo[];
    /**
    * A set of all the editors that are registered to the editor resolver.
    */
    getEditors(): RegisteredEditorInfo[];
    /**
    * Get a complete list of editor associations.
    */
    getAllUserAssociations(): EditorAssociations;
}
