export interface UseDateEditStateConfig {
	/** The current committed date value (controlled by the parent). */
	value: Date | null;
	/**
	* Formats the date when the input is idle (not focused). It doesn't need to
	* be parsable since the user isn't typing.
	* When no custom formatDate prop is provided, this is the same as editFormatFn.
	*/
	displayFormatFn: (date: Date) => string;
	/**
	* Formats the date when the user starts typing. Must produce a string that
	* parseFn can round-trip back to a Date (e.g. "2024-01-15" or "2024-01-15 14:30").
	*/
	editFormatFn: (date: Date) => string;
	/** Parses user-typed text back into a Date. Returns undefined if invalid. */
	parseFn: (text: string) => Date | undefined;
	/** Earliest selectable date (inclusive). */
	min?: Date;
	/** Latest selectable date (inclusive). */
	max?: Date;
	/**
	* Called by `commitAndStopEditing` with the validated date, or null when the
	* field is cleared. Not called when the input is invalid (silent revert) or
	* when `stopEditing` is used directly (Escape/cancel).
	*/
	onChange?: (date: Date | null) => void;
}
export interface UseDateEditState {
	/** Whether the user is currently typing in the input. */
	isEditing: boolean;
	/** The value to show in the input: raw text when editing, formatted date otherwise. */
	displayedValue: string;
	/** Validation error for the current input text: null when valid or not editing. */
	inputError: "invalid" | "out-of-range" | null;
	/**
	* Live parse of inputValue — the Date if parsable, undefined if empty/invalid.
	* Re-derived every render from parseFn(inputValue).
	* Used for cross-input validation (e.g. DateRangePicker's overlapping check).
	*/
	dateValue: Date | undefined;
	/** Enter editing mode: sets isEditing=true and populates inputValue from the current value. */
	startEditing: () => void;
	/** Exit editing mode without committing (Escape/cancel). */
	stopEditing: () => void;
	/** Commit the current input via onChange, then exit editing mode (blur/Enter). */
	commitAndStopEditing: () => void;
	/** Update the raw input text (stable useState setter). */
	setInputValue: (value: string) => void;
	/**
	* Set inputValue from a Date using editFormatFn. Use this instead of calling
	* `setInputValue(editFormatFn(date))` manually — it removes the need for
	* callers to know which format function to apply.
	*/
	setDateValue: (date: Date | null) => void;
}
/**
* Manages the editing lifecycle for a single date text input.
*
* Handles the two-phase display pattern where the input shows a formatted
* display value when idle and switches to an editable format when focused.
*/
export declare function useDateEditState({ value, displayFormatFn, editFormatFn, parseFn, min, max, onChange }: UseDateEditStateConfig): UseDateEditState;
