"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SCMContributionPoint = void 0;
const tslib_1 = require("tslib");
const di_1 = require("@opensumi/di");
const ide_core_common_1 = require("@opensumi/ide-core-common");
const ide_scm_1 = require("@opensumi/ide-scm");
const common_1 = require("../../../common");
let SCMContributionPoint = class SCMContributionPoint extends common_1.VSCodeContributePoint {
    contribute() {
        for (const contrib of this.contributesMap) {
            const { contributes } = contrib;
            if (contributes.additional) {
                const { additional } = contributes;
                if (!additional.input) {
                    return;
                }
                const { input } = additional;
                /**
                 * addonBefore 和 addonAfter 交给 AbstractViewExtProcessService 处理
                 */
                if (input.addonAfter || input.addonBefore) {
                    return;
                }
                this.scmService.appendInputProps(input);
            }
        }
    }
};
exports.SCMContributionPoint = SCMContributionPoint;
SCMContributionPoint.schema = {
    description: (0, ide_core_common_1.localize)('sumiContributes.SCM'),
    type: 'object',
    defaultSnippets: [
        {
            body: {
                additional: {
                    input: {},
                },
            },
        },
    ],
    properties: {
        additional: {
            type: 'object',
            description: (0, ide_core_common_1.localize)('sumiContributes.SCM.additional'),
            properties: {
                input: {
                    type: 'object',
                    description: (0, ide_core_common_1.localize)('sumiContributes.SCM.additional.input'),
                },
            },
        },
    },
};
tslib_1.__decorate([
    (0, di_1.Autowired)(ide_scm_1.SCMService),
    tslib_1.__metadata("design:type", ide_scm_1.SCMService)
], SCMContributionPoint.prototype, "scmService", void 0);
exports.SCMContributionPoint = SCMContributionPoint = tslib_1.__decorate([
    (0, di_1.Injectable)(),
    (0, common_1.Contributes)('scm'),
    (0, common_1.LifeCycle)(3 /* LifeCyclePhase.Starting */)
], SCMContributionPoint);
//# sourceMappingURL=scm.js.map