/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { Event } from '@sussudio/base/common/event.mjs';
export interface IRemoteTunnelAccount {
	readonly providerId: string;
	readonly token: string;
	readonly accountLabel: string;
}
export declare const IRemoteTunnelService: import('../../instantiation/common/instantiation.mjs').ServiceIdentifier<IRemoteTunnelService>;
export interface IRemoteTunnelService {
	readonly _serviceBrand: undefined;
	readonly onDidTokenFailed: Event<boolean>;
	readonly onDidChangeTunnelStatus: Event<TunnelStatus>;
	getTunnelStatus(): Promise<TunnelStatus>;
	getAccount(): Promise<IRemoteTunnelAccount | undefined>;
	readonly onDidChangeAccount: Event<IRemoteTunnelAccount | undefined>;
	updateAccount(account: IRemoteTunnelAccount | undefined): Promise<TunnelStatus>;
	getHostName(): Promise<string | undefined>;
}
export type TunnelStatus =
	| TunnelStates.Connected
	| TunnelStates.Disconnected
	| TunnelStates.Connecting
	| TunnelStates.Uninitialized;
export declare namespace TunnelStates {
	interface Uninitialized {
		readonly type: 'uninitialized';
	}
	interface Connecting {
		readonly type: 'connecting';
		readonly progress?: string;
	}
	interface Connected {
		readonly type: 'connected';
		readonly info: ConnectionInfo;
	}
	interface Disconnected {
		readonly type: 'disconnected';
	}
	const disconnected: Disconnected;
	const uninitialized: Uninitialized;
	const connected: (info: ConnectionInfo) => Connected;
	const connecting: (progress?: string) => Connecting;
}
export interface ConnectionInfo {
	link: string;
	domain: string;
	hostName: string;
}
export declare const CONFIGURATION_KEY_PREFIX = 'remote.tunnels.access';
export declare const CONFIGURATION_KEY_HOST_NAME: string;
export declare const LOG_FILE_NAME = 'remoteTunnelService.log';
export declare const LOGGER_NAME = 'remoteTunnelService';
export declare const LOG_CHANNEL_ID = 'remoteTunnelServiceLog';
