import { Injector } from '@opensumi/di';
import { IRPCProtocol } from '@opensumi/ide-connection';
import { Disposable, ILogger, QuickPickService } from '@opensumi/ide-core-browser';
import { AuthenticationProviderSessionOptions, AuthenticationSession, AuthenticationSessionAccountInformation, AuthenticationSessionsChangeEvent, IAuthenticationProvider, IAuthenticationService } from '@opensumi/ide-core-common';
import { IDialogService, IMessageService } from '@opensumi/ide-overlay';
import { IExtHostAuthentication, IMainThreadAuthentication } from '../../../common/vscode';
import { IActivationEventService } from '../../types';
export declare class MainThreadAuthenticationProvider extends Disposable implements IAuthenticationProvider {
    private readonly _proxy;
    readonly id: string;
    readonly label: string;
    readonly supportsMultipleAccounts: boolean;
    protected readonly authenticationService: IAuthenticationService;
    protected readonly quickPickService: QuickPickService;
    protected readonly dialogService: IDialogService;
    protected readonly messageService: IMessageService;
    protected readonly logger: ILogger;
    private _accounts;
    private _sessions;
    constructor(_proxy: IExtHostAuthentication, id: string, label: string, supportsMultipleAccounts: boolean);
    initialize(): Promise<void>;
    manageTrustedExtensions(accountName: string): Promise<void>;
    signOut(accountName: string): Promise<void>;
    getSessions(scopes?: string[], account?: AuthenticationSessionAccountInformation): Promise<ReadonlyArray<AuthenticationSession>>;
    hasSessions(): boolean;
    updateSessionItems(event: AuthenticationSessionsChangeEvent): Promise<void>;
    private registerCommandsAndContextMenuItems;
    private registerSession;
    login(scopes: string[], options: AuthenticationProviderSessionOptions): Promise<AuthenticationSession>;
    logout(sessionId: string): Promise<void>;
}
export declare class MainThreadAuthentication extends Disposable implements IMainThreadAuthentication {
    private readonly _proxy;
    protected readonly injector: Injector;
    protected readonly authenticationService: IAuthenticationService;
    protected readonly dialogService: IDialogService;
    protected readonly messageService: IMessageService;
    protected readonly quickPickService: QuickPickService;
    protected readonly activationService: IActivationEventService;
    constructor(protocol: IRPCProtocol);
    $getProviderIds(): Promise<string[]>;
    $registerAuthenticationProvider(id: string, label: string, supportsMultipleAccounts: boolean): Promise<void>;
    $unregisterAuthenticationProvider(id: string): void;
    $ensureProvider(id: string): Promise<void>;
    $sendDidChangeSessions(id: string, event: AuthenticationSessionsChangeEvent): void;
    $getSessions(id: string): Promise<ReadonlyArray<AuthenticationSession>>;
    $login(providerId: string, scopes: string[], options: AuthenticationProviderSessionOptions): Promise<AuthenticationSession>;
    $logout(providerId: string, sessionId: string): Promise<void>;
    $getAccounts(providerId: string): Promise<AuthenticationSessionAccountInformation[]>;
    private doGetSession;
    $getSession(providerId: string, scopes: string[], extensionId: string, extensionName: string, options: {
        createIfNone: boolean;
        clearSessionPreference: boolean;
    }): Promise<AuthenticationSession | undefined>;
    selectSession(providerId: string, providerName: string, extensionId: string, extensionName: string, potentialSessions: readonly AuthenticationSession[], scopes: string[], options: AuthenticationProviderSessionOptions, clearSessionPreference: boolean): Promise<AuthenticationSession>;
    $getSessionsPrompt(providerId: string, accountName: string, providerName: string, extensionId: string, extensionName: string): Promise<boolean>;
    loginPrompt(providerName: string, extensionName: string, recreatingSession: boolean, _detail?: string): Promise<boolean>;
    $setTrustedExtensionAndAccountPreference(providerId: string, accountName: string, extensionId: string, extensionName: string, sessionId: string): Promise<void>;
}
//# sourceMappingURL=main.thread.authentication.d.ts.map