import type { Dispatch, RefObject } from 'react'; import type { DateTimeInputRef } from '../../../../forms/date-time-range-picker/types.js'; import type { FormFieldMessagesReducerAction } from '../../../../forms/forms-core/state/formfield-messages-state-reducer.js'; import { type Timeframe } from '../../../types/time.js'; import type { ValidateOptions } from '../../validation.js'; import type { DateTimeRangePickerTimeframeStates } from '../dateTimeRangePicker.types.js'; /** * Closes Calendar overlay and, after two animation frames, refocuses the from-input. * The double rAF ensures the overlay has fully unmounted before focus is moved. * @internal */ export declare function closeCalendarAndFocusInput(pickerRef: RefObject<{ close(): void; focus?: () => void; } | null> | undefined, dateTimeFromRef: RefObject | undefined): void; /** * Pure reducer for the `clearCalendarValue` action, shared between * DateTimeRangePicker and TimeframeSelector. * @internal */ export declare function handleClearCalendarValue(state: Pick): Partial>; /** * Options for {@link applySetToNow}. * @internal */ export type SetToNowOptions = { /** Which boundary to set to `now`. Defaults to `to`. */ target?: 'from' | 'to'; /** Called with the committed timeframe when a full range is built. */ onChangeProp?: (value: Timeframe | null) => void; formFieldMessagesDispatch?: Dispatch; /** Controls validation messaging and whether to swap an inverted boundary. */ validateMode: 'dateTimePicker' | 'timeframeSelector'; errorMessages?: ValidateOptions['errorMessages']; /** When true the component is controlled: skip internal state update after firing `onChangeProp`. */ isControlled?: boolean; }; /** * Returns the store state patch for the "set a boundary to now" action, shared by * DateTimeRangePicker and TimeframeSelector. Callers may spread in additional * component-specific fields on top of the returned patch. * @internal */ export declare function applySetToNow(state: DateTimeRangePickerTimeframeStates, options: SetToNowOptions): Partial;