import { Event } from "../../../../base/common/event.js";
import { InstallExtensionResult, DidUninstallExtensionEvent, DidUpdateExtensionMetadata, type IGalleryExtension, type ILocalExtension, type InstallOptions, type Metadata } from "../../../../platform/extensionManagement/common/extensionManagement.js";
import { IExtensionManagementService } from "../../../../platform/extensionManagement/common/extensionManagement.service.js";
import { DidChangeProfileEvent, type DidChangeProfileForServerEvent, type DidUninstallExtensionOnServerEvent, type EnablementState, type ExtensionInstallLocation, type IExtensionManagementServer, type InstallExtensionOnServerEvent, type IResourceExtension, type IScannedExtension, type IWorkbenchInstallOptions, type ScanOptions, type UninstallExtensionOnServerEvent } from "./extensionManagement.js";
import { IExtension, type ExtensionType, type IExtensionManifest } from "../../../../platform/extensions/common/extensions.js";
import { IMarkdownString } from "../../../../base/common/htmlContent.js";
import { URI } from "../../../../base/common/uri.js";
export declare const IProfileAwareExtensionManagementService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IProfileAwareExtensionManagementService>;
export interface IProfileAwareExtensionManagementService extends IExtensionManagementService {
    readonly onProfileAwareDidInstallExtensions: Event<readonly InstallExtensionResult[]>;
    readonly onProfileAwareDidUninstallExtension: Event<DidUninstallExtensionEvent>;
    readonly onProfileAwareDidUpdateExtensionMetadata: Event<DidUpdateExtensionMetadata>;
    readonly onDidChangeProfile: Event<DidChangeProfileEvent>;
}
export declare const IExtensionManagementServerService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IExtensionManagementServerService>;
export interface IExtensionManagementServerService {
    readonly _serviceBrand: undefined;
    readonly localExtensionManagementServer: IExtensionManagementServer | null;
    readonly remoteExtensionManagementServer: IExtensionManagementServer | null;
    readonly webExtensionManagementServer: IExtensionManagementServer | null;
    getExtensionManagementServer(extension: IExtension): IExtensionManagementServer | null;
    getExtensionInstallLocation(extension: IExtension): ExtensionInstallLocation | null;
}
export declare const IWorkbenchExtensionManagementService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkbenchExtensionManagementService>;
export interface IWorkbenchExtensionManagementService extends IProfileAwareExtensionManagementService {
    readonly _serviceBrand: undefined;
    readonly onInstallExtension: Event<InstallExtensionOnServerEvent>;
    readonly onDidInstallExtensions: Event<readonly InstallExtensionResult[]>;
    readonly onUninstallExtension: Event<UninstallExtensionOnServerEvent>;
    readonly onDidUninstallExtension: Event<DidUninstallExtensionOnServerEvent>;
    readonly onDidChangeProfile: Event<DidChangeProfileForServerEvent>;
    readonly onDidEnableExtensions: Event<IExtension[]>;
    readonly onProfileAwareDidInstallExtensions: Event<readonly InstallExtensionResult[]>;
    readonly onProfileAwareDidUninstallExtension: Event<DidUninstallExtensionOnServerEvent>;
    readonly onProfileAwareDidUpdateExtensionMetadata: Event<DidUpdateExtensionMetadata>;
    getExtensions(locations: URI[]): Promise<IResourceExtension[]>;
    getInstalledWorkspaceExtensionLocations(): URI[];
    getInstalledWorkspaceExtensions(includeInvalid: boolean): Promise<ILocalExtension[]>;
    canInstall(extension: IGalleryExtension | IResourceExtension): Promise<true | IMarkdownString>;
    installVSIX(location: URI, manifest: IExtensionManifest, installOptions?: InstallOptions): Promise<ILocalExtension>;
    installFromGallery(gallery: IGalleryExtension, installOptions?: IWorkbenchInstallOptions): Promise<ILocalExtension>;
    installFromLocation(location: URI): Promise<ILocalExtension>;
    installResourceExtension(extension: IResourceExtension, installOptions: InstallOptions): Promise<ILocalExtension>;
    updateFromGallery(gallery: IGalleryExtension, extension: ILocalExtension, installOptions?: InstallOptions): Promise<ILocalExtension>;
    updateMetadata(local: ILocalExtension, metadata: Partial<Metadata>): Promise<ILocalExtension>;
}
export declare const IWorkbenchExtensionEnablementService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkbenchExtensionEnablementService>;
export interface IWorkbenchExtensionEnablementService {
    readonly _serviceBrand: undefined;
    readonly onEnablementChanged: Event<readonly IExtension[]>;
    getEnablementState(extension: IExtension): EnablementState;
    getEnablementStates(extensions: IExtension[], workspaceTypeOverrides?: {
        trusted?: boolean;
    }): EnablementState[];
    getDependenciesEnablementStates(extension: IExtension): [
        IExtension,
        EnablementState
    ][];
    canChangeEnablement(extension: IExtension): boolean;
    canChangeWorkspaceEnablement(extension: IExtension): boolean;
    isEnabled(extension: IExtension): boolean;
    isEnabledEnablementState(enablementState: EnablementState): boolean;
    isDisabledGlobally(extension: IExtension): boolean;
    setEnablement(extensions: IExtension[], state: EnablementState): Promise<boolean[]>;
    updateExtensionsEnablementsWhenWorkspaceTrustChanges(): Promise<void>;
}
export declare const IWebExtensionsScannerService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWebExtensionsScannerService>;
export interface IWebExtensionsScannerService {
    readonly _serviceBrand: undefined;
    scanSystemExtensions(): Promise<IExtension[]>;
    scanUserExtensions(profileLocation: URI, options?: ScanOptions): Promise<IScannedExtension[]>;
    scanExtensionsUnderDevelopment(): Promise<IExtension[]>;
    scanExistingExtension(extensionLocation: URI, extensionType: ExtensionType, profileLocation: URI): Promise<IScannedExtension | null>;
    addExtension(location: URI, metadata: Metadata, profileLocation: URI): Promise<IScannedExtension>;
    addExtensionFromGallery(galleryExtension: IGalleryExtension, metadata: Metadata, profileLocation: URI): Promise<IScannedExtension>;
    removeExtension(extension: IScannedExtension, profileLocation: URI): Promise<void>;
    copyExtensions(fromProfileLocation: URI, toProfileLocation: URI, filter: (extension: IScannedExtension) => boolean): Promise<void>;
    updateMetadata(extension: IScannedExtension, metaData: Partial<Metadata>, profileLocation: URI): Promise<IScannedExtension>;
    scanExtensionManifest(extensionLocation: URI): Promise<IExtensionManifest | null>;
}
