"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtensionDebugAdapterContribution = void 0;
class ExtensionDebugAdapterContribution {
    constructor(description, extDebug, activationEventService) {
        this.description = description;
        this.extDebug = extDebug;
        this.activationEventService = activationEventService;
    }
    get type() {
        return this.description.type;
    }
    get label() {
        return this.description.label;
    }
    get languages() {
        return this.extDebug.$getSupportedLanguages(this.type);
    }
    async getSchemaAttributes() {
        return await this.extDebug.$getSchemaAttributes(this.type);
    }
    async getConfigurationSnippets() {
        return await this.extDebug.$getConfigurationSnippets(this.type);
    }
    async provideDebugConfigurations(workspaceFolderUri, token, triggerKind) {
        return await this.extDebug.$provideDebugConfigurations(this.type, workspaceFolderUri, token, triggerKind);
    }
    async getDebugConfigurationProvidersCount(triggerKind) {
        return await this.extDebug.$getDebugConfigurationProvidersCount(this.type, triggerKind);
    }
    async resolveDebugConfiguration(config, workspaceFolderUri) {
        return await this.extDebug.$resolveDebugConfigurations(config, workspaceFolderUri);
    }
    async resolveDebugConfigurationWithSubstitutedVariables(config, workspaceFolderUri) {
        return await this.extDebug.$resolveDebugConfigurationWithSubstitutedVariables(config, workspaceFolderUri);
    }
    async createDebugSession(dto) {
        const { configuration } = dto;
        await this.activationEventService.fireEvent('onDebugAdapterProtocolTracker', configuration.type);
        return await this.extDebug.$createDebugSession({
            ...dto,
            parentSession: undefined,
            parent: dto.parentSession ? dto.parentSession.id : undefined,
        });
    }
    async terminateDebugSession(sessionId) {
        await this.extDebug.$terminateDebugSession(sessionId);
    }
}
exports.ExtensionDebugAdapterContribution = ExtensionDebugAdapterContribution;
//# sourceMappingURL=extension-debug-adapter-contribution.js.map