import type { RequireAtLeastOne } from 'type-fest'; import type { Precision } from '../../../core/time/shared.types.js'; import type { Timeframe as TimeframeWithTimeValue } from '../../../core/types/time.js'; /** @internal - will come from the official SDK at some point. */ export interface Timeframe { from: string; to: string; } /** @internal - will come from the official SDK at some point. */ export interface TimeframePreset { id: string; timeframe: Timeframe; } /** @internal - will come from the official SDK at some point. */ export interface UserTimeframePresets { recentPresets: TimeframePreset[]; } /** * Makes sure the object is a Timeframe. * @internal */ export declare function isTimeframe(timeframe: any): timeframe is Timeframe; /** * Makes sure the object is a TimeframePreset. * @internal */ export declare function isTimeframePreset(timeframePreset: any): timeframePreset is TimeframePreset; /** * Makes sure the object is a UserTimeframePresets. * @internal */ export declare function isUserTimeframePresets(userTimeframePreset: any): userTimeframePreset is UserTimeframePresets; /** * Function to add a timeframe preset to the user app state via the app shell runtime function for timeframe presets. * It only returns valid timeframePreset according to the `UserTimeframePresets`-type. * @internal */ export declare function addRecentTimeframePreset(timeframe: Timeframe): Promise; /** * Wrapper around `addRecentTimeframePreset`. * @internal */ export declare function saveRecentTimeframe(timeframe: TimeframeWithTimeValue): void; /** * Function to get timeframe presets for the user app state via the app shell runtime function for timeframe presets. * It only returns valid timeframePreset according to the `UserTimeframePresets`-type. * @internal */ export declare function getTimeframePresets(): Promise; /** * Checks if a given timeframe value (preset) matches the currently selected timeframe. * If the preset is a recent timeframe it will not be displayed as selected in the UI. * @param value - The timeframe value of the preset to compare against. * @param details - The current value of the timeframe selector. * @param precision - The precision level (e.g., 'milliseconds', 'minutes', 'seconds') to consider. * @param isRecent - A boolean indicating whether the preset being checked is a recent timeframe. * @returns A boolean indicating whether the given preset should be displayed as selected. * @internal */ export declare function isPresetSelected(value: Timeframe, details: RequireAtLeastOne | null, isRecent: boolean, precision?: Precision): boolean;