import { LocaleMessageKey } from '../../utilities/Locale.js'; /** A built-in quick range, named so it can be listed in the `presets` attribute. */ export type DateRangePresetName = 'today' | 'yesterday' | 'last7Days' | 'last30Days' | 'last3Months' | 'last6Months' | 'thisWeek' | 'lastWeek' | 'thisMonth' | 'lastMonth' | 'thisYear'; /** * A quick range the app defines — a fiscal quarter, "since the last release". `range` runs when * the preset is drawn and when it is picked, so a relative range stays current. It returns the * two ends as `Date`s (local calendar days) or ISO `YYYY-MM-DD` strings, in either order. */ export interface DateRangePreset { label: string; range: () => [Date | string, Date | string]; } /** What the `presets` property takes — built-in names and app-defined presets, in display order. */ export type DateRangePresetOption = DateRangePresetName | DateRangePreset; /** A preset ready to draw: its label and its two ISO ends, earliest first. */ export interface ResolvedPreset { label: string; start: string; end: string; } /** `weekStart` is the locale's first day of the week (0 = Sunday … 6 = Saturday) — the same value the calendar grid draws. */ type Builtin = { key: LocaleMessageKey; range: (today: Date, weekStart: number) => [Date, Date]; }; /** Built-in ranges as pure functions of "today" (a local calendar day). Both ends are inclusive. */ export declare const BUILTIN_PRESETS: Record; /** * Resolves the `presets` list against `today` — labels through the active locale, ends as ISO * days earliest first. An unknown name is skipped and reported through `onUnknown`. */ export declare function resolvePresets(options: readonly DateRangePresetOption[], today: Date, onUnknown?: (name: string) => void): ResolvedPreset[]; export {};