"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestQuorumClients = void 0;
const client_utils_1 = require("@fluid-internal/client-utils");
class TestQuorumClients extends client_utils_1.TypedEventEmitter {
    constructor() {
        super(...arguments);
        this.disposed = false;
        this.members = new Map();
    }
    dispose() {
        this.disposed = true;
    }
    getMembers() {
        return this.members;
    }
    getMember(clientId) {
        return this.members.get(clientId);
    }
    addClient(clientId, client) {
        this.members.set(clientId, client);
        this.emit("addMember", clientId, client);
    }
    removeClient(clientId) {
        this.members.delete(clientId);
        this.emit("removeMember", clientId);
    }
    reset() {
        this.members.clear();
        this.removeAllListeners();
    }
}
exports.TestQuorumClients = TestQuorumClients;
//# sourceMappingURL=testQuorumClients.js.map