import { useMask } from './useMask'; import { CalendarType } from '../calendar-core'; import { MaskPlaceholder } from '../datepicker'; export interface UsePickerInputOptions { locale?: string | null; inputRef?: React.RefObject; placeholder?: string; placeholderKey?: 'datepicker' | 'datetimepicker' | 'timepicker' | 'daterangepicker'; labelMode?: 'Never' | 'Always' | 'Auto'; disabled?: boolean; readOnly?: boolean; editable?: boolean; openOnFocus?: boolean; strictMode?: boolean; required?: boolean; valid?: boolean; validationMessage?: string; value: Date | null | undefined; formatValue: (d: Date) => string; parseInput: (raw: string) => Date | null; isValid: (d: Date | null) => boolean; commitValue: (d: Date | null, event?: React.SyntheticEvent) => void; onOpen?: () => void; inputMask?: boolean; format?: string; minDate?: Date; maskPlaceholder?: MaskPlaceholder; calendarType?: CalendarType; } export interface UsePickerInputResult { inputValue: string; isInputValid: boolean; isFocused: boolean; getPlaceholder: string; handleInputFocus: () => void; handleInputBlur: () => void; handleInputChange: (e: React.ChangeEvent) => void; handleClear: () => void; handleClearMouseDown: (e: React.MouseEvent) => void; setInputValue: React.Dispatch>; setIsInputValid: React.Dispatch>; setIsFocused: React.Dispatch>; showMaskSegments: boolean; setShowSegments: React.Dispatch>; maskInputProps?: ReturnType['inputProps']; hasPartialInput?: boolean; } /** * Hook for managing picker input state, including value formatting, parsing, focus, blur, and clear interactions. * * @param {UsePickerInputOptions} options - Configuration options for the picker input. * @returns {UsePickerInputResult} Object containing input state and handlers. */ export default function usePickerInput(options: UsePickerInputOptions): UsePickerInputResult;