"use strict";
/*
 * Copyright © 2019 Atomist, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListenerRegistrationManagerSupport = void 0;
/**
 * Listener management offering a fluent builder pattern for registrations.
 * This class is purely a registration store, and has no other behavior.
 */
class ListenerRegistrationManagerSupport {
    constructor() {
        this.startupListeners = [];
        this.triggeredListeners = [];
        this.userJoiningChannelListeners = [];
        this.tagListeners = [];
        this.newIssueListeners = [];
        this.updatedIssueListeners = [];
        this.closedIssueListeners = [];
        this.repoCreationListeners = [];
        this.repoOnboardingListeners = [];
        this.pullRequestListeners = [];
        this.firstPushListeners = [];
        this.channelLinkListeners = [];
        this.goalsSetListeners = [];
        this.goalCompletionListeners = [];
        this.goalExecutionListeners = [];
    }
    addStartupListener(l) {
        this.startupListeners.push(l);
        return this;
    }
    addTriggeredListener(t) {
        this.triggeredListeners.push(t);
        return this;
    }
    addNewIssueListener(e) {
        this.newIssueListeners.push(e);
        return this;
    }
    addUpdatedIssueListener(e) {
        this.updatedIssueListeners.push(e);
        return this;
    }
    addGoalExecutionListener(e) {
        this.goalExecutionListeners.push(e);
        return this;
    }
    addClosedIssueListener(e) {
        this.closedIssueListeners.push(e);
        return this;
    }
    addTagListener(e) {
        this.tagListeners.push(e);
        return this;
    }
    addChannelLinkListener(e) {
        this.channelLinkListeners.push(e);
        return this;
    }
    addRepoCreationListener(rcls) {
        this.repoCreationListeners.push(rcls);
        return this;
    }
    addRepoOnboardingListener(rols) {
        this.repoOnboardingListeners.push(rols);
        return this;
    }
    addFirstPushListener(pls) {
        this.firstPushListeners.push(pls);
        return this;
    }
    addPullRequestListener(pls) {
        this.pullRequestListeners.push(pls);
        return this;
    }
    addGoalsSetListener(l) {
        this.goalsSetListeners.push(l);
        return this;
    }
    addGoalCompletionListener(l) {
        this.goalCompletionListeners.push(l);
        return this;
    }
    addUserJoiningChannelListener(l) {
        this.userJoiningChannelListeners.push(l);
        return this;
    }
}
exports.ListenerRegistrationManagerSupport = ListenerRegistrationManagerSupport;
//# sourceMappingURL=ListenerRegistrationManagerSupport.js.map