/** ******************************************************************************
 * Copyright (C) 2018 Red Hat, Inc. and others.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the Eclipse
 * Public License v. 2.0 are satisfied: GNU General Public License, version 2
 * with the GNU Classpath Exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 ********************************************************************************/
import { IRPCProtocol } from '@opensumi/ide-connection';
import { CancellationToken, Event, UriComponents } from '@opensumi/ide-core-common';
import { IExtensionDescription } from '../../../common/vscode';
import { IExtHostSCMShape, IMainThreadSCMShape, SCMHistoryItemChangeDto, SCMHistoryItemDto } from '../../../common/vscode/scm';
import { ExtHostCommands } from './ext.host.command';
import type vscode from 'vscode';
export type IMainContext = IRPCProtocol;
export type IValidateInput = (value: string, cursorPosition: number) => vscode.ProviderResult<vscode.SourceControlInputBoxValidation | undefined | null>;
export declare class ExtHostSCMInputBox implements vscode.SourceControlInputBox {
    #private;
    private _extension;
    private _sourceControlHandle;
    private _value;
    get value(): string;
    set value(value: string);
    private _enabled;
    get enabled(): boolean;
    set enabled(enabled: boolean);
    private _onDidChange;
    get onDidChange(): Event<string>;
    private _placeholder;
    get placeholder(): string;
    set placeholder(placeholder: string);
    private _validateInput;
    get validateInput(): IValidateInput;
    set validateInput(fn: IValidateInput);
    private _visible;
    get visible(): boolean;
    set visible(visible: boolean);
    private _actionButton;
    private _actionButtonDisposables;
    get actionButton(): vscode.SourceControlInputBoxActionButton | undefined;
    set actionButton(actionButton: vscode.SourceControlInputBoxActionButton | undefined);
    constructor(_extension: IExtensionDescription, _proxy: IMainThreadSCMShape, _sourceControlHandle: number, _commands: ExtHostCommands);
    $onInputBoxValueChange(value: string): void;
    private updateValue;
}
export declare class ExtHostSCM implements IExtHostSCMShape {
    private _commands;
    protected readonly logger: import("@opensumi/ide-core-common").IDebugLog;
    private static _handlePool;
    private _proxy;
    private _sourceControls;
    private _sourceControlsByExtension;
    private _onDidChangeActiveProvider;
    get onDidChangeActiveProvider(): Event<vscode.SourceControl>;
    private _selectedSourceControlHandles;
    constructor(rpc: IRPCProtocol, _commands: ExtHostCommands);
    getSourceControl(extensionId: string, id: string): vscode.SourceControl[] | undefined;
    createSourceControl(extension: IExtensionDescription, id: string, label: string, rootUri: vscode.Uri | undefined): vscode.SourceControl;
    getLastInputBox(extension: IExtensionDescription): ExtHostSCMInputBox | undefined;
    $provideOriginalResource(sourceControlHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<UriComponents | null>;
    $onInputBoxValueChange(sourceControlHandle: number, value: string): Promise<void>;
    $executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number, preserveFocus: boolean): Promise<void>;
    $validateInput(sourceControlHandle: number, value: string, cursorPosition: number): Promise<[string, number] | undefined>;
    $setSelectedSourceControls(selectedSourceControlHandles: number[]): Promise<void>;
    $resolveHistoryItemGroupBase(sourceControlHandle: number, historyItemGroupId: string, token: CancellationToken): Promise<vscode.SourceControlHistoryItemGroup | undefined>;
    $resolveHistoryItemGroupCommonAncestor(sourceControlHandle: number, historyItemGroupId1: string, historyItemGroupId2: string, token: CancellationToken): Promise<{
        id: string;
        ahead: number;
        behind: number;
    } | undefined>;
    $provideHistoryItems(sourceControlHandle: number, historyItemGroupId: string, options: any, token: CancellationToken): Promise<SCMHistoryItemDto[] | undefined>;
    $provideHistoryItemChanges(sourceControlHandle: number, historyItemId: string, token: CancellationToken): Promise<SCMHistoryItemChangeDto[] | undefined>;
}
//# sourceMappingURL=ext.host.scm.d.ts.map