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

import { Disposable } from '@sussudio/base/common/lifecycle.mjs';
import { URI } from '@sussudio/base/common/uri.mjs';
import { IExtensionsProfileScannerService } from '../common/extensionsProfileScannerService.mjs';
import { IExtensionsScannerService } from '../common/extensionsScannerService.mjs';
import { INativeServerExtensionManagementService } from './extensionManagementService.mjs';
import { IExtensionIdentifier } from '../../extensions/common/extensions.mjs';
import { IFileService } from '../../files/common/files.mjs';
import { ILogService } from '../../log/common/log.mjs';
import { IUriIdentityService } from '../../uriIdentity/common/uriIdentity.mjs';
import { IUserDataProfilesService } from '../../userDataProfile/common/userDataProfile.mjs';
export interface DidChangeProfileExtensionsEvent {
	readonly added?: {
		readonly extensions: readonly IExtensionIdentifier[];
		readonly profileLocation: URI;
	};
	readonly removed?: {
		readonly extensions: readonly IExtensionIdentifier[];
		readonly profileLocation: URI;
	};
}
export declare class ExtensionsWatcher extends Disposable {
	private readonly extensionManagementService;
	private readonly extensionsScannerService;
	private readonly userDataProfilesService;
	private readonly extensionsProfileScannerService;
	private readonly uriIdentityService;
	private readonly fileService;
	private readonly logService;
	private readonly _onDidChangeExtensionsByAnotherSource;
	readonly onDidChangeExtensionsByAnotherSource: import('@sussudio/base/common/event.mjs').Event<DidChangeProfileExtensionsEvent>;
	private readonly allExtensions;
	private readonly extensionsProfileWatchDisposables;
	constructor(
		extensionManagementService: INativeServerExtensionManagementService,
		extensionsScannerService: IExtensionsScannerService,
		userDataProfilesService: IUserDataProfilesService,
		extensionsProfileScannerService: IExtensionsProfileScannerService,
		uriIdentityService: IUriIdentityService,
		fileService: IFileService,
		logService: ILogService,
	);
	private initialize;
	private registerListeners;
	private onDidChangeProfiles;
	private onAddExtensions;
	private onDidAddExtensions;
	private onRemoveExtensions;
	private onDidRemoveExtensions;
	private onDidFilesChange;
	private onDidExtensionsProfileChange;
	private populateExtensionsFromProfile;
	private removeExtensionsFromProfile;
	private uninstallExtensionsNotInProfiles;
	private addExtensionWithKey;
	private removeExtensionWithKey;
	private getKey;
	private fromKey;
}
