import { ServiceIdentifier } from '../../../../platform/instantiation/common/instantiation.js';
import { Event } from '../../../../base/common/event.js';
import { GroupIdentifier, IEditorPartOptions, IEditorPartOptionsChangeEvent } from '../../../common/editor.js';
import { IRectangle } from '../../../../platform/window/common/window.js';
import { IEditorGroupsContainer, IAuxiliaryEditorPartCreateEvent, IEditorPart, IEditorGroup, IAuxiliaryEditorPart } from './editorGroupsService.js';

declare const IEditorGroupsService: ServiceIdentifier<IEditorGroupsService>;
/**
* The main service to interact with editor groups across all opened editor parts.
*/
interface IEditorGroupsService extends IEditorGroupsContainer {
    readonly _serviceBrand: undefined;
    /**
    * An event for when a new auxiliary editor part is created.
    */
    readonly onDidCreateAuxiliaryEditorPart: Event<IAuxiliaryEditorPartCreateEvent>;
    /**
    * Provides access to the main window editor part.
    */
    readonly mainPart: IEditorPart;
    /**
    * Provides access to all editor parts.
    */
    readonly parts: ReadonlyArray<IEditorPart>;
    /**
    * Get the editor part that contains the group with the provided identifier.
    */
    getPart(group: IEditorGroup | GroupIdentifier): IEditorPart;
    /**
    * Get the editor part that is rooted in the provided container.
    */
    getPart(container: unknown): IEditorPart;
    /**
    * Access the options of the editor part.
    */
    readonly partOptions: IEditorPartOptions;
    /**
    * An event that notifies when editor part options change.
    */
    readonly onDidChangeEditorPartOptions: Event<IEditorPartOptionsChangeEvent>;
    /**
    * Opens a new window with a full editor part instantiated
    * in there at the optional position and size on screen.
    */
    createAuxiliaryEditorPart(options?: {
        bounds?: Partial<IRectangle>;
    }): Promise<IAuxiliaryEditorPart>;
}

export { IEditorGroupsService };
