import { BehaviorSubject, Observable, Subscription } from 'rxjs';
import { TextDocumentRegistrationOptions, TextDocumentIdentifier, Entry } from '@adminide-stack/extension-api';
/** Base class for provider registries for features. */
export declare abstract class FeatureProviderRegistry<O, P> {
    protected entries: BehaviorSubject<Entry<O, P>[]>;
    registerProvider(registrationOptions: O, provider: P): Subscription;
    /**
     * Bulk-register providers. This is useful when registering an initial set of providers. Registering them all
     * at once means there is only one emission from {@link FeatureProviderRegistry#entries} (instead of one per
     * entry).
     */
    registerProviders(entries: Entry<O, P>[]): Subscription;
    /** All providers, emitted whenever the set of registered providers changed. */
    readonly providers: Observable<P[]>;
}
/**
 * A registry for providers that provide features within a document. Use this class instead of
 * {@link FeatureProviderRegistry} when all calls to the provider are scoped to a document.
 *
 * For example, hovers are scoped to a document (i.e., the document URI is one of the required arguments passed to
 * the hover provider), so this class is used for the hover provider registry.
 */
export declare abstract class DocumentFeatureProviderRegistry<P, O extends TextDocumentRegistrationOptions = TextDocumentRegistrationOptions> extends FeatureProviderRegistry<O, P> {
    /**
     * @param document The text document to find applicable providers for.
     * @param filter An optional function to filter providers based on their registration options.
     * @returns an observable of the set of registered providers that apply to the document. The observable emits
     * initially and whenever the set changes (due to a provider being registered or unregistered).
     */
    providersForDocument(document: TextDocumentIdentifier, filter?: (registrationOptions: O) => boolean): Observable<P[]>;
}
