import { Event, DynamicListEventMultiplexer, IDynamicListEventMultiplexer } from "../../../../base/common/event.js";
import { URI } from "../../../../base/common/uri.js";
import { TerminalCapability, ITerminalCapabilityImplMap } from "@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common/vscode/vs/platform/terminal/common/capabilities/capabilities";
import { TerminalLocation, ITerminalBackend, ITerminalLaunchError, type IShellLaunchConfig, type ITerminalProfile } from "../../../../platform/terminal/common/terminal.js";
import { GroupIdentifier } from "../../../common/editor.js";
import { IEditableData } from "../../../common/views.js";
import { SIDE_GROUP_TYPE, ACTIVE_GROUP_TYPE, AUX_WINDOW_GROUP_TYPE } from "../../../services/editor/common/editorService.js";
import { IStartExtensionTerminalRequest, ITerminalProcessExtHostProxy, IRemoteTerminalAttachTarget, type ITerminalConfiguration, type ITerminalFont } from "@codingame/monaco-vscode-7bbc9e7d-eeae-55fc-8bf9-dc2f66e0dc73-common/vscode/vs/workbench/contrib/terminal/common/terminal";
import { ITerminalInstanceHost, ITerminalInstance, IDetachedTerminalInstance, TerminalConnectionState, ITerminalGroup, ICreateTerminalOptions, IDetachedXTermOptions, ITerminalLocationOptions, ITerminalServiceNativeDelegate, type IDeserializedTerminalEditorInput, type TerminalEditorLocation } from "./terminal.js";
import { IXtermCore } from "./xterm-private.js";
import { EditorInput } from "../../../common/editor/editorInput.js";
import { Orientation } from "../../../../base/browser/ui/sash/sash.js";
export declare const ITerminalService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<ITerminalService>;
export interface ITerminalService extends ITerminalInstanceHost {
    readonly _serviceBrand: undefined;
    readonly instances: readonly ITerminalInstance[];
    readonly detachedInstances: Iterable<IDetachedTerminalInstance>;
    readonly defaultLocation: TerminalLocation;
    readonly isProcessSupportRegistered: boolean;
    readonly connectionState: TerminalConnectionState;
    readonly whenConnected: Promise<void>;
    readonly restoredGroupCount: number;
    readonly onDidCreateInstance: Event<ITerminalInstance>;
    readonly onDidChangeInstanceDimensions: Event<ITerminalInstance>;
    readonly onDidRequestStartExtensionTerminal: Event<IStartExtensionTerminalRequest>;
    readonly onDidRegisterProcessSupport: Event<void>;
    readonly onDidChangeConnectionState: Event<void>;
    readonly onDidChangeActiveGroup: Event<ITerminalGroup | undefined>;
    readonly onAnyInstanceData: Event<{
        instance: ITerminalInstance;
        data: string;
    }>;
    readonly onAnyInstanceDataInput: Event<ITerminalInstance>;
    readonly onAnyInstanceIconChange: Event<{
        instance: ITerminalInstance;
        userInitiated: boolean;
    }>;
    readonly onAnyInstanceMaximumDimensionsChange: Event<ITerminalInstance>;
    readonly onAnyInstancePrimaryStatusChange: Event<ITerminalInstance>;
    readonly onAnyInstanceProcessIdReady: Event<ITerminalInstance>;
    readonly onAnyInstanceSelectionChange: Event<ITerminalInstance>;
    readonly onAnyInstanceTitleChange: Event<ITerminalInstance>;
    createTerminal(options?: ICreateTerminalOptions): Promise<ITerminalInstance>;
    createDetachedTerminal(options: IDetachedXTermOptions): Promise<IDetachedTerminalInstance>;
    getInstanceFromId(terminalId: number): ITerminalInstance | undefined;
    getInstanceFromIndex(terminalIndex: number): ITerminalInstance;
    getReconnectedTerminals(reconnectionOwner: string): ITerminalInstance[] | undefined;
    getActiveOrCreateInstance(options?: {
        acceptsInput?: boolean;
    }): Promise<ITerminalInstance>;
    revealTerminal(source: ITerminalInstance, preserveFocus?: boolean): Promise<void>;
    revealActiveTerminal(preserveFocus?: boolean): Promise<void>;
    moveToEditor(source: ITerminalInstance, group?: GroupIdentifier | SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | AUX_WINDOW_GROUP_TYPE): void;
    moveIntoNewEditor(source: ITerminalInstance): void;
    moveToTerminalView(source: ITerminalInstance | URI): Promise<void>;
    getPrimaryBackend(): ITerminalBackend | undefined;
    refreshActiveGroup(): void;
    registerProcessSupport(isSupported: boolean): void;
    showProfileQuickPick(type: "setDefault" | "createInstance", cwd?: string | URI): Promise<ITerminalInstance | undefined>;
    setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void;
    requestStartExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): Promise<ITerminalLaunchError | undefined>;
    isAttachedToTerminal(remoteTerm: IRemoteTerminalAttachTarget): boolean;
    getEditableData(instance: ITerminalInstance): IEditableData | undefined;
    setEditable(instance: ITerminalInstance, data: IEditableData | null): void;
    isEditable(instance: ITerminalInstance | undefined): boolean;
    safeDisposeTerminal(instance: ITerminalInstance): Promise<void>;
    getDefaultInstanceHost(): ITerminalInstanceHost;
    getInstanceHost(target: ITerminalLocationOptions | undefined): Promise<ITerminalInstanceHost>;
    resolveLocation(location?: ITerminalLocationOptions): Promise<TerminalLocation | undefined>;
    setNativeDelegate(nativeCalls: ITerminalServiceNativeDelegate): void;
    getEditingTerminal(): ITerminalInstance | undefined;
    setEditingTerminal(instance: ITerminalInstance | undefined): void;
    createOnInstanceEvent<T>(getEvent: (instance: ITerminalInstance) => Event<T>): DynamicListEventMultiplexer<ITerminalInstance, T>;
    createOnInstanceCapabilityEvent<T extends TerminalCapability, K>(capabilityId: T, getEvent: (capability: ITerminalCapabilityImplMap[T]) => Event<K>): IDynamicListEventMultiplexer<{
        instance: ITerminalInstance;
        data: K;
    }>;
}
export declare const ITerminalConfigurationService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<ITerminalConfigurationService>;
export interface ITerminalConfigurationService {
    readonly _serviceBrand: undefined;
    readonly config: Readonly<ITerminalConfiguration>;
    readonly onConfigChanged: Event<void>;
    setPanelContainer(panelContainer: HTMLElement): void;
    configFontIsMonospace(): boolean;
    getFont(w: Window, xtermCore?: IXtermCore, excludeDimensions?: boolean): ITerminalFont;
}
export declare const ITerminalEditorService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<ITerminalEditorService>;
export interface ITerminalEditorService extends ITerminalInstanceHost {
    readonly _serviceBrand: undefined;
    readonly instances: readonly ITerminalInstance[];
    openEditor(instance: ITerminalInstance, editorOptions?: TerminalEditorLocation): Promise<void>;
    detachInstance(instance: ITerminalInstance): void;
    splitInstance(instanceToSplit: ITerminalInstance, shellLaunchConfig?: IShellLaunchConfig): ITerminalInstance;
    revealActiveEditor(preserveFocus?: boolean): Promise<void>;
    resolveResource(instance: ITerminalInstance): URI;
    reviveInput(deserializedInput: IDeserializedTerminalEditorInput): EditorInput;
    getInputFromResource(resource: URI): EditorInput;
}
export declare const ITerminalGroupService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<ITerminalGroupService>;
export interface ITerminalGroupService extends ITerminalInstanceHost {
    readonly _serviceBrand: undefined;
    readonly instances: readonly ITerminalInstance[];
    readonly groups: readonly ITerminalGroup[];
    activeGroup: ITerminalGroup | undefined;
    readonly activeGroupIndex: number;
    lastAccessedMenu: "inline-tab" | "tab-list";
    readonly onDidChangeActiveGroup: Event<ITerminalGroup | undefined>;
    readonly onDidDisposeGroup: Event<ITerminalGroup>;
    readonly onDidChangeGroups: Event<void>;
    readonly onDidShow: Event<void>;
    readonly onDidChangePanelOrientation: Event<Orientation>;
    createGroup(shellLaunchConfig?: IShellLaunchConfig): ITerminalGroup;
    createGroup(instance?: ITerminalInstance): ITerminalGroup;
    getGroupForInstance(instance: ITerminalInstance): ITerminalGroup | undefined;
    moveGroup(source: ITerminalInstance | ITerminalInstance[], target: ITerminalInstance): void;
    moveGroupToEnd(source: ITerminalInstance | ITerminalInstance[]): void;
    moveInstance(source: ITerminalInstance, target: ITerminalInstance, side: "before" | "after"): void;
    unsplitInstance(instance: ITerminalInstance): void;
    joinInstances(instances: ITerminalInstance[]): void;
    instanceIsSplit(instance: ITerminalInstance): boolean;
    getGroupLabels(): string[];
    setActiveGroupByIndex(index: number): void;
    setActiveGroupToNext(): void;
    setActiveGroupToPrevious(): void;
    setActiveInstanceByIndex(terminalIndex: number): void;
    setContainer(container: HTMLElement): void;
    showPanel(focus?: boolean): Promise<void>;
    hidePanel(): void;
    focusTabs(): void;
    focusHover(): void;
    updateVisibility(): void;
}
export declare const ITerminalInstanceService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<ITerminalInstanceService>;
export interface ITerminalInstanceService {
    readonly _serviceBrand: undefined;
    onDidCreateInstance: Event<ITerminalInstance>;
    onDidRegisterBackend: Event<ITerminalBackend>;
    convertProfileToShellLaunchConfig(shellLaunchConfigOrProfile?: IShellLaunchConfig | ITerminalProfile, cwd?: string | URI): IShellLaunchConfig;
    createInstance(launchConfig: IShellLaunchConfig, target: TerminalLocation): ITerminalInstance;
    getBackend(remoteAuthority?: string): Promise<ITerminalBackend | undefined>;
    getRegisteredBackends(): IterableIterator<ITerminalBackend>;
    didRegisterBackend(backend: ITerminalBackend): void;
}
