import type { StoreApi } from 'zustand'; import type { Precision } from './shared.types.js'; import type { TimeValue } from '../types/time.js'; /** * Hook that keeps min and max TimeValues refreshed at midnight. * Replaces the duplicated pair of `useIntervalCallback` calls for min/max * found in Calendar, DateTimePicker, DateTimeRangePicker and TimeframeSelector. * @internal */ export declare function useMinMax(propMin: string | undefined, propMax: string | undefined, precision?: Precision): { min: TimeValue | null; max: TimeValue | null; }; /** * Hook that syncs min/max prop changes into a zustand timeframe store. * * Replaces the duplicated pair of `useEffect` hooks (one for min, one for max) * present in Calendar, DateTimePicker, DateTimeRangePicker and TimeframeSelector. * Merges them into a single combined effect so that both bounds are always * validated and committed together. * * The `applyChange` callback receives the current store state and the incoming * min/max values. It should return only the error-field updates — min and max * themselves are set automatically by the hook. * Wrap `applyChange` in `useCallback` at the call site to keep the effect stable. * * @internal */ export declare function useMinMaxStoreSync(store: StoreApi, min: TimeValue | null, max: TimeValue | null, applyChange: (state: S, min: TimeValue | null, max: TimeValue | null) => Partial): void;