import { OnDestroy, Type } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
import { EventService } from '../../event/event.service';
import { CxEvent } from '../../event/cx-event';
export declare type QueryNotifier = Observable<any> | Type<CxEvent>;
export interface QueryState<T> {
    loading: boolean;
    error: false | Error;
    data: T | undefined;
}
export interface Query<T, P extends any[] = []> {
    get(...params: P): Observable<T | undefined>;
    getState(...params: P): Observable<QueryState<T>>;
}
export declare class QueryService implements OnDestroy {
    protected eventService: EventService;
    protected subscriptions: Subscription;
    constructor(eventService: EventService);
    create<T>(loaderFactory: () => Observable<T>, options?: {
        reloadOn?: QueryNotifier[];
        resetOn?: QueryNotifier[];
    }): Query<T>;
    protected getTriggersStream(triggers: QueryNotifier[]): Observable<any>;
    ngOnDestroy(): void;
}
