/**
 * Registry for context providers
 * Manages provider registration and lookup
 */
export class ContextProviderRegistry {
    providers = new Map();
    constructor(providers = []) {
        for (const provider of providers) {
            this.register(provider);
        }
    }
    /** Registers a context provider in the registry. */
    register(provider) {
        this.providers.set(provider.id.toLowerCase(), provider);
    }
    /** Retrieves a context provider by its ID. */
    get(id) {
        return this.providers.get(id.toLowerCase());
    }
    /** Returns all registered context providers. */
    getAll() {
        return Array.from(this.providers.values());
    }
    /** Checks whether a provider with the given ID is registered. */
    has(id) {
        return this.providers.has(id.toLowerCase());
    }
    /** Removes a context provider from the registry by its ID. */
    unregister(id) {
        return this.providers.delete(id.toLowerCase());
    }
}
//# sourceMappingURL=registry.js.map