"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FluidDataStoreRegistry = void 0;
const internal_1 = require("@fluidframework/telemetry-utils/internal");
/**
 * @internal
 */
class FluidDataStoreRegistry {
    get IFluidDataStoreRegistry() {
        return this;
    }
    constructor(namedEntries) {
        this.map = new Map();
        for (const entry of namedEntries) {
            if (this.map.has(entry[0])) {
                throw new internal_1.UsageError("Duplicate entry names exist");
            }
            this.map.set(entry[0], entry[1]);
        }
    }
    async get(name) {
        if (this.map.has(name)) {
            return this.map.get(name);
        }
        return undefined;
    }
}
exports.FluidDataStoreRegistry = FluidDataStoreRegistry;
//# sourceMappingURL=dataStoreRegistry.js.map