import { GoodVibesSdkError } from '@pellux/goodvibes-errors';
/**
 * Thrown by {@link ProviderRegistry.require} when no provider with the given ID
 * is registered.
 *
 * The error message includes the list of all currently-registered provider IDs
 * so callers can quickly see what is available without having to inspect the
 * registry separately.
 */
export class ProviderNotFoundError extends GoodVibesSdkError {
    /** The provider ID that was requested. */
    providerId;
    /** Sorted list of currently-registered provider IDs at the time of the error. */
    availableIds;
    constructor(providerId, available) {
        const ids = available.length > 0 ? available.join(', ') : '(none)';
        super(`Provider '${providerId}' is not registered. ` +
            `Available providers: ${ids}`, { code: 'PROVIDER_NOT_FOUND', category: 'not_found', source: 'provider', recoverable: false });
        this.name = 'ProviderNotFoundError';
        this.providerId = providerId;
        this.availableIds = available;
    }
}
