import { ActivatedRoute, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { InputDateContextQueryParams, WidgetTimeContextState } from './widget-time-context.model';
import { WidgetTimeContextHelperService } from './widget-time-context-helper.service';
import * as i0 from "@angular/core";
export declare class WidgetTimeContextQueryService {
    private activatedRoute;
    private helperService;
    private router;
    constructor(activatedRoute: ActivatedRoute, helperService: WidgetTimeContextHelperService, router: Router);
    /**
     * Returns observable that emits date context query params every time query params change.
     * Invalid values are filtered out.
     *
     * @returns Observable of date context query params.
     */
    queryParamsChange$(): Observable<InputDateContextQueryParams>;
    /**
     * Creates widget time context from query parameters.
     * Interval data takes precedence over date time context described by date "from" and date "to",
     * so if valid interval is provided, date "from" and date "to" are ignored, and they are recalculated
     * with interval.
     *
     * @returns Widget time context state based on current query params or null if query params provide no valid context.
     */
    dateTimeContextFromQueryParams(): WidgetTimeContextState | null;
    /**
     * Sets query parameters related to date time context.
     * Valid interval (and other than 'custom') takes precedence over context described by date "from" and date "to".
     * Interval and context described by date "from" and date "to" exclude each other.
     *
     * @param widgetTimeContextState Widget time context state.
     */
    setDateContextQueryParams({ interval, date, realtime, aggregation }: WidgetTimeContextState): void;
    /**
     * Clears all date time context related query parameters.
     */
    clearQueryParams(): void;
    /**
     * Parses and validates date context from query params described by date "from" and date "to".
     *
     * @returns Date context as tuple of date "from" and date "to", or null if date context is invalid.
     */
    private getDateContextFromQueryParams;
    /**
     * Parses realtime query param.
     *
     * @returns Parsed realtime value or null.
     */
    private parseRealtime;
    /**
     * Maps query params object to proper type.
     *
     * @param params Query parameters object with string values only.
     *
     * @returns Query params object of proper type.
     */
    private processQueryParams;
    /**
     * Determines if provided query params contains valid time range.
     *
     * @param params Query parameters object.
     *
     * @returns True if query params contains valid time range, otherwise false.
     */
    private queryParamsContainsTimeRange;
    static ɵfac: i0.ɵɵFactoryDeclaration<WidgetTimeContextQueryService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<WidgetTimeContextQueryService>;
}
//# sourceMappingURL=widget-time-context-query.service.d.ts.map