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

import { IDisposable } from '@sussudio/base/common/lifecycle.mjs';
import { URI } from '@sussudio/base/common/uri.mjs';
import { IAddress } from '../../remote/common/remoteAgentConnection.mjs';
import { ITunnelService } from '../../tunnel/common/tunnel.mjs';
export interface IWebviewPortMapping {
	readonly webviewPort: number;
	readonly extensionHostPort: number;
}
/**
 * Manages port mappings for a single webview.
 */
export declare class WebviewPortMappingManager implements IDisposable {
	private readonly _getExtensionLocation;
	private readonly _getMappings;
	private readonly tunnelService;
	private readonly _tunnels;
	constructor(
		_getExtensionLocation: () => URI | undefined,
		_getMappings: () => readonly IWebviewPortMapping[],
		tunnelService: ITunnelService,
	);
	getRedirect(resolveAuthority: IAddress | null | undefined, url: string): Promise<string | undefined>;
	dispose(): Promise<void>;
	private getOrCreateTunnel;
}
