import { Nullable } from '@viasat/beam-shared/utils/types'; import { SegmentValues } from './DateField.types'; export interface UseDateFieldValidityArgs { segments: SegmentValues; /** Result of `deriveValue(segments)` — passed in to avoid recomputing. */ currentValue: Nullable; /** Gates error visibility — partial / invalid combos don't surface until the * user has interacted with the field. */ wasTouched: boolean; /** True when any segment in the field currently holds focus. The partial- * on-blur rule only fires once focus has left. */ isFocused: boolean; } export interface UseDateFieldValidityReturn { allFilled: boolean; hasPartialValue: boolean; /** "Show error?" for value-driven invalidity. True when the user has * touched the field AND (all segments filled but combine to an invalid * date (Feb 30), OR some filled/some empty and focus has left). * `minDate`/`maxDate` out-of-range values aren't flagged here — the * built-in bound is a blur clamp (see `commitOnBlur`), not a validity * constraint; use a `validationRule` for range errors/submit-blocking. */ isInvalid: boolean; } export declare function useDateFieldValidity({ segments, currentValue, wasTouched, isFocused, }: UseDateFieldValidityArgs): UseDateFieldValidityReturn;